diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index d3cec6a7a12..b1ce025f86d 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,8 +2,8 @@ name: CI on: [push] jobs: - build: - name: Build + commonwealth: + name: Commonwealth Tests runs-on: ubuntu-latest defaults: @@ -64,3 +64,47 @@ jobs: with: name: code-coverage-report path: coverage + + chain-events: + name: Chain Events Tests + runs-on: ubuntu-latest + defaults: + run: + working-directory: packages/chain-events + + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14.x + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install dependencies + run: yarn + + - name: Run unit tests + run: yarn unit-test + + # TODO: fix integration tests -- they currently fail + # - name: Run integration tests + # run: yarn integration-test + + # TODO: reintegrate code coverage once we get nyc working with hardhat + + # TODO: fix linter and then reintegrate using current ts version + # - name: Run linter + # run: yarn lint \ No newline at end of file diff --git a/package.json b/package.json index a4453cf64f8..404b6de7ada 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "keywords": [], "workspaces": [ "packages/common-common", + "packages/chain-events", "packages/token-balance-cache", "packages/commonwealth" ], diff --git a/packages/chain-events/.eslintrc.json b/packages/chain-events/.eslintrc.json new file mode 100644 index 00000000000..be2d25d1e12 --- /dev/null +++ b/packages/chain-events/.eslintrc.json @@ -0,0 +1,42 @@ +{ + "extends": [ + "airbnb-base", + "plugin:prettier/recommended", + "plugin:import/errors", + "plugin:import/warnings", + "plugin:import/typescript", + "plugin:@typescript-eslint/eslint-recommended", + "plugin:@typescript-eslint/recommended" + ], + "plugins": ["@typescript-eslint"], + "parser": "@typescript-eslint/parser", + "settings": { + "import/extensions": [".js", ".ts"], + "import/resolver": { + "node": {}, + "webpack": { + "config": "webpack/webpack.common.js" + } + } + }, + "ignorePatterns": ["contractTypes", "eth", "dist"], + "rules": { + "@typescript-eslint/interface-name-prefix": "off", + "import/prefer-default-export": 0, + "import/extensions": 0, + "import/no-cycle": 0, + "import/order": ["error", { + "newlines-between": "always" + }], + "max-classes-per-file": "off", + "no-await-in-loop": "off", + "no-import-cycles": "off", + "no-nested-ternary": "off", + "no-param-reassign": "off", + "no-plusplus": "off", + "no-restricted-syntax": "off", + "no-underscore-dangle": "off", + "no-useless-constructor": "off", + "class-methods-use-this": "off" + } +} diff --git a/packages/chain-events/.github/PULL_REQUEST_TEMPLATE.md b/packages/chain-events/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000000..1339edd3355 --- /dev/null +++ b/packages/chain-events/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,16 @@ + + +## Description + + +## Motivation and Context + + + +## How has this been tested? + + + + +## Have proper tags been added (for bug, enhancement, breaking change)? +- [ ] yes diff --git a/packages/chain-events/.github/workflows/build.yml b/packages/chain-events/.github/workflows/build.yml new file mode 100644 index 00000000000..d9a37c79790 --- /dev/null +++ b/packages/chain-events/.github/workflows/build.yml @@ -0,0 +1,41 @@ +name: Build +on: [push] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Setup Node + uses: actions/setup-node@v1 + with: + node-version: 14.x + + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "::set-output name=dir::$(yarn cache dir)" + + - uses: actions/cache@v2 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install dependencies + run: yarn + + - name: Run unit tests + run: yarn unit-test + + - name: Run integration tests + run: yarn integration-test + + # TODO: reintegrate code coverage once we get nyc working with hardhat + + - name: Run linter + run: yarn lint \ No newline at end of file diff --git a/packages/chain-events/.gitignore b/packages/chain-events/.gitignore new file mode 100644 index 00000000000..fb5822e01d3 --- /dev/null +++ b/packages/chain-events/.gitignore @@ -0,0 +1,16 @@ +.DS_Store +/eth/build +/eth/artifacts +/eth/cache +node_modules/ +.vscode +yarn-error.log +.nyc_output/ +coverage/ + +.env +*.tgz + +.yalc/ +yalc.lock +/dist/ diff --git a/packages/chain-events/.mocharc.json b/packages/chain-events/.mocharc.json new file mode 100644 index 00000000000..24e465ef92a --- /dev/null +++ b/packages/chain-events/.mocharc.json @@ -0,0 +1,7 @@ +{ + "extension": [".spec.ts"], + "package": "./package.json", + "timeout": 60000, + "require": [ "jsdom-global/register", "tsconfig-paths/register", "@babel/register", "source-map-support/register" ], + "exit": true +} \ No newline at end of file diff --git a/packages/chain-events/.nvmrc b/packages/chain-events/.nvmrc new file mode 100644 index 00000000000..ca3f1e5c83e --- /dev/null +++ b/packages/chain-events/.nvmrc @@ -0,0 +1 @@ +v14 \ No newline at end of file diff --git a/packages/chain-events/.nycrc b/packages/chain-events/.nycrc new file mode 100644 index 00000000000..3807191c790 --- /dev/null +++ b/packages/chain-events/.nycrc @@ -0,0 +1,6 @@ +{ + "extends": "@istanbuljs/nyc-config-typescript", + "all": false, + "reporter": "html", + "include": [ "src/" ] +} \ No newline at end of file diff --git a/packages/chain-events/.prettierrc.json b/packages/chain-events/.prettierrc.json new file mode 100644 index 00000000000..2bcad54ddde --- /dev/null +++ b/packages/chain-events/.prettierrc.json @@ -0,0 +1,4 @@ +{ + "arrowParens": "always", + "singleQuote": true +} diff --git a/packages/chain-events/.stylelintrc b/packages/chain-events/.stylelintrc new file mode 100644 index 00000000000..cd3d7bbd71e --- /dev/null +++ b/packages/chain-events/.stylelintrc @@ -0,0 +1,14 @@ +{ + "ignoreFiles": "client/styles/lib/*", + "rules": { + "block-no-empty": null, + "color-no-invalid-hex": true, + "comment-empty-line-before": [ "always", { + "ignore": ["stylelint-commands", "after-comment"] + } ], + "declaration-colon-space-after": "always", + "indentation": 4, + "max-empty-lines": 2, + "unit-whitelist": ["px", "em", "rem", "%", "s", "vh", "deg", "ms"] + } +} \ No newline at end of file diff --git a/packages/chain-events/LICENSE.txt b/packages/chain-events/LICENSE.txt new file mode 100644 index 00000000000..96bd6edad70 --- /dev/null +++ b/packages/chain-events/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file diff --git a/packages/chain-events/README.md b/packages/chain-events/README.md new file mode 100644 index 00000000000..e2ce1ddc646 --- /dev/null +++ b/packages/chain-events/README.md @@ -0,0 +1,304 @@ +# @commonwealth/chain-events + +"@commonwealth/chain-events" is a library for subscribing and processing synthetic blockchain events. + +## Installation + +Available on [npm](https://www.npmjs.com/package/@commonwealth/chain-events) and designed to work both in browser and with nodejs. + +```bash +yarn add @commonwealth/chain-events +``` + +For developing on this project itself, first you must build the project to replicate the npm package structure (using the typescript compiler), and then you can install your local version via `yarn link`: + +```bash +~/chain-events$ yarn build +~/chain-events$ yarn link +~/chain-events$ cd ~/project-name +~/project-name$ yarn link @commonwealth/chain-events +``` + +Be sure to call `yarn unlink` once development has been completed and the new changes have been published. + +Please submit any enhancements or bug fixes as a Pull Request on the [project's github page](https://github.com/hicommonwealth/chain-events). + +## Development + +``` +npm install -g npm-install-peers +``` + +For using a local version of Chain Events in other projects, we recommend you use `yalc`, which functions as a local package repository for your `npm` libraries in development. + +To install `yalc`, run: + +```bash +$ yarn global add yalc +``` + +Then, publish Chain Events to the `yalc` respository (which will first build the project): + +```bash +~/chain-events$ yalc publish +``` + +Navigate to the project you want to test Chain Events inside, and use `yalc` to add it. This will update its `package.json` to point the "@commonwealth/chain-events" dependency to a local file. + +```bash +~/commonwealth$ yalc add @commonwealth/chain-events +~/commonwealth$ yarn +``` + +Any time you update Chain Events after publishing and adding, simply run the following to build and propagate a new update: + +```bash +~/chain-events$ yalc publish --push +``` + + +## Publishing + +First ensure you bump the package version in the [package.json](./package.json) file. Then build, and publish to the npm repository. A `--dry-run` is useful beforehand to ensure the version and file lists are correct. + +```bash +~/chain-events$ yarn build +~/chain-events$ npm publish [--tag ] --dry-run +~/chain-events$ npm publish [--tag ] +``` + +## Publishing Types +First navigate to [types](./types) then bump the package version and publish. + +```bash +~/chain-events/types$ npm publish [--tag ] --dry-run +~/chain-events/types$ npm publish [--tag ] +``` + + +## Standalone Usage + +This package includes an "event listener" script located at [listener.ts](./scripts/listener.ts), +which permits real-time listening for on-chain events, and can be used for testing a chain connection, pushing events to +a queue, or/and running chain-events as a node. + +The following is an example usage, connecting to a local node running on edgeware mainnet: + +```bash +~/chain-events$ yarn build +~/chain-events$ yarn listen -n edgeware -u ws://localhost:9944 +``` + +The full set of options is listed as, with only `-n` required: + +``` +Options: + --help Show help [boolean] + --version Show version number [boolean] + -z, --config Path to a config file to setup multiple [string] + listeners (see below) + -n, --network chain to listen on + [required] [choices: "edgeware", "edgeware-local", "edgeware-testnet", + "kusama", "kusama-local", "polkadot", "polkadot-local", "kulupu", "moloch", + "moloch-local"] + -u, --url node url [string] + -a, --archival run listener in archival mode [boolean] + -b, --startBlock when running in archival mode, which block [number] + should we start from + -s, --skipCatchup Whether to attempt to retrieve historical [boolean] + events not collected due to down-time + -c, --contractAddress eth contract address [string] + -q, --rabbitmq Publish messages to queue hosted on RabbitMQ [boolean] + -e, --eventNode Run chain-events as a node that allows [boolean] + interacting with listeners over http + (only updating substrate specs for now) +``` + +If the -z option is passed then only -q and -e can be used (all other options conflict with the config defined by -z) + +#### Environment Variables +- NODE_ENV: dictates where a listener will get its initial spec. when NODE_ENV = "production" +the listener gets its spec from commonwealth.im. Otherwise, the listener will get its spec from the commonwealth server +hosted locally. + +#### Listener config file +Must be a json file with the following format: +```json +[ + { + "network": "Required (string) - The name of the network", + "url": "Optional (string) - Node url to connect to", + "archival": "Optional (boolean) - run listener in archival mode", + "startBlock": "Optional (number) - when running in archival mode, which block should we start from", + "skipCatchup": "Optional (boolean) - Whether to attempt to retrieve historical events not collected due to down-time", + "excludedEvents": "Optional (array of strings) - An array of EventKinds to ignore. Currently only relevant for the RabbitMQ producer." + } +] +``` +See manyListenerConfigEx.json for an example configuration + + +## Library Usage +The easiest usage of the package involves using the Listener class which initializes the various components. Do this +for Substrate chains as follows: +```typescript +import { Listener as SubstrateListener } from ""; + +// TODO: listener argument docs +// create a listener instance +const listener = new SubstrateListener(); + +// initialize the listener +await listener.init(); + +// subscribe/listen to events on the specified chain +await listener.subscribe(); +```` + +The Listener classes have a variety functions that facilitate using the listener. + +##### Updating the substrate spec +```typescript +await listener.updateSpec({yourNewSpec}) +``` + +##### Updating the url the listener should use +```typescript +await listener.updateUrl('yourNewUrl') +``` + +##### Changing the event handlers +The event handlers are accessible through the `eventHandlers` property. +The eventHandlers property is defined as follows: + +``` +eventHandlers: { + [handlerName: string]: { + "handler": IEventHandler, + "excludedEvents": SubstrateEvents[] + } +} +``` +Thus, to change an event handler, or the events that it ignores simply access it directly: +```typescript +// change the handler of "myEventHandler" +listener.eventHandlers["myEventHandler"].handler = newHandler; +``` + +##### Changing the excluded events +As described above you can change the events that a handler ignores either directly in the execution of the handler +or by setting "excludedEvents" like so: +```typescript +// change the events "myEventHandler" excludes +listener.eventHandlers["myEventHandler"].excludedEvents = ["someEventKind", "anotherEventKind"] +``` +You can also exclude events from all handlers at one by changing the globalExcludedEvents property like so: +```typescript +listener.globalExcludedEvents = ["someEventKind", "anotherEventKind"] +``` + +### Provided Handlers +##### RabbitMQ Producer +##### HTTP Post Handler +##### Single Event Handler + +### Custom Handlers +A custom handler is necessary in many cases depending on what you are trying to build. Thankfully creating your own +is very easy! + +Just extend the `IEventHandler` and implement the `handle` method: +```typescript +import {CWEvent, IEventHandler} from "chain-event-types" + +class ExampleEventHandler implements IEventHandler { + public async handle(event: CWEvent): Promise { + // your code goes here + } +} +``` + +In order to use chain-event-types in your project you will need to install chain-event-types from +'git+https://github.com/timolegros/chain-events.git#build.types' and have the following dev dependencies: +- '@polkadot/types' +- '@polkadot/api' + + +The easiest usage of the package involves calling `subscribeEvents` directly, which initializes the various components automatically. Do this for Substrate as follows. + +```typescript +import { spec } from '@edgeware/node-types'; +import { SubstrateEvents, CWEvent, IEventHandler } from '@commonwealth/chain-events'; + +// This is an example event handler that processes events as they are emitted. +// Add logic in the `handle()` method to take various actions based on the events. +class ExampleEventHandler extends IEventHandler { + public async handle(event: CWEvent): Promise { + console.log(`Received event: ${JSON.stringify(event, null, 2)}`); + } +} + +async function subscribe(url) { + // Populate with chain spec type overrides + const api = await SubstrateEvents.createApi(url, spec); + + const handlers = [ new ExampleEventHandler() ]; + const subscriber = await SubstrateEvents.subscribeEvents({ + api, + chain: 'edgeware', + handlers, + + // print more output + verbose: true, + + // if set to false, will attempt to poll past events at setup time + skipCatchup: true, + + // if not skipping catchup, this function should "discover" the most + // recently seen block, in order to limit how far back we attempt to "catch-up" + discoverReconnectRange: undefined, + }); + return subscriber; +} +``` + +Alternatively, the individual `Subscriber`, `Poller`, `StorageFetcher`, and `Processor` objects can be accessed directly on the `SubstrateEvents` object, and +can be set up directly. For an example of this, see the initialization procedure in [subscribeFunc.ts](src/chains/substrate/subscribeFunc.ts). + +### Class Details + +The top level `@commonwealth/chain-events` import exposes various abstract types from the [interfaces.ts](./src/interfaces.ts) file, as well as "per-chain" modules, e.g. for Substrate, `SubstrateTypes` and `SubstrateEvents`, with the former containing interfaces and the latter containing classes and functions. + +The two main concepts used in the project are "ChainEvents" and "ChainEntities". +* A "ChainEvent" represents a single event or extrinsic call performed on the chain, although it may be augmented with additional chain data at production time. ChainEvents are the main outputs generated by this project. +* A "ChainEntity" represents a stateful object on chain, subject to one or more "ChainEvents" which manipulate its state. The most common usage of ChainEntity is to represent on-chain proposals, which may have a pre-voting phase, a voting phase, and a period post-voting before the proposal is marked completed, each phase transition represented by events that relate to the same object. **This project defines types and simple utilities for ChainEntities but does not provide any specific tools for managing them.** + +Each chain implements several abstract classes, described in [interfaces.ts](./src/interfaces.ts). The list for Substrate is as follows: + +* `Subscriber` exposes a `subscribe()` method, which listens to the chain via the API and constructs a synthetic `Block` type when events occur, containing necessary data for later processing. +* `Poller` exposes a `poll()` method, which attempts to fetch a range of past blocks and returns an Array of synthetic `Block`s. This is used for "catching up" on past events. +* `StorageFetcher` exposes a `fetch()` method, which queries chain storage and constructs "fake" `Block`s, that represent what the original events may have looked like. This is used to quickly catch up on stateful Chain Entities from chains that prune past blocks (as most do). +* `Processor` exposes a `process()` method, which takes a synthetic `Block` and attempts to convert it into a `CWEvent` (aka a ChainEvent), by running it through various "filters", found in the [filters](src/chains/substrate/filters) directory. The primary filter types used are as follows: + * `ParseType` uses data from the chain to detect the ChainEvent kind of a `Block`. It is used to quickly filter out blocks that do not represent any kind of ChainEvent. + * `Enrich` uses the API to query additional data about a ChainEvent that did not appear in the original `Block`, and constructs the final `CWEvent` object. This is used because many "events" on chains provide only minimal info, which we may want to augment for application purposes. + * Two other filters exist, which are not used by the `Processor`, but may be useful in an application: + * `Title` takes a kind of ChainEvent and produces an object with a title and description, useful for enumerating a human-readable list of possible ChainEvents. + * `Label` takes a specific ChainEvent and produces an object with a heading, a label, and a linkUrl, useful for creating human-readable UIs around particular events. The `linkUrl` property in particular is currently specific to [Commonwealth](https://commonwealth.im/), but may in the future be generalized. + +Note that every item on this list may not be implemented for every chain (e.g. Moloch does not have a `Poller`), but the combination of these components provides the pieces to create a more usable application-usable event stream than what is exposed on the chain. + +### Usage as Commonwealth Chain-Events DB Node +Running chain-events as a CW DB node lets us run a cluster of chain-events node each with multiple listeners without +needing for each of them to be aware of each other or implementing load-balancing. This is achieved by having the chain +events DB nodes poll the database for the information that is specific to them. + +####Environment Variables +- `NUM_WORKERS`: The total number of chain-events DB nodes in the cluster. This is used to ensure even separation of + listeners among the different chain-events DB nodes. +- `WORKER_NUMBER`: The unique number id that this chain-events DB node should have. Must be between 0 and NUM_WORKERS-1 +- `HANDLE_IDENTITY`: ("handle" || "publish" || null) + - handle: The node will directly update the database with identity data + - publish: The node will publish identity events to an identity queue + - null: The node will not query the identity cache + +- `NODE_ENV`: ("production" || "development") - optional +- `DATABASE_URL`: The url of the database to connect to. If `NODE_ENV` = production this url is the default. diff --git a/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/Address.sol b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/Address.sol new file mode 100644 index 00000000000..4787d9a6706 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/Address.sol @@ -0,0 +1,60 @@ +pragma solidity 0.7.5; + +/** + * @dev Collection of functions related to the address type + */ +library Address { + /** + * @dev Returns true if `account` is a contract. + * + * [IMPORTANT] + * ==== + * It is unsafe to assume that an address for which this function returns + * false is an externally-owned account (EOA) and not a contract. + * + * Among others, `isContract` will return false for the following + * types of addresses: + * + * - an externally-owned account + * - a contract in construction + * - an address where a contract will be created + * - an address where a contract lived, but was destroyed + * ==== + */ + function isContract(address account) internal view returns (bool) { + // According to EIP-1052, 0x0 is the value returned for not-yet created accounts + // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned + // for accounts without code, i.e. `keccak256('')` + bytes32 codehash; + bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; + // solhint-disable-next-line no-inline-assembly + assembly { + codehash := extcodehash(account) + } + return (codehash != accountHash && codehash != 0x0); + } + + /** + * @dev Replacement for Solidity's `transfer`: sends `amount` wei to + * `recipient`, forwarding all available gas and reverting on errors. + * + * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost + * of certain opcodes, possibly making contracts go over the 2300 gas limit + * imposed by `transfer`, making them unable to receive funds via + * `transfer`. {sendValue} removes this limitation. + * + * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. + * + * IMPORTANT: because control is transferred to `recipient`, care must be + * taken to not create reentrancy vulnerabilities. Consider using + * {ReentrancyGuard} or the + * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. + */ + function sendValue(address payable recipient, uint256 amount) internal { + require(address(this).balance >= amount, 'Address: insufficient balance'); + + // solhint-disable-next-line avoid-low-level-calls, avoid-call-value + (bool success, ) = recipient.call{value: amount}(''); + require(success, 'Address: unable to send value, recipient may have reverted'); + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/BaseAdminUpgradeabilityProxy.sol b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/BaseAdminUpgradeabilityProxy.sol new file mode 100644 index 00000000000..74c9f0ed5ba --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/BaseAdminUpgradeabilityProxy.sol @@ -0,0 +1,125 @@ +pragma solidity 0.7.5; + +import './UpgradeabilityProxy.sol'; + +/** + * @title BaseAdminUpgradeabilityProxy + * @dev This contract combines an upgradeability proxy with an authorization + * mechanism for administrative tasks. + * All external functions in this contract must be guarded by the + * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity + * feature proposal that would enable this to be done automatically. + */ +contract BaseAdminUpgradeabilityProxy is BaseUpgradeabilityProxy { + /** + * @dev Emitted when the administration has been transferred. + * @param previousAdmin Address of the previous admin. + * @param newAdmin Address of the new admin. + */ + event AdminChanged(address previousAdmin, address newAdmin); + + /** + * @dev Storage slot with the admin of the contract. + * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is + * validated in the constructor. + */ + + bytes32 + internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; + + /** + * @dev Modifier to check whether the `msg.sender` is the admin. + * If it is, it will run the function. Otherwise, it will delegate the call + * to the implementation. + */ + modifier ifAdmin() { + if (msg.sender == _admin()) { + _; + } else { + _fallback(); + } + } + + /** + * @return The address of the proxy admin. + */ + function admin() external ifAdmin returns (address) { + return _admin(); + } + + /** + * @return The address of the implementation. + */ + function implementation() external ifAdmin returns (address) { + return _implementation(); + } + + /** + * @dev Changes the admin of the proxy. + * Only the current admin can call this function. + * @param newAdmin Address to transfer proxy administration to. + */ + function changeAdmin(address newAdmin) external ifAdmin { + require(newAdmin != address(0), 'Cannot change the admin of a proxy to the zero address'); + emit AdminChanged(_admin(), newAdmin); + _setAdmin(newAdmin); + } + + /** + * @dev Upgrade the backing implementation of the proxy. + * Only the admin can call this function. + * @param newImplementation Address of the new implementation. + */ + function upgradeTo(address newImplementation) external ifAdmin { + _upgradeTo(newImplementation); + } + + /** + * @dev Upgrade the backing implementation of the proxy and call a function + * on the new implementation. + * This is useful to initialize the proxied contract. + * @param newImplementation Address of the new implementation. + * @param data Data to send as msg.data in the low level call. + * It should include the signature and the parameters of the function to be called, as described in + * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. + */ + function upgradeToAndCall(address newImplementation, bytes calldata data) + external + payable + ifAdmin + { + _upgradeTo(newImplementation); + (bool success, ) = newImplementation.delegatecall(data); + require(success); + } + + /** + * @return adm The admin slot. + */ + function _admin() internal view returns (address adm) { + bytes32 slot = ADMIN_SLOT; + assembly { + adm := sload(slot) + } + } + + /** + * @dev Sets the address of the proxy admin. + * @param newAdmin Address of the new proxy admin. + */ + function _setAdmin(address newAdmin) internal { + bytes32 slot = ADMIN_SLOT; + + assembly { + sstore(slot, newAdmin) + } + } + + /** + * @dev Only fall back when the sender is not the admin. + */ + function _willFallback() internal virtual override { + require(msg.sender != _admin(), 'Cannot call fallback function from the proxy admin'); + super._willFallback(); + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/BaseUpgradeabilityProxy.sol b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/BaseUpgradeabilityProxy.sol new file mode 100644 index 00000000000..1ef3e757fd3 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/BaseUpgradeabilityProxy.sol @@ -0,0 +1,63 @@ +pragma solidity 0.7.5; + +import './Proxy.sol'; +import './Address.sol'; + +/** + * @title BaseUpgradeabilityProxy + * @dev This contract implements a proxy that allows to change the + * implementation address to which it will delegate. + * Such a change is called an implementation upgrade. + */ +contract BaseUpgradeabilityProxy is Proxy { + /** + * @dev Emitted when the implementation is upgraded. + * @param implementation Address of the new implementation. + */ + event Upgraded(address indexed implementation); + + /** + * @dev Storage slot with the address of the current implementation. + * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is + * validated in the constructor. + */ + bytes32 + internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; + + /** + * @dev Returns the current implementation. + * @return impl Address of the current implementation + */ + function _implementation() internal override view returns (address impl) { + bytes32 slot = IMPLEMENTATION_SLOT; + assembly { + impl := sload(slot) + } + } + + /** + * @dev Upgrades the proxy to a new implementation. + * @param newImplementation Address of the new implementation. + */ + function _upgradeTo(address newImplementation) internal { + _setImplementation(newImplementation); + emit Upgraded(newImplementation); + } + + /** + * @dev Sets the implementation address of the proxy. + * @param newImplementation Address of the new implementation. + */ + function _setImplementation(address newImplementation) internal { + require( + Address.isContract(newImplementation), + 'Cannot set a proxy implementation to a non-contract address' + ); + + bytes32 slot = IMPLEMENTATION_SLOT; + + assembly { + sstore(slot, newImplementation) + } + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/Context.sol b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/Context.sol new file mode 100644 index 00000000000..19c265f4283 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/Context.sol @@ -0,0 +1,23 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.7.5; + +/* + * @dev Provides information about the current execution context, including the + * sender of the transaction and its data. While these are generally available + * via msg.sender and msg.data, they should not be accessed in such a direct + * manner, since when dealing with GSN meta-transactions the account sending and + * paying for execution may not be the actual sender (as far as an application + * is concerned). + * + * This contract is only required for intermediate, library-like contracts. + */ +abstract contract Context { + function _msgSender() internal view virtual returns (address payable) { + return msg.sender; + } + + function _msgData() internal view virtual returns (bytes memory) { + this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 + return msg.data; + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/InitializableAdminUpgradeabilityProxy.sol b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/InitializableAdminUpgradeabilityProxy.sol new file mode 100644 index 00000000000..4a5fb1a2685 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/InitializableAdminUpgradeabilityProxy.sol @@ -0,0 +1,42 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; + +import './BaseAdminUpgradeabilityProxy.sol'; +import './InitializableUpgradeabilityProxy.sol'; + +/** + * @title InitializableAdminUpgradeabilityProxy + * @dev Extends from BaseAdminUpgradeabilityProxy with an initializer for + * initializing the implementation, admin, and init data. + */ +contract InitializableAdminUpgradeabilityProxy is + BaseAdminUpgradeabilityProxy, + InitializableUpgradeabilityProxy +{ + /** + * Contract initializer. + * @param _logic address of the initial implementation. + * @param _admin Address of the proxy administrator. + * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. + * It should include the signature and the parameters of the function to be called, as described in + * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. + * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. + */ + function initialize( + address _logic, + address _admin, + bytes memory _data + ) public payable { + require(_implementation() == address(0)); + InitializableUpgradeabilityProxy.initialize(_logic, _data); + assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); + _setAdmin(_admin); + } + + /** + * @dev Only fall back when the sender is not the admin. + */ + function _willFallback() internal override(BaseAdminUpgradeabilityProxy, Proxy) { + BaseAdminUpgradeabilityProxy._willFallback(); + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/InitializableUpgradeabilityProxy.sol b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/InitializableUpgradeabilityProxy.sol new file mode 100644 index 00000000000..563f33f811b --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/InitializableUpgradeabilityProxy.sol @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; + +import './BaseUpgradeabilityProxy.sol'; + +/** + * @title InitializableUpgradeabilityProxy + * @dev Extends BaseUpgradeabilityProxy with an initializer for initializing + * implementation and init data. + */ +contract InitializableUpgradeabilityProxy is BaseUpgradeabilityProxy { + /** + * @dev Contract initializer. + * @param _logic Address of the initial implementation. + * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. + * It should include the signature and the parameters of the function to be called, as described in + * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. + * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. + */ + function initialize(address _logic, bytes memory _data) public payable { + require(_implementation() == address(0)); + assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); + _setImplementation(_logic); + if (_data.length > 0) { + (bool success, ) = _logic.delegatecall(_data); + require(success); + } + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/Ownable.sol b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/Ownable.sol new file mode 100644 index 00000000000..26e37f785fc --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/Ownable.sol @@ -0,0 +1,68 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.7.5; + +import './Context.sol'; + +/** + * @dev Contract module which provides a basic access control mechanism, where + * there is an account (an owner) that can be granted exclusive access to + * specific functions. + * + * By default, the owner account will be the one that deploys the contract. This + * can later be changed with {transferOwnership}. + * + * This module is used through inheritance. It will make available the modifier + * `onlyOwner`, which can be applied to your functions to restrict their use to + * the owner. + */ +contract Ownable is Context { + address private _owner; + + event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); + + /** + * @dev Initializes the contract setting the deployer as the initial owner. + */ + constructor() { + address msgSender = _msgSender(); + _owner = msgSender; + emit OwnershipTransferred(address(0), msgSender); + } + + /** + * @dev Returns the address of the current owner. + */ + function owner() public view returns (address) { + return _owner; + } + + /** + * @dev Throws if called by any account other than the owner. + */ + modifier onlyOwner() { + require(_owner == _msgSender(), 'Ownable: caller is not the owner'); + _; + } + + /** + * @dev Leaves the contract without owner. It will not be possible to call + * `onlyOwner` functions anymore. Can only be called by the current owner. + * + * NOTE: Renouncing ownership will leave the contract without an owner, + * thereby removing any functionality that is only available to the owner. + */ + function renounceOwnership() public virtual onlyOwner { + emit OwnershipTransferred(_owner, address(0)); + _owner = address(0); + } + + /** + * @dev Transfers ownership of the contract to a new account (`newOwner`). + * Can only be called by the current owner. + */ + function transferOwnership(address newOwner) public virtual onlyOwner { + require(newOwner != address(0), 'Ownable: new owner is the zero address'); + emit OwnershipTransferred(_owner, newOwner); + _owner = newOwner; + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/Proxy.sol b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/Proxy.sol new file mode 100644 index 00000000000..83b0bf6958c --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/Proxy.sol @@ -0,0 +1,70 @@ +pragma solidity 0.7.5; + +/** + * @title Proxy + * @dev Implements delegation of calls to other contracts, with proper + * forwarding of return values and bubbling of failures. + * It defines a fallback function that delegates all calls to the address + * returned by the abstract _implementation() internal function. + */ +abstract contract Proxy { + /** + * @dev Fallback function. + * Implemented entirely in `_fallback`. + */ + fallback() external payable { + _fallback(); + } + + /** + * @return The Address of the implementation. + */ + function _implementation() internal virtual view returns (address); + + /** + * @dev Delegates execution to an implementation contract. + * This is a low level function that doesn't return to its internal call site. + * It will return to the external caller whatever the implementation returns. + * @param implementation Address to delegate. + */ + function _delegate(address implementation) internal { + assembly { + // Copy msg.data. We take full control of memory in this inline assembly + // block because it will not return to Solidity code. We overwrite the + // Solidity scratch pad at memory position 0. + calldatacopy(0, 0, calldatasize()) + + // Call the implementation. + // out and outsize are 0 because we don't know the size yet. + let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) + + // Copy the returned data. + returndatacopy(0, 0, returndatasize()) + + switch result + // delegatecall returns 0 on error. + case 0 { + revert(0, returndatasize()) + } + default { + return(0, returndatasize()) + } + } + } + + /** + * @dev Function that is run as the first thing in the fallback function. + * Can be redefined in derived contracts to add functionality. + * Redefinitions must call super._willFallback(). + */ + function _willFallback() internal virtual {} + + /** + * @dev fallback implementation. + * Extracted to enable manual triggering. + */ + function _fallback() internal { + _willFallback(); + _delegate(_implementation()); + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/SafeMath.sol b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/SafeMath.sol new file mode 100644 index 00000000000..f044c25120e --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/SafeMath.sol @@ -0,0 +1,163 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.7.5; + +/** + * @dev Wrappers over Solidity's arithmetic operations with added overflow + * checks. + * + * Arithmetic operations in Solidity wrap on overflow. This can easily result + * in bugs, because programmers usually assume that an overflow raises an + * error, which is the standard behavior in high level programming languages. + * `SafeMath` restores this intuition by reverting the transaction when an + * operation overflows. + * + * Using this library instead of the unchecked operations eliminates an entire + * class of bugs, so it's recommended to use it always. + */ +library SafeMath { + /** + * @dev Returns the addition of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `+` operator. + * + * Requirements: + * - Addition cannot overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, 'SafeMath: addition overflow'); + + return c; + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * - Subtraction cannot overflow. + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + return sub(a, b, 'SafeMath: subtraction overflow'); + } + + /** + * @dev Returns the subtraction of two unsigned integers, reverting with custom message on + * overflow (when the result is negative). + * + * Counterpart to Solidity's `-` operator. + * + * Requirements: + * - Subtraction cannot overflow. + */ + function sub( + uint256 a, + uint256 b, + string memory errorMessage + ) internal pure returns (uint256) { + require(b <= a, errorMessage); + uint256 c = a - b; + + return c; + } + + /** + * @dev Returns the multiplication of two unsigned integers, reverting on + * overflow. + * + * Counterpart to Solidity's `*` operator. + * + * Requirements: + * - Multiplication cannot overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 + if (a == 0) { + return 0; + } + + uint256 c = a * b; + require(c / a == b, 'SafeMath: multiplication overflow'); + + return c; + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + return div(a, b, 'SafeMath: division by zero'); + } + + /** + * @dev Returns the integer division of two unsigned integers. Reverts with custom message on + * division by zero. The result is rounded towards zero. + * + * Counterpart to Solidity's `/` operator. Note: this function uses a + * `revert` opcode (which leaves remaining gas untouched) while Solidity + * uses an invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function div( + uint256 a, + uint256 b, + string memory errorMessage + ) internal pure returns (uint256) { + // Solidity only automatically asserts when dividing by 0 + require(b > 0, errorMessage); + uint256 c = a / b; + // assert(a == b * c + a % b); // There is no case in which this doesn't hold + + return c; + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + return mod(a, b, 'SafeMath: modulo by zero'); + } + + /** + * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), + * Reverts with custom message when dividing by zero. + * + * Counterpart to Solidity's `%` operator. This function uses a `revert` + * opcode (which leaves remaining gas untouched) while Solidity uses an + * invalid opcode to revert (consuming all remaining gas). + * + * Requirements: + * - The divisor cannot be zero. + */ + function mod( + uint256 a, + uint256 b, + string memory errorMessage + ) internal pure returns (uint256) { + require(b != 0, errorMessage); + return a % b; + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/UpgradeabilityProxy.sol b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/UpgradeabilityProxy.sol new file mode 100644 index 00000000000..9ecc837e646 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/dependencies/open-zeppelin/UpgradeabilityProxy.sol @@ -0,0 +1,27 @@ +pragma solidity 0.7.5; + +import './BaseUpgradeabilityProxy.sol'; + +/** + * @title UpgradeabilityProxy + * @dev Extends BaseUpgradeabilityProxy with a constructor for initializing + * implementation and init data. + */ +contract UpgradeabilityProxy is BaseUpgradeabilityProxy { + /** + * @dev Contract constructor. + * @param _logic Address of the initial implementation. + * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. + * It should include the signature and the parameters of the function to be called, as described in + * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. + * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. + */ + constructor(address _logic, bytes memory _data) public payable { + assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); + _setImplementation(_logic); + if (_data.length > 0) { + (bool success, ) = _logic.delegatecall(_data); + require(success); + } + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/governance/AaveGovernanceV2.sol b/packages/chain-events/eth/contracts/AAVE/governance/AaveGovernanceV2.sol new file mode 100644 index 00000000000..60449d3ad51 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/governance/AaveGovernanceV2.sol @@ -0,0 +1,500 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +import {IVotingStrategy} from '../interfaces/IVotingStrategy.sol'; +import {IExecutorWithTimelock} from '../interfaces/IExecutorWithTimelock.sol'; +import {IProposalValidator} from '../interfaces/IProposalValidator.sol'; +import {IGovernanceStrategy} from '../interfaces/IGovernanceStrategy.sol'; +import {IAaveGovernanceV2} from '../interfaces/IAaveGovernanceV2.sol'; +import {Ownable} from '../dependencies/open-zeppelin/Ownable.sol'; +import {SafeMath} from '../dependencies/open-zeppelin/SafeMath.sol'; +import {isContract, getChainId} from '../misc/Helpers.sol'; + +/** + * @title Governance V2 contract + * @dev Main point of interaction with Aave protocol's governance + * - Create a Proposal + * - Cancel a Proposal + * - Queue a Proposal + * - Execute a Proposal + * - Submit Vote to a Proposal + * Proposal States : Pending => Active => Succeeded(/Failed) => Queued => Executed(/Expired) + * The transition to "Canceled" can appear in multiple states + * @author Aave + **/ +contract AaveGovernanceV2 is Ownable, IAaveGovernanceV2 { + using SafeMath for uint256; + + address private _governanceStrategy; + uint256 private _votingDelay; + + uint256 private _proposalsCount; + mapping(uint256 => Proposal) private _proposals; + mapping(address => bool) private _authorizedExecutors; + + address private _guardian; + + bytes32 public constant DOMAIN_TYPEHASH = keccak256( + 'EIP712Domain(string name,uint256 chainId,address verifyingContract)' + ); + bytes32 public constant VOTE_EMITTED_TYPEHASH = keccak256('VoteEmitted(uint256 id,bool support)'); + string public constant NAME = 'Aave Governance v2'; + + modifier onlyGuardian() { + require(msg.sender == _guardian, 'ONLY_BY_GUARDIAN'); + _; + } + + constructor( + address governanceStrategy, + uint256 votingDelay, + address guardian, + address[] memory executors + ) { + _setGovernanceStrategy(governanceStrategy); + _setVotingDelay(votingDelay); + _guardian = guardian; + + authorizeExecutors(executors); + } + + struct CreateVars { + uint256 startBlock; + uint256 endBlock; + uint256 previousProposalsCount; + } + + /** + * @dev Creates a Proposal (needs to be validated by the Proposal Validator) + * @param executor The ExecutorWithTimelock contract that will execute the proposal + * @param targets list of contracts called by proposal's associated transactions + * @param values list of value in wei for each propoposal's associated transaction + * @param signatures list of function signatures (can be empty) to be used when created the callData + * @param calldatas list of calldatas: if associated signature empty, calldata ready, else calldata is arguments + * @param withDelegatecalls boolean, true = transaction delegatecalls the taget, else calls the target + * @param ipfsHash IPFS hash of the proposal + **/ + function create( + IExecutorWithTimelock executor, + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas, + bool[] memory withDelegatecalls, + bytes32 ipfsHash + ) external override returns (uint256) { + require(targets.length != 0, 'INVALID_EMPTY_TARGETS'); + require( + targets.length == values.length && + targets.length == signatures.length && + targets.length == calldatas.length && + targets.length == withDelegatecalls.length, + 'INCONSISTENT_PARAMS_LENGTH' + ); + + require(isExecutorAuthorized(address(executor)), 'EXECUTOR_NOT_AUTHORIZED'); + + require( + IProposalValidator(address(executor)).validateCreatorOfProposal( + this, + msg.sender, + block.number - 1 + ), + 'PROPOSITION_CREATION_INVALID' + ); + + CreateVars memory vars; + + vars.startBlock = block.number.add(_votingDelay); + vars.endBlock = vars.startBlock.add(IProposalValidator(address(executor)).VOTING_DURATION()); + + vars.previousProposalsCount = _proposalsCount; + + Proposal storage newProposal = _proposals[vars.previousProposalsCount]; + newProposal.id = vars.previousProposalsCount; + newProposal.creator = msg.sender; + newProposal.executor = executor; + newProposal.targets = targets; + newProposal.values = values; + newProposal.signatures = signatures; + newProposal.calldatas = calldatas; + newProposal.withDelegatecalls = withDelegatecalls; + newProposal.startBlock = vars.startBlock; + newProposal.endBlock = vars.endBlock; + newProposal.strategy = _governanceStrategy; + newProposal.ipfsHash = ipfsHash; + _proposalsCount++; + + emit ProposalCreated( + vars.previousProposalsCount, + msg.sender, + executor, + targets, + values, + signatures, + calldatas, + withDelegatecalls, + vars.startBlock, + vars.endBlock, + _governanceStrategy, + ipfsHash + ); + + return newProposal.id; + } + + /** + * @dev Cancels a Proposal. + * - Callable by the _guardian with relaxed conditions, or by anybody if the conditions of + * cancellation on the executor are fulfilled + * @param proposalId id of the proposal + **/ + function cancel(uint256 proposalId) external override { + ProposalState state = getProposalState(proposalId); + require( + state != ProposalState.Executed && + state != ProposalState.Canceled && + state != ProposalState.Expired, + 'ONLY_BEFORE_EXECUTED' + ); + + Proposal storage proposal = _proposals[proposalId]; + require( + msg.sender == _guardian || + IProposalValidator(address(proposal.executor)).validateProposalCancellation( + this, + proposal.creator, + block.number - 1 + ), + 'PROPOSITION_CANCELLATION_INVALID' + ); + proposal.canceled = true; + for (uint256 i = 0; i < proposal.targets.length; i++) { + proposal.executor.cancelTransaction( + proposal.targets[i], + proposal.values[i], + proposal.signatures[i], + proposal.calldatas[i], + proposal.executionTime, + proposal.withDelegatecalls[i] + ); + } + + emit ProposalCanceled(proposalId); + } + + /** + * @dev Queue the proposal (If Proposal Succeeded) + * @param proposalId id of the proposal to queue + **/ + function queue(uint256 proposalId) external override { + require(getProposalState(proposalId) == ProposalState.Succeeded, 'INVALID_STATE_FOR_QUEUE'); + Proposal storage proposal = _proposals[proposalId]; + uint256 executionTime = block.timestamp.add(proposal.executor.getDelay()); + for (uint256 i = 0; i < proposal.targets.length; i++) { + _queueOrRevert( + proposal.executor, + proposal.targets[i], + proposal.values[i], + proposal.signatures[i], + proposal.calldatas[i], + executionTime, + proposal.withDelegatecalls[i] + ); + } + proposal.executionTime = executionTime; + + emit ProposalQueued(proposalId, executionTime, msg.sender); + } + + /** + * @dev Execute the proposal (If Proposal Queued) + * @param proposalId id of the proposal to execute + **/ + function execute(uint256 proposalId) external payable override { + require(getProposalState(proposalId) == ProposalState.Queued, 'ONLY_QUEUED_PROPOSALS'); + Proposal storage proposal = _proposals[proposalId]; + proposal.executed = true; + for (uint256 i = 0; i < proposal.targets.length; i++) { + proposal.executor.executeTransaction{value: proposal.values[i]}( + proposal.targets[i], + proposal.values[i], + proposal.signatures[i], + proposal.calldatas[i], + proposal.executionTime, + proposal.withDelegatecalls[i] + ); + } + emit ProposalExecuted(proposalId, msg.sender); + } + + /** + * @dev Function allowing msg.sender to vote for/against a proposal + * @param proposalId id of the proposal + * @param support boolean, true = vote for, false = vote against + **/ + function submitVote(uint256 proposalId, bool support) external override { + return _submitVote(msg.sender, proposalId, support); + } + + /** + * @dev Function to register the vote of user that has voted offchain via signature + * @param proposalId id of the proposal + * @param support boolean, true = vote for, false = vote against + * @param v v part of the voter signature + * @param r r part of the voter signature + * @param s s part of the voter signature + **/ + function submitVoteBySignature( + uint256 proposalId, + bool support, + uint8 v, + bytes32 r, + bytes32 s + ) external override { + bytes32 digest = keccak256( + abi.encodePacked( + '\x19\x01', + keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(NAME)), getChainId(), address(this))), + keccak256(abi.encode(VOTE_EMITTED_TYPEHASH, proposalId, support)) + ) + ); + address signer = ecrecover(digest, v, r, s); + require(signer != address(0), 'INVALID_SIGNATURE'); + return _submitVote(signer, proposalId, support); + } + + /** + * @dev Set new GovernanceStrategy + * Note: owner should be a timelocked executor, so needs to make a proposal + * @param governanceStrategy new Address of the GovernanceStrategy contract + **/ + function setGovernanceStrategy(address governanceStrategy) external override onlyOwner { + _setGovernanceStrategy(governanceStrategy); + } + + /** + * @dev Set new Voting Delay (delay before a newly created proposal can be voted on) + * Note: owner should be a timelocked executor, so needs to make a proposal + * @param votingDelay new voting delay in terms of blocks + **/ + function setVotingDelay(uint256 votingDelay) external override onlyOwner { + _setVotingDelay(votingDelay); + } + + /** + * @dev Add new addresses to the list of authorized executors + * @param executors list of new addresses to be authorized executors + **/ + function authorizeExecutors(address[] memory executors) public override onlyOwner { + for (uint256 i = 0; i < executors.length; i++) { + _authorizeExecutor(executors[i]); + } + } + + /** + * @dev Remove addresses to the list of authorized executors + * @param executors list of addresses to be removed as authorized executors + **/ + function unauthorizeExecutors(address[] memory executors) public override onlyOwner { + for (uint256 i = 0; i < executors.length; i++) { + _unauthorizeExecutor(executors[i]); + } + } + + /** + * @dev Let the guardian abdicate from its priviledged rights + **/ + function __abdicate() external override onlyGuardian { + _guardian = address(0); + } + + /** + * @dev Getter of the current GovernanceStrategy address + * @return The address of the current GovernanceStrategy contracts + **/ + function getGovernanceStrategy() external view override returns (address) { + return _governanceStrategy; + } + + /** + * @dev Getter of the current Voting Delay (delay before a created proposal can be voted on) + * Different from the voting duration + * @return The voting delay in number of blocks + **/ + function getVotingDelay() external view override returns (uint256) { + return _votingDelay; + } + + /** + * @dev Returns whether an address is an authorized executor + * @param executor address to evaluate as authorized executor + * @return true if authorized + **/ + function isExecutorAuthorized(address executor) public view override returns (bool) { + return _authorizedExecutors[executor]; + } + + /** + * @dev Getter the address of the guardian, that can mainly cancel proposals + * @return The address of the guardian + **/ + function getGuardian() external view override returns (address) { + return _guardian; + } + + /** + * @dev Getter of the proposal count (the current number of proposals ever created) + * @return the proposal count + **/ + function getProposalsCount() external view override returns (uint256) { + return _proposalsCount; + } + + /** + * @dev Getter of a proposal by id + * @param proposalId id of the proposal to get + * @return the proposal as ProposalWithoutVotes memory object + **/ + function getProposalById(uint256 proposalId) + external + view + override + returns (ProposalWithoutVotes memory) + { + Proposal storage proposal = _proposals[proposalId]; + ProposalWithoutVotes memory proposalWithoutVotes = ProposalWithoutVotes({ + id: proposal.id, + creator: proposal.creator, + executor: proposal.executor, + targets: proposal.targets, + values: proposal.values, + signatures: proposal.signatures, + calldatas: proposal.calldatas, + withDelegatecalls: proposal.withDelegatecalls, + startBlock: proposal.startBlock, + endBlock: proposal.endBlock, + executionTime: proposal.executionTime, + forVotes: proposal.forVotes, + againstVotes: proposal.againstVotes, + executed: proposal.executed, + canceled: proposal.canceled, + strategy: proposal.strategy, + ipfsHash: proposal.ipfsHash + }); + + return proposalWithoutVotes; + } + + /** + * @dev Getter of the Vote of a voter about a proposal + * Note: Vote is a struct: ({bool support, uint248 votingPower}) + * @param proposalId id of the proposal + * @param voter address of the voter + * @return The associated Vote memory object + **/ + function getVoteOnProposal(uint256 proposalId, address voter) + external + view + override + returns (Vote memory) + { + return _proposals[proposalId].votes[voter]; + } + + /** + * @dev Get the current state of a proposal + * @param proposalId id of the proposal + * @return The current state if the proposal + **/ + function getProposalState(uint256 proposalId) public view override returns (ProposalState) { + require(_proposalsCount >= proposalId, 'INVALID_PROPOSAL_ID'); + Proposal storage proposal = _proposals[proposalId]; + if (proposal.canceled) { + return ProposalState.Canceled; + } else if (block.number <= proposal.startBlock) { + return ProposalState.Pending; + } else if (block.number <= proposal.endBlock) { + return ProposalState.Active; + } else if (!IProposalValidator(address(proposal.executor)).isProposalPassed(this, proposalId)) { + return ProposalState.Failed; + } else if (proposal.executionTime == 0) { + return ProposalState.Succeeded; + } else if (proposal.executed) { + return ProposalState.Executed; + } else if (proposal.executor.isProposalOverGracePeriod(this, proposalId)) { + return ProposalState.Expired; + } else { + return ProposalState.Queued; + } + } + + function _queueOrRevert( + IExecutorWithTimelock executor, + address target, + uint256 value, + string memory signature, + bytes memory callData, + uint256 executionTime, + bool withDelegatecall + ) internal { + require( + !executor.isActionQueued( + keccak256(abi.encode(target, value, signature, callData, executionTime, withDelegatecall)) + ), + 'DUPLICATED_ACTION' + ); + executor.queueTransaction(target, value, signature, callData, executionTime, withDelegatecall); + } + + function _submitVote( + address voter, + uint256 proposalId, + bool support + ) internal { + require(getProposalState(proposalId) == ProposalState.Active, 'VOTING_CLOSED'); + Proposal storage proposal = _proposals[proposalId]; + Vote storage vote = proposal.votes[voter]; + + require(vote.votingPower == 0, 'VOTE_ALREADY_SUBMITTED'); + + uint256 votingPower = IVotingStrategy(proposal.strategy).getVotingPowerAt( + voter, + proposal.startBlock + ); + + if (support) { + proposal.forVotes = proposal.forVotes.add(votingPower); + } else { + proposal.againstVotes = proposal.againstVotes.add(votingPower); + } + + vote.support = support; + vote.votingPower = uint248(votingPower); + + emit VoteEmitted(proposalId, voter, support, votingPower); + } + + function _setGovernanceStrategy(address governanceStrategy) internal { + _governanceStrategy = governanceStrategy; + + emit GovernanceStrategyChanged(governanceStrategy, msg.sender); + } + + function _setVotingDelay(uint256 votingDelay) internal { + _votingDelay = votingDelay; + + emit VotingDelayChanged(votingDelay, msg.sender); + } + + function _authorizeExecutor(address executor) internal { + _authorizedExecutors[executor] = true; + emit ExecutorAuthorized(executor); + } + + function _unauthorizeExecutor(address executor) internal { + _authorizedExecutors[executor] = false; + emit ExecutorUnauthorized(executor); + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/governance/Executor.sol b/packages/chain-events/eth/contracts/AAVE/governance/Executor.sol new file mode 100644 index 00000000000..9aca4d65f99 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/governance/Executor.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +import {ExecutorWithTimelock} from './ExecutorWithTimelock.sol'; +import {ProposalValidator} from './ProposalValidator.sol'; + +/** + * @title Time Locked, Validator, Executor Contract + * @dev Contract + * - Validate Proposal creations/ cancellation + * - Validate Vote Quorum and Vote success on proposal + * - Queue, Execute, Cancel, successful proposals' transactions. + * @author Aave + **/ +contract Executor is ExecutorWithTimelock, ProposalValidator { + constructor( + address admin, + uint256 delay, + uint256 gracePeriod, + uint256 minimumDelay, + uint256 maximumDelay, + uint256 propositionThreshold, + uint256 voteDuration, + uint256 voteDifferential, + uint256 minimumQuorum + ) + ExecutorWithTimelock(admin, delay, gracePeriod, minimumDelay, maximumDelay) + ProposalValidator(propositionThreshold, voteDuration, voteDifferential, minimumQuorum) + {} +} diff --git a/packages/chain-events/eth/contracts/AAVE/governance/ExecutorWithTimelock.sol b/packages/chain-events/eth/contracts/AAVE/governance/ExecutorWithTimelock.sol new file mode 100644 index 00000000000..29cdadf65e4 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/governance/ExecutorWithTimelock.sol @@ -0,0 +1,287 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +import {IExecutorWithTimelock} from '../interfaces/IExecutorWithTimelock.sol'; +import {IAaveGovernanceV2} from '../interfaces/IAaveGovernanceV2.sol'; +import {SafeMath} from '../dependencies/open-zeppelin/SafeMath.sol'; + +/** + * @title Time Locked Executor Contract, inherited by Aave Governance Executors + * @dev Contract that can queue, execute, cancel transactions voted by Governance + * Queued transactions can be executed after a delay and until + * Grace period is not over. + * @author Aave + **/ +contract ExecutorWithTimelock is IExecutorWithTimelock { + using SafeMath for uint256; + + uint256 public immutable override GRACE_PERIOD; + uint256 public immutable override MINIMUM_DELAY; + uint256 public immutable override MAXIMUM_DELAY; + + address private _admin; + address private _pendingAdmin; + uint256 private _delay; + + mapping(bytes32 => bool) private _queuedTransactions; + + /** + * @dev Constructor + * @param admin admin address, that can call the main functions, (Governance) + * @param delay minimum time between queueing and execution of proposal + * @param gracePeriod time after `delay` while a proposal can be executed + * @param minimumDelay lower threshold of `delay`, in seconds + * @param maximumDelay upper threhold of `delay`, in seconds + **/ + constructor( + address admin, + uint256 delay, + uint256 gracePeriod, + uint256 minimumDelay, + uint256 maximumDelay + ) { + require(delay >= minimumDelay, 'DELAY_SHORTER_THAN_MINIMUM'); + require(delay <= maximumDelay, 'DELAY_LONGER_THAN_MAXIMUM'); + _delay = delay; + _admin = admin; + + GRACE_PERIOD = gracePeriod; + MINIMUM_DELAY = minimumDelay; + MAXIMUM_DELAY = maximumDelay; + + emit NewDelay(delay); + emit NewAdmin(admin); + } + + modifier onlyAdmin() { + require(msg.sender == _admin, 'ONLY_BY_ADMIN'); + _; + } + + modifier onlyTimelock() { + require(msg.sender == address(this), 'ONLY_BY_THIS_TIMELOCK'); + _; + } + + modifier onlyPendingAdmin() { + require(msg.sender == _pendingAdmin, 'ONLY_BY_PENDING_ADMIN'); + _; + } + + /** + * @dev Set the delay + * @param delay delay between queue and execution of proposal + **/ + function setDelay(uint256 delay) public onlyTimelock { + _validateDelay(delay); + _delay = delay; + + emit NewDelay(delay); + } + + /** + * @dev Function enabling pending admin to become admin + **/ + function acceptAdmin() public onlyPendingAdmin { + _admin = msg.sender; + _pendingAdmin = address(0); + + emit NewAdmin(msg.sender); + } + + /** + * @dev Setting a new pending admin (that can then become admin) + * Can only be called by this executor (i.e via proposal) + * @param newPendingAdmin address of the new admin + **/ + function setPendingAdmin(address newPendingAdmin) public onlyTimelock { + _pendingAdmin = newPendingAdmin; + + emit NewPendingAdmin(newPendingAdmin); + } + + /** + * @dev Function, called by Governance, that queue a transaction, returns action hash + * @param target smart contract target + * @param value wei value of the transaction + * @param signature function signature of the transaction + * @param data function arguments of the transaction or callData if signature empty + * @param executionTime time at which to execute the transaction + * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target + * @return the action Hash + **/ + function queueTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 executionTime, + bool withDelegatecall + ) public override onlyAdmin returns (bytes32) { + require(executionTime >= block.timestamp.add(_delay), 'EXECUTION_TIME_UNDERESTIMATED'); + + bytes32 actionHash = keccak256( + abi.encode(target, value, signature, data, executionTime, withDelegatecall) + ); + _queuedTransactions[actionHash] = true; + + emit QueuedAction(actionHash, target, value, signature, data, executionTime, withDelegatecall); + return actionHash; + } + + /** + * @dev Function, called by Governance, that cancels a transaction, returns action hash + * @param target smart contract target + * @param value wei value of the transaction + * @param signature function signature of the transaction + * @param data function arguments of the transaction or callData if signature empty + * @param executionTime time at which to execute the transaction + * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target + * @return the action Hash of the canceled tx + **/ + function cancelTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 executionTime, + bool withDelegatecall + ) public override onlyAdmin returns (bytes32) { + bytes32 actionHash = keccak256( + abi.encode(target, value, signature, data, executionTime, withDelegatecall) + ); + _queuedTransactions[actionHash] = false; + + emit CancelledAction( + actionHash, + target, + value, + signature, + data, + executionTime, + withDelegatecall + ); + return actionHash; + } + + /** + * @dev Function, called by Governance, that cancels a transaction, returns the callData executed + * @param target smart contract target + * @param value wei value of the transaction + * @param signature function signature of the transaction + * @param data function arguments of the transaction or callData if signature empty + * @param executionTime time at which to execute the transaction + * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target + * @return the callData executed as memory bytes + **/ + function executeTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 executionTime, + bool withDelegatecall + ) public payable override onlyAdmin returns (bytes memory) { + bytes32 actionHash = keccak256( + abi.encode(target, value, signature, data, executionTime, withDelegatecall) + ); + require(_queuedTransactions[actionHash], 'ACTION_NOT_QUEUED'); + require(block.timestamp >= executionTime, 'TIMELOCK_NOT_FINISHED'); + require(block.timestamp <= executionTime.add(GRACE_PERIOD), 'GRACE_PERIOD_FINISHED'); + + _queuedTransactions[actionHash] = false; + + bytes memory callData; + + if (bytes(signature).length == 0) { + callData = data; + } else { + callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data); + } + + bool success; + bytes memory resultData; + if (withDelegatecall) { + require(msg.value >= value, "NOT_ENOUGH_MSG_VALUE"); + // solium-disable-next-line security/no-call-value + (success, resultData) = target.delegatecall(callData); + } else { + // solium-disable-next-line security/no-call-value + (success, resultData) = target.call{value: value}(callData); + } + + require(success, 'FAILED_ACTION_EXECUTION'); + + emit ExecutedAction( + actionHash, + target, + value, + signature, + data, + executionTime, + withDelegatecall, + resultData + ); + + return resultData; + } + + /** + * @dev Getter of the current admin address (should be governance) + * @return The address of the current admin + **/ + function getAdmin() external view override returns (address) { + return _admin; + } + + /** + * @dev Getter of the current pending admin address + * @return The address of the pending admin + **/ + function getPendingAdmin() external view override returns (address) { + return _pendingAdmin; + } + + /** + * @dev Getter of the delay between queuing and execution + * @return The delay in seconds + **/ + function getDelay() external view override returns (uint256) { + return _delay; + } + + /** + * @dev Returns whether an action (via actionHash) is queued + * @param actionHash hash of the action to be checked + * keccak256(abi.encode(target, value, signature, data, executionTime, withDelegatecall)) + * @return true if underlying action of actionHash is queued + **/ + function isActionQueued(bytes32 actionHash) external view override returns (bool) { + return _queuedTransactions[actionHash]; + } + + /** + * @dev Checks whether a proposal is over its grace period + * @param governance Governance contract + * @param proposalId Id of the proposal against which to test + * @return true of proposal is over grace period + **/ + function isProposalOverGracePeriod(IAaveGovernanceV2 governance, uint256 proposalId) + external + view + override + returns (bool) + { + IAaveGovernanceV2.ProposalWithoutVotes memory proposal = governance.getProposalById(proposalId); + + return (block.timestamp > proposal.executionTime.add(GRACE_PERIOD)); + } + + function _validateDelay(uint256 delay) internal view { + require(delay >= MINIMUM_DELAY, 'DELAY_SHORTER_THAN_MINIMUM'); + require(delay <= MAXIMUM_DELAY, 'DELAY_LONGER_THAN_MAXIMUM'); + } + + receive() external payable {} +} diff --git a/packages/chain-events/eth/contracts/AAVE/governance/GovernanceStrategy.sol b/packages/chain-events/eth/contracts/AAVE/governance/GovernanceStrategy.sol new file mode 100644 index 00000000000..31fb4dd5d9f --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/governance/GovernanceStrategy.sol @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +import {IGovernanceStrategy} from '../interfaces/IGovernanceStrategy.sol'; +import {IERC20} from '../interfaces/IERC20.sol'; +import {IGovernancePowerDelegationToken} from '../interfaces/IGovernancePowerDelegationToken.sol'; + +/** + * @title Governance Strategy contract + * @dev Smart contract containing logic to measure users' relative power to propose and vote. + * User Power = User Power from Aave Token + User Power from stkAave Token. + * User Power from Token = Token Power + Token Power as Delegatee [- Token Power if user has delegated] + * Two wrapper functions linked to Aave Tokens's GovernancePowerDelegationERC20.sol implementation + * - getPropositionPowerAt: fetching a user Proposition Power at a specified block + * - getVotingPowerAt: fetching a user Voting Power at a specified block + * @author Aave + **/ +contract GovernanceStrategy is IGovernanceStrategy { + address public immutable AAVE; + address public immutable STK_AAVE; + + /** + * @dev Constructor, register tokens used for Voting and Proposition Powers. + * @param aave The address of the AAVE Token contract. + * @param stkAave The address of the stkAAVE Token Contract + **/ + constructor(address aave, address stkAave) { + AAVE = aave; + STK_AAVE = stkAave; + } + + /** + * @dev Returns the total supply of Proposition Tokens Available for Governance + * = AAVE Available for governance + stkAAVE available + * The supply of AAVE staked in stkAAVE are not taken into account so: + * = (Supply of AAVE - AAVE in stkAAVE) + (Supply of stkAAVE) + * = Supply of AAVE, Since the supply of stkAAVE is equal to the number of AAVE staked + * @param blockNumber Blocknumber at which to evaluate + * @return total supply at blockNumber + **/ + function getTotalPropositionSupplyAt(uint256 blockNumber) public view override returns (uint256) { + return IERC20(AAVE).totalSupplyAt(blockNumber); + } + + /** + * @dev Returns the total supply of Outstanding Voting Tokens + * @param blockNumber Blocknumber at which to evaluate + * @return total supply at blockNumber + **/ + function getTotalVotingSupplyAt(uint256 blockNumber) public view override returns (uint256) { + return getTotalPropositionSupplyAt(blockNumber); + } + + /** + * @dev Returns the Proposition Power of a user at a specific block number. + * @param user Address of the user. + * @param blockNumber Blocknumber at which to fetch Proposition Power + * @return Power number + **/ + function getPropositionPowerAt(address user, uint256 blockNumber) + public + view + override + returns (uint256) + { + return + _getPowerByTypeAt(user, blockNumber, IGovernancePowerDelegationToken.DelegationType.PROPOSITION_POWER); + } + + /** + * @dev Returns the Vote Power of a user at a specific block number. + * @param user Address of the user. + * @param blockNumber Blocknumber at which to fetch Vote Power + * @return Vote number + **/ + function getVotingPowerAt(address user, uint256 blockNumber) + public + view + override + returns (uint256) + { + return _getPowerByTypeAt(user, blockNumber, IGovernancePowerDelegationToken.DelegationType.VOTING_POWER); + } + + function _getPowerByTypeAt( + address user, + uint256 blockNumber, + IGovernancePowerDelegationToken.DelegationType powerType + ) internal view returns (uint256) { + return + IGovernancePowerDelegationToken(AAVE).getPowerAtBlock(user, blockNumber, powerType) + + IGovernancePowerDelegationToken(STK_AAVE).getPowerAtBlock(user, blockNumber, powerType); + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/governance/ProposalValidator.sol b/packages/chain-events/eth/contracts/AAVE/governance/ProposalValidator.sol new file mode 100644 index 00000000000..41cfcb80d65 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/governance/ProposalValidator.sol @@ -0,0 +1,196 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +import {IAaveGovernanceV2} from '../interfaces/IAaveGovernanceV2.sol'; +import {IGovernanceStrategy} from '../interfaces/IGovernanceStrategy.sol'; +import {IProposalValidator} from '../interfaces/IProposalValidator.sol'; +import {SafeMath} from '../dependencies/open-zeppelin/SafeMath.sol'; + +/** + * @title Proposal Validator Contract, inherited by Aave Governance Executors + * @dev Validates/Invalidations propositions state modifications. + * Proposition Power functions: Validates proposition creations/ cancellation + * Voting Power functions: Validates success of propositions. + * @author Aave + **/ +contract ProposalValidator is IProposalValidator { + using SafeMath for uint256; + + uint256 public immutable override PROPOSITION_THRESHOLD; + uint256 public immutable override VOTING_DURATION; + uint256 public immutable override VOTE_DIFFERENTIAL; + uint256 public immutable override MINIMUM_QUORUM; + uint256 public constant override ONE_HUNDRED_WITH_PRECISION = 10000; // Equivalent to 100%, but scaled for precision + + /** + * @dev Constructor + * @param propositionThreshold minimum percentage of supply needed to submit a proposal + * - In ONE_HUNDRED_WITH_PRECISION units + * @param votingDuration duration in blocks of the voting period + * @param voteDifferential percentage of supply that `for` votes need to be over `against` + * in order for the proposal to pass + * - In ONE_HUNDRED_WITH_PRECISION units + * @param minimumQuorum minimum percentage of the supply in FOR-voting-power need for a proposal to pass + * - In ONE_HUNDRED_WITH_PRECISION units + **/ + constructor( + uint256 propositionThreshold, + uint256 votingDuration, + uint256 voteDifferential, + uint256 minimumQuorum + ) { + PROPOSITION_THRESHOLD = propositionThreshold; + VOTING_DURATION = votingDuration; + VOTE_DIFFERENTIAL = voteDifferential; + MINIMUM_QUORUM = minimumQuorum; + } + + /** + * @dev Called to validate a proposal (e.g when creating new proposal in Governance) + * @param governance Governance Contract + * @param user Address of the proposal creator + * @param blockNumber Block Number against which to make the test (e.g proposal creation block -1). + * @return boolean, true if can be created + **/ + function validateCreatorOfProposal( + IAaveGovernanceV2 governance, + address user, + uint256 blockNumber + ) external view override returns (bool) { + return isPropositionPowerEnough(governance, user, blockNumber); + } + + /** + * @dev Called to validate the cancellation of a proposal + * Needs to creator to have lost proposition power threashold + * @param governance Governance Contract + * @param user Address of the proposal creator + * @param blockNumber Block Number against which to make the test (e.g proposal creation block -1). + * @return boolean, true if can be cancelled + **/ + function validateProposalCancellation( + IAaveGovernanceV2 governance, + address user, + uint256 blockNumber + ) external view override returns (bool) { + return !isPropositionPowerEnough(governance, user, blockNumber); + } + + /** + * @dev Returns whether a user has enough Proposition Power to make a proposal. + * @param governance Governance Contract + * @param user Address of the user to be challenged. + * @param blockNumber Block Number against which to make the challenge. + * @return true if user has enough power + **/ + function isPropositionPowerEnough( + IAaveGovernanceV2 governance, + address user, + uint256 blockNumber + ) public view override returns (bool) { + IGovernanceStrategy currentGovernanceStrategy = IGovernanceStrategy( + governance.getGovernanceStrategy() + ); + return + currentGovernanceStrategy.getPropositionPowerAt(user, blockNumber) >= + getMinimumPropositionPowerNeeded(governance, blockNumber); + } + + /** + * @dev Returns the minimum Proposition Power needed to create a proposition. + * @param governance Governance Contract + * @param blockNumber Blocknumber at which to evaluate + * @return minimum Proposition Power needed + **/ + function getMinimumPropositionPowerNeeded(IAaveGovernanceV2 governance, uint256 blockNumber) + public + view + override + returns (uint256) + { + IGovernanceStrategy currentGovernanceStrategy = IGovernanceStrategy( + governance.getGovernanceStrategy() + ); + return + currentGovernanceStrategy + .getTotalPropositionSupplyAt(blockNumber) + .mul(PROPOSITION_THRESHOLD) + .div(ONE_HUNDRED_WITH_PRECISION); + } + + /** + * @dev Returns whether a proposal passed or not + * @param governance Governance Contract + * @param proposalId Id of the proposal to set + * @return true if proposal passed + **/ + function isProposalPassed(IAaveGovernanceV2 governance, uint256 proposalId) + external + view + override + returns (bool) + { + return (isQuorumValid(governance, proposalId) && + isVoteDifferentialValid(governance, proposalId)); + } + + /** + * @dev Calculates the minimum amount of Voting Power needed for a proposal to Pass + * @param votingSupply Total number of oustanding voting tokens + * @return voting power needed for a proposal to pass + **/ + function getMinimumVotingPowerNeeded(uint256 votingSupply) + public + view + override + returns (uint256) + { + return votingSupply.mul(MINIMUM_QUORUM).div(ONE_HUNDRED_WITH_PRECISION); + } + + /** + * @dev Check whether a proposal has reached quorum, ie has enough FOR-voting-power + * Here quorum is not to understand as number of votes reached, but number of for-votes reached + * @param governance Governance Contract + * @param proposalId Id of the proposal to verify + * @return voting power needed for a proposal to pass + **/ + function isQuorumValid(IAaveGovernanceV2 governance, uint256 proposalId) + public + view + override + returns (bool) + { + IAaveGovernanceV2.ProposalWithoutVotes memory proposal = governance.getProposalById(proposalId); + uint256 votingSupply = IGovernanceStrategy(proposal.strategy).getTotalVotingSupplyAt( + proposal.startBlock + ); + + return proposal.forVotes >= getMinimumVotingPowerNeeded(votingSupply); + } + + /** + * @dev Check whether a proposal has enough extra FOR-votes than AGAINST-votes + * FOR VOTES - AGAINST VOTES > VOTE_DIFFERENTIAL * voting supply + * @param governance Governance Contract + * @param proposalId Id of the proposal to verify + * @return true if enough For-Votes + **/ + function isVoteDifferentialValid(IAaveGovernanceV2 governance, uint256 proposalId) + public + view + override + returns (bool) + { + IAaveGovernanceV2.ProposalWithoutVotes memory proposal = governance.getProposalById(proposalId); + uint256 votingSupply = IGovernanceStrategy(proposal.strategy).getTotalVotingSupplyAt( + proposal.startBlock + ); + + return (proposal.forVotes.mul(ONE_HUNDRED_WITH_PRECISION).div(votingSupply) > + proposal.againstVotes.mul(ONE_HUNDRED_WITH_PRECISION).div(votingSupply).add( + VOTE_DIFFERENTIAL + )); + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/interfaces/IAaveGovernanceV2.sol b/packages/chain-events/eth/contracts/AAVE/interfaces/IAaveGovernanceV2.sol new file mode 100644 index 00000000000..a4c8d86e8ee --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/interfaces/IAaveGovernanceV2.sol @@ -0,0 +1,270 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +import {IExecutorWithTimelock} from './IExecutorWithTimelock.sol'; + +interface IAaveGovernanceV2 { + enum ProposalState {Pending, Canceled, Active, Failed, Succeeded, Queued, Expired, Executed} + + struct Vote { + bool support; + uint248 votingPower; + } + + struct Proposal { + uint256 id; + address creator; + IExecutorWithTimelock executor; + address[] targets; + uint256[] values; + string[] signatures; + bytes[] calldatas; + bool[] withDelegatecalls; + uint256 startBlock; + uint256 endBlock; + uint256 executionTime; + uint256 forVotes; + uint256 againstVotes; + bool executed; + bool canceled; + address strategy; + bytes32 ipfsHash; + mapping(address => Vote) votes; + } + + struct ProposalWithoutVotes { + uint256 id; + address creator; + IExecutorWithTimelock executor; + address[] targets; + uint256[] values; + string[] signatures; + bytes[] calldatas; + bool[] withDelegatecalls; + uint256 startBlock; + uint256 endBlock; + uint256 executionTime; + uint256 forVotes; + uint256 againstVotes; + bool executed; + bool canceled; + address strategy; + bytes32 ipfsHash; + } + + /** + * @dev emitted when a new proposal is created + * @param id Id of the proposal + * @param creator address of the creator + * @param executor The ExecutorWithTimelock contract that will execute the proposal + * @param targets list of contracts called by proposal's associated transactions + * @param values list of value in wei for each propoposal's associated transaction + * @param signatures list of function signatures (can be empty) to be used when created the callData + * @param calldatas list of calldatas: if associated signature empty, calldata ready, else calldata is arguments + * @param withDelegatecalls boolean, true = transaction delegatecalls the taget, else calls the target + * @param startBlock block number when vote starts + * @param endBlock block number when vote ends + * @param strategy address of the governanceStrategy contract + * @param ipfsHash IPFS hash of the proposal + **/ + event ProposalCreated( + uint256 id, + address indexed creator, + IExecutorWithTimelock indexed executor, + address[] targets, + uint256[] values, + string[] signatures, + bytes[] calldatas, + bool[] withDelegatecalls, + uint256 startBlock, + uint256 endBlock, + address strategy, + bytes32 ipfsHash + ); + + /** + * @dev emitted when a proposal is canceled + * @param id Id of the proposal + **/ + event ProposalCanceled(uint256 id); + + /** + * @dev emitted when a proposal is queued + * @param id Id of the proposal + * @param executionTime time when proposal underlying transactions can be executed + * @param initiatorQueueing address of the initiator of the queuing transaction + **/ + event ProposalQueued(uint256 id, uint256 executionTime, address indexed initiatorQueueing); + /** + * @dev emitted when a proposal is executed + * @param id Id of the proposal + * @param initiatorExecution address of the initiator of the execution transaction + **/ + event ProposalExecuted(uint256 id, address indexed initiatorExecution); + /** + * @dev emitted when a vote is registered + * @param id Id of the proposal + * @param voter address of the voter + * @param support boolean, true = vote for, false = vote against + * @param votingPower Power of the voter/vote + **/ + event VoteEmitted(uint256 id, address indexed voter, bool support, uint256 votingPower); + + event GovernanceStrategyChanged(address indexed newStrategy, address indexed initiatorChange); + + event VotingDelayChanged(uint256 newVotingDelay, address indexed initiatorChange); + + event ExecutorAuthorized(address executor); + + event ExecutorUnauthorized(address executor); + + /** + * @dev Creates a Proposal (needs Proposition Power of creator > Threshold) + * @param executor The ExecutorWithTimelock contract that will execute the proposal + * @param targets list of contracts called by proposal's associated transactions + * @param values list of value in wei for each propoposal's associated transaction + * @param signatures list of function signatures (can be empty) to be used when created the callData + * @param calldatas list of calldatas: if associated signature empty, calldata ready, else calldata is arguments + * @param withDelegatecalls if true, transaction delegatecalls the taget, else calls the target + * @param ipfsHash IPFS hash of the proposal + **/ + function create( + IExecutorWithTimelock executor, + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas, + bool[] memory withDelegatecalls, + bytes32 ipfsHash + ) external returns (uint256); + + /** + * @dev Cancels a Proposal, + * either at anytime by guardian + * or when proposal is Pending/Active and threshold no longer reached + * @param proposalId id of the proposal + **/ + function cancel(uint256 proposalId) external; + + /** + * @dev Queue the proposal (If Proposal Succeeded) + * @param proposalId id of the proposal to queue + **/ + function queue(uint256 proposalId) external; + + /** + * @dev Execute the proposal (If Proposal Queued) + * @param proposalId id of the proposal to execute + **/ + function execute(uint256 proposalId) external payable; + + /** + * @dev Function allowing msg.sender to vote for/against a proposal + * @param proposalId id of the proposal + * @param support boolean, true = vote for, false = vote against + **/ + function submitVote(uint256 proposalId, bool support) external; + + /** + * @dev Function to register the vote of user that has voted offchain via signature + * @param proposalId id of the proposal + * @param support boolean, true = vote for, false = vote against + * @param v v part of the voter signature + * @param r r part of the voter signature + * @param s s part of the voter signature + **/ + function submitVoteBySignature( + uint256 proposalId, + bool support, + uint8 v, + bytes32 r, + bytes32 s + ) external; + + /** + * @dev Set new GovernanceStrategy + * Note: owner should be a timelocked executor, so needs to make a proposal + * @param governanceStrategy new Address of the GovernanceStrategy contract + **/ + function setGovernanceStrategy(address governanceStrategy) external; + + /** + * @dev Set new Voting Delay (delay before a newly created proposal can be voted on) + * Note: owner should be a timelocked executor, so needs to make a proposal + * @param votingDelay new voting delay in seconds + **/ + function setVotingDelay(uint256 votingDelay) external; + + /** + * @dev Add new addresses to the list of authorized executors + * @param executors list of new addresses to be authorized executors + **/ + function authorizeExecutors(address[] memory executors) external; + + /** + * @dev Remove addresses to the list of authorized executors + * @param executors list of addresses to be removed as authorized executors + **/ + function unauthorizeExecutors(address[] memory executors) external; + + /** + * @dev Let the guardian abdicate from its priviledged rights + **/ + function __abdicate() external; + + /** + * @dev Getter of the current GovernanceStrategy address + * @return The address of the current GovernanceStrategy contracts + **/ + function getGovernanceStrategy() external view returns (address); + + /** + * @dev Getter of the current Voting Delay (delay before a created proposal can be voted on) + * Different from the voting duration + * @return The voting delay in seconds + **/ + function getVotingDelay() external view returns (uint256); + + /** + * @dev Returns whether an address is an authorized executor + * @param executor address to evaluate as authorized executor + * @return true if authorized + **/ + function isExecutorAuthorized(address executor) external view returns (bool); + + /** + * @dev Getter the address of the guardian, that can mainly cancel proposals + * @return The address of the guardian + **/ + function getGuardian() external view returns (address); + + /** + * @dev Getter of the proposal count (the current number of proposals ever created) + * @return the proposal count + **/ + function getProposalsCount() external view returns (uint256); + + /** + * @dev Getter of a proposal by id + * @param proposalId id of the proposal to get + * @return the proposal as ProposalWithoutVotes memory object + **/ + function getProposalById(uint256 proposalId) external view returns (ProposalWithoutVotes memory); + + /** + * @dev Getter of the Vote of a voter about a proposal + * Note: Vote is a struct: ({bool support, uint248 votingPower}) + * @param proposalId id of the proposal + * @param voter address of the voter + * @return The associated Vote memory object + **/ + function getVoteOnProposal(uint256 proposalId, address voter) external view returns (Vote memory); + + /** + * @dev Get the current state of a proposal + * @param proposalId id of the proposal + * @return The current state if the proposal + **/ + function getProposalState(uint256 proposalId) external view returns (ProposalState); +} diff --git a/packages/chain-events/eth/contracts/AAVE/interfaces/IERC20.sol b/packages/chain-events/eth/contracts/AAVE/interfaces/IERC20.sol new file mode 100644 index 00000000000..40b56d02b60 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/interfaces/IERC20.sol @@ -0,0 +1,9 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +interface IERC20 { + function totalSupplyAt(uint256 blockNumber) external view returns (uint256); + + function balanceOf(address account) external view returns (uint256); +} diff --git a/packages/chain-events/eth/contracts/AAVE/interfaces/IExecutorWithTimelock.sol b/packages/chain-events/eth/contracts/AAVE/interfaces/IExecutorWithTimelock.sol new file mode 100644 index 00000000000..b3be8d20cec --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/interfaces/IExecutorWithTimelock.sol @@ -0,0 +1,185 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +import {IAaveGovernanceV2} from './IAaveGovernanceV2.sol'; + +interface IExecutorWithTimelock { + /** + * @dev emitted when a new pending admin is set + * @param newPendingAdmin address of the new pending admin + **/ + event NewPendingAdmin(address newPendingAdmin); + + /** + * @dev emitted when a new admin is set + * @param newAdmin address of the new admin + **/ + event NewAdmin(address newAdmin); + + /** + * @dev emitted when a new delay (between queueing and execution) is set + * @param delay new delay + **/ + event NewDelay(uint256 delay); + + /** + * @dev emitted when a new (trans)action is Queued. + * @param actionHash hash of the action + * @param target address of the targeted contract + * @param value wei value of the transaction + * @param signature function signature of the transaction + * @param data function arguments of the transaction or callData if signature empty + * @param executionTime time at which to execute the transaction + * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target + **/ + event QueuedAction( + bytes32 actionHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 executionTime, + bool withDelegatecall + ); + + /** + * @dev emitted when an action is Cancelled + * @param actionHash hash of the action + * @param target address of the targeted contract + * @param value wei value of the transaction + * @param signature function signature of the transaction + * @param data function arguments of the transaction or callData if signature empty + * @param executionTime time at which to execute the transaction + * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target + **/ + event CancelledAction( + bytes32 actionHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 executionTime, + bool withDelegatecall + ); + + /** + * @dev emitted when an action is Cancelled + * @param actionHash hash of the action + * @param target address of the targeted contract + * @param value wei value of the transaction + * @param signature function signature of the transaction + * @param data function arguments of the transaction or callData if signature empty + * @param executionTime time at which to execute the transaction + * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target + * @param resultData the actual callData used on the target + **/ + event ExecutedAction( + bytes32 actionHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 executionTime, + bool withDelegatecall, + bytes resultData + ); + /** + * @dev Getter of the current admin address (should be governance) + * @return The address of the current admin + **/ + function getAdmin() external view returns (address); + /** + * @dev Getter of the current pending admin address + * @return The address of the pending admin + **/ + function getPendingAdmin() external view returns (address); + /** + * @dev Getter of the delay between queuing and execution + * @return The delay in seconds + **/ + function getDelay() external view returns (uint256); + /** + * @dev Returns whether an action (via actionHash) is queued + * @param actionHash hash of the action to be checked + * keccak256(abi.encode(target, value, signature, data, executionTime, withDelegatecall)) + * @return true if underlying action of actionHash is queued + **/ + function isActionQueued(bytes32 actionHash) external view returns (bool); + /** + * @dev Checks whether a proposal is over its grace period + * @param governance Governance contract + * @param proposalId Id of the proposal against which to test + * @return true of proposal is over grace period + **/ + function isProposalOverGracePeriod(IAaveGovernanceV2 governance, uint256 proposalId) + external + view + returns (bool); + /** + * @dev Getter of grace period constant + * @return grace period in seconds + **/ + function GRACE_PERIOD() external view returns (uint256); + /** + * @dev Getter of minimum delay constant + * @return minimum delay in seconds + **/ + function MINIMUM_DELAY() external view returns (uint256); + /** + * @dev Getter of maximum delay constant + * @return maximum delay in seconds + **/ + function MAXIMUM_DELAY() external view returns (uint256); + /** + * @dev Function, called by Governance, that queue a transaction, returns action hash + * @param target smart contract target + * @param value wei value of the transaction + * @param signature function signature of the transaction + * @param data function arguments of the transaction or callData if signature empty + * @param executionTime time at which to execute the transaction + * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target + **/ + function queueTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 executionTime, + bool withDelegatecall + ) external returns (bytes32); + /** + * @dev Function, called by Governance, that cancels a transaction, returns the callData executed + * @param target smart contract target + * @param value wei value of the transaction + * @param signature function signature of the transaction + * @param data function arguments of the transaction or callData if signature empty + * @param executionTime time at which to execute the transaction + * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target + **/ + function executeTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 executionTime, + bool withDelegatecall + ) external payable returns (bytes memory); + /** + * @dev Function, called by Governance, that cancels a transaction, returns action hash + * @param target smart contract target + * @param value wei value of the transaction + * @param signature function signature of the transaction + * @param data function arguments of the transaction or callData if signature empty + * @param executionTime time at which to execute the transaction + * @param withDelegatecall boolean, true = transaction delegatecalls the target, else calls the target + **/ + function cancelTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 executionTime, + bool withDelegatecall + ) external returns (bytes32); +} diff --git a/packages/chain-events/eth/contracts/AAVE/interfaces/IGovernancePowerDelegationToken.sol b/packages/chain-events/eth/contracts/AAVE/interfaces/IGovernancePowerDelegationToken.sol new file mode 100644 index 00000000000..59ebffa34bc --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/interfaces/IGovernancePowerDelegationToken.sol @@ -0,0 +1,18 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +interface IGovernancePowerDelegationToken { + enum DelegationType {VOTING_POWER, PROPOSITION_POWER} + /** + * @dev get the power of a user at a specified block + * @param user address of the user + * @param blockNumber block number at which to get power + * @param delegationType delegation type (propose/vote) + **/ + function getPowerAtBlock( + address user, + uint256 blockNumber, + DelegationType delegationType + ) external view returns (uint256); +} diff --git a/packages/chain-events/eth/contracts/AAVE/interfaces/IGovernanceStrategy.sol b/packages/chain-events/eth/contracts/AAVE/interfaces/IGovernanceStrategy.sol new file mode 100644 index 00000000000..8c6ffee460a --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/interfaces/IGovernanceStrategy.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +interface IGovernanceStrategy { + /** + * @dev Returns the Proposition Power of a user at a specific block number. + * @param user Address of the user. + * @param blockNumber Blocknumber at which to fetch Proposition Power + * @return Power number + **/ + function getPropositionPowerAt(address user, uint256 blockNumber) external view returns (uint256); + /** + * @dev Returns the total supply of Outstanding Proposition Tokens + * @param blockNumber Blocknumber at which to evaluate + * @return total supply at blockNumber + **/ + function getTotalPropositionSupplyAt(uint256 blockNumber) external view returns (uint256); + /** + * @dev Returns the total supply of Outstanding Voting Tokens + * @param blockNumber Blocknumber at which to evaluate + * @return total supply at blockNumber + **/ + function getTotalVotingSupplyAt(uint256 blockNumber) external view returns (uint256); + /** + * @dev Returns the Vote Power of a user at a specific block number. + * @param user Address of the user. + * @param blockNumber Blocknumber at which to fetch Vote Power + * @return Vote number + **/ + function getVotingPowerAt(address user, uint256 blockNumber) external view returns (uint256); +} diff --git a/packages/chain-events/eth/contracts/AAVE/interfaces/IProposalValidator.sol b/packages/chain-events/eth/contracts/AAVE/interfaces/IProposalValidator.sol new file mode 100644 index 00000000000..4b995e8b3dc --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/interfaces/IProposalValidator.sol @@ -0,0 +1,132 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +import {IAaveGovernanceV2} from './IAaveGovernanceV2.sol'; + +interface IProposalValidator { + + /** + * @dev Called to validate a proposal (e.g when creating new proposal in Governance) + * @param governance Governance Contract + * @param user Address of the proposal creator + * @param blockNumber Block Number against which to make the test (e.g proposal creation block -1). + * @return boolean, true if can be created + **/ + function validateCreatorOfProposal( + IAaveGovernanceV2 governance, + address user, + uint256 blockNumber + ) external view returns (bool); + + /** + * @dev Called to validate the cancellation of a proposal + * @param governance Governance Contract + * @param user Address of the proposal creator + * @param blockNumber Block Number against which to make the test (e.g proposal creation block -1). + * @return boolean, true if can be cancelled + **/ + function validateProposalCancellation( + IAaveGovernanceV2 governance, + address user, + uint256 blockNumber + ) external view returns (bool); + + /** + * @dev Returns whether a user has enough Proposition Power to make a proposal. + * @param governance Governance Contract + * @param user Address of the user to be challenged. + * @param blockNumber Block Number against which to make the challenge. + * @return true if user has enough power + **/ + function isPropositionPowerEnough( + IAaveGovernanceV2 governance, + address user, + uint256 blockNumber + ) external view returns (bool); + + /** + * @dev Returns the minimum Proposition Power needed to create a proposition. + * @param governance Governance Contract + * @param blockNumber Blocknumber at which to evaluate + * @return minimum Proposition Power needed + **/ + function getMinimumPropositionPowerNeeded(IAaveGovernanceV2 governance, uint256 blockNumber) + external + view + returns (uint256); + + /** + * @dev Returns whether a proposal passed or not + * @param governance Governance Contract + * @param proposalId Id of the proposal to set + * @return true if proposal passed + **/ + function isProposalPassed(IAaveGovernanceV2 governance, uint256 proposalId) + external + view + returns (bool); + + /** + * @dev Check whether a proposal has reached quorum, ie has enough FOR-voting-power + * Here quorum is not to understand as number of votes reached, but number of for-votes reached + * @param governance Governance Contract + * @param proposalId Id of the proposal to verify + * @return voting power needed for a proposal to pass + **/ + function isQuorumValid(IAaveGovernanceV2 governance, uint256 proposalId) + external + view + returns (bool); + + /** + * @dev Check whether a proposal has enough extra FOR-votes than AGAINST-votes + * FOR VOTES - AGAINST VOTES > VOTE_DIFFERENTIAL * voting supply + * @param governance Governance Contract + * @param proposalId Id of the proposal to verify + * @return true if enough For-Votes + **/ + function isVoteDifferentialValid(IAaveGovernanceV2 governance, uint256 proposalId) + external + view + returns (bool); + + /** + * @dev Calculates the minimum amount of Voting Power needed for a proposal to Pass + * @param votingSupply Total number of oustanding voting tokens + * @return voting power needed for a proposal to pass + **/ + function getMinimumVotingPowerNeeded(uint256 votingSupply) external view returns (uint256); + + /** + * @dev Get proposition threshold constant value + * @return the proposition threshold value (100 <=> 1%) + **/ + function PROPOSITION_THRESHOLD() external view returns (uint256); + + /** + * @dev Get voting duration constant value + * @return the voting duration value in seconds + **/ + function VOTING_DURATION() external view returns (uint256); + + /** + * @dev Get the vote differential threshold constant value + * to compare with % of for votes/total supply - % of against votes/total supply + * @return the vote differential threshold value (100 <=> 1%) + **/ + function VOTE_DIFFERENTIAL() external view returns (uint256); + + /** + * @dev Get quorum threshold constant value + * to compare with % of for votes/total supply + * @return the quorum threshold value (100 <=> 1%) + **/ + function MINIMUM_QUORUM() external view returns (uint256); + + /** + * @dev precision helper: 100% = 10000 + * @return one hundred percents with our chosen precision + **/ + function ONE_HUNDRED_WITH_PRECISION() external view returns (uint256); +} diff --git a/packages/chain-events/eth/contracts/AAVE/interfaces/IVotingStrategy.sol b/packages/chain-events/eth/contracts/AAVE/interfaces/IVotingStrategy.sol new file mode 100644 index 00000000000..1edb11ddebd --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/interfaces/IVotingStrategy.sol @@ -0,0 +1,7 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +interface IVotingStrategy { + function getVotingPowerAt(address user, uint256 blockNumber) external view returns (uint256); +} diff --git a/packages/chain-events/eth/contracts/AAVE/misc/Helpers.sol b/packages/chain-events/eth/contracts/AAVE/misc/Helpers.sol new file mode 100644 index 00000000000..dcd8fc627ae --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/misc/Helpers.sol @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +function getChainId() pure returns (uint256) { + uint256 chainId; + assembly { + chainId := chainid() + } + return chainId; +} + +function isContract(address account) view returns (bool) { + // According to EIP-1052, 0x0 is the value returned for not-yet created accounts + // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned + // for accounts without code, i.e. `keccak256('')` + bytes32 codehash; + bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; + // solhint-disable-next-line no-inline-assembly + assembly { + codehash := extcodehash(account) + } + return (codehash != accountHash && codehash != 0x0); +} diff --git a/packages/chain-events/eth/contracts/AAVE/mocks/AaveTokenV1Mock.sol b/packages/chain-events/eth/contracts/AAVE/mocks/AaveTokenV1Mock.sol new file mode 100644 index 00000000000..2aadb98ca27 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/mocks/AaveTokenV1Mock.sol @@ -0,0 +1,32 @@ +import {AaveToken} from '@aave/aave-token/contracts/token/AaveToken.sol'; + +contract AaveTokenV1Mock is AaveToken { + /** + * @dev initializes the contract upon assignment to the InitializableAdminUpgradeabilityProxy + * @param minter the address of the LEND -> AAVE migration contract + */ + function initialize(address minter) external initializer { + uint256 chainId; + + //solium-disable-next-line + assembly { + chainId := chainid() + } + + DOMAIN_SEPARATOR = keccak256( + abi.encode( + EIP712_DOMAIN, + keccak256(bytes(NAME)), + keccak256(EIP712_REVISION), + chainId, + address(this) + ) + ); + _name = NAME; + _symbol = SYMBOL; + _setupDecimals(DECIMALS); + // _aaveGovernance = aaveGovernance; + _mint(minter, MIGRATION_AMOUNT); + _mint(minter, DISTRIBUTION_AMOUNT); + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/mocks/AaveTokenV2Mock.sol b/packages/chain-events/eth/contracts/AAVE/mocks/AaveTokenV2Mock.sol new file mode 100644 index 00000000000..5c56367eac5 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/mocks/AaveTokenV2Mock.sol @@ -0,0 +1,7 @@ +import {AaveTokenV2} from '@aave/aave-token/contracts/token/AaveTokenV2.sol'; + +contract AaveTokenV2Mock is AaveTokenV2 { + function mint(address minter, uint256 amount) external { + _mint(minter, amount); + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/mocks/FlashAttacks.sol b/packages/chain-events/eth/contracts/AAVE/mocks/FlashAttacks.sol new file mode 100644 index 00000000000..fe26ecd25b0 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/mocks/FlashAttacks.sol @@ -0,0 +1,49 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +import {IAaveGovernanceV2} from '../interfaces/IAaveGovernanceV2.sol'; +import {IERC20} from './interfaces/IERC20.sol'; +import {IExecutorWithTimelock} from '../interfaces/IExecutorWithTimelock.sol'; + + +contract FlashAttacks { + + IERC20 internal immutable TOKEN; + address internal immutable MINTER; + IAaveGovernanceV2 internal immutable GOV; + + constructor(address _token, address _MINTER, address _governance) { + TOKEN = IERC20(_token); + MINTER = _MINTER; + GOV = IAaveGovernanceV2(_governance); + } + + function flashVote(uint256 votePower, uint256 proposalId, bool support) external { + TOKEN.transferFrom(MINTER,address(this), votePower); + GOV.submitVote(proposalId, support); + TOKEN.transfer(MINTER, votePower); + } + + function flashVotePermit(uint256 votePower, uint256 proposalId, + bool support, + uint8 v, + bytes32 r, + bytes32 s) external { + TOKEN.transferFrom(MINTER, address(this), votePower); + GOV.submitVoteBySignature(proposalId, support, v, r, s); + TOKEN.transfer(MINTER, votePower); + } + + function flashProposal(uint256 proposalPower, IExecutorWithTimelock executor, + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas, + bool[] memory withDelegatecalls, + bytes32 ipfsHash) external { + TOKEN.transferFrom(MINTER, address(this),proposalPower); + GOV.create(executor, targets, values, signatures, calldatas, withDelegatecalls, ipfsHash); + TOKEN.transfer(MINTER, proposalPower); + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/mocks/SelfdestructTransfer.sol b/packages/chain-events/eth/contracts/AAVE/mocks/SelfdestructTransfer.sol new file mode 100644 index 00000000000..6fe8e0595b9 --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/mocks/SelfdestructTransfer.sol @@ -0,0 +1,8 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.6.12; + +contract SelfdestructTransfer { + function destroyAndTransfer(address payable to) external payable { + selfdestruct(to); + } +} diff --git a/packages/chain-events/eth/contracts/AAVE/mocks/interfaces/IERC20.sol b/packages/chain-events/eth/contracts/AAVE/mocks/interfaces/IERC20.sol new file mode 100644 index 00000000000..e4619fc279b --- /dev/null +++ b/packages/chain-events/eth/contracts/AAVE/mocks/interfaces/IERC20.sol @@ -0,0 +1,17 @@ +// SPDX-License-Identifier: agpl-3.0 +pragma solidity 0.7.5; +pragma abicoder v2; + +interface IERC20 { + function totalSupplyAt(uint256 blockNumber) external view returns (uint256); + + function balanceOf(address account) external view returns (uint256); + + function transferFrom( + address sender, + address recipient, + uint256 amount + ) external returns (bool); + + function transfer(address recipient, uint256 amount) external returns (bool); +} diff --git a/packages/chain-events/eth/contracts/Commonwealth/DataTypes.sol b/packages/chain-events/eth/contracts/Commonwealth/DataTypes.sol new file mode 100644 index 00000000000..728a7a0407d --- /dev/null +++ b/packages/chain-events/eth/contracts/Commonwealth/DataTypes.sol @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +//////////////////////////////////////////////////////////////////////////////////////////// +/// @title DataTypes +//////////////////////////////////////////////////////////////////////////////////////////// + +// this order of variables optimizes gas by using the least amount of 32 byte storage spaces as possible +library DataTypes { + struct ProjectMetaData { + uint256 id; + bytes32 name; + bytes32 ipfsHash; + bytes32 url; + address creator; + } + + struct ProtocolData { + // /// @notice The protocol fee percentage at time of project creation + uint8 fee; + // // @notice The address to send the protocol fee to + address feeTo; + } + + struct ProjectData { + // /// @notice Minimum value for a project to be successful + uint256 threshold; + + // /// @notice Deadline by which project must meet funding threshold + uint256 deadline; // uint24 max val = 6.9 years + // // @notice Address to which all funds will be withdrawn to if the project is funded + address beneficiary; + // // @notice The only token this project accepts for funding + address acceptedToken; + } +} diff --git a/packages/chain-events/eth/contracts/Commonwealth/ICuratedProject.sol b/packages/chain-events/eth/contracts/Commonwealth/ICuratedProject.sol new file mode 100644 index 00000000000..6c907d2107c --- /dev/null +++ b/packages/chain-events/eth/contracts/Commonwealth/ICuratedProject.sol @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "./IProjectBase.sol"; + +interface ICuratedProject is IProjectBase { + event Curate(address indexed sender, address indexed token, uint256 amount); + + function bToken() external view returns (address); + + function cToken() external view returns (address); + + function totalCuratorFunding() external view returns (uint256); + + function curatorFee() external view returns (uint256); + + function initialize( + DataTypes.ProjectMetaData memory _metaData, + DataTypes.ProjectData memory _projectData, + DataTypes.ProtocolData memory _protocolData, + uint256 _curatorFee, + address _bToken, + address _cToken + ) external returns (bool); + + function curate(uint256 _amount) external returns (bool); + + function curatorsWithdraw() external returns (bool); + + function withdrawRemaining() external view returns (uint256); +} diff --git a/packages/chain-events/eth/contracts/Commonwealth/ICuratedProjectFactory.sol b/packages/chain-events/eth/contracts/Commonwealth/ICuratedProjectFactory.sol new file mode 100644 index 00000000000..732c61abc99 --- /dev/null +++ b/packages/chain-events/eth/contracts/Commonwealth/ICuratedProjectFactory.sol @@ -0,0 +1,19 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import "./IProjectBaseFactory.sol"; + +interface ICuratedProjectFactory is IProjectBaseFactory { + function setCmnProjTokenImpl(address _cmnProjTokenImpl) external; + + function createProject( + bytes32 _name, + bytes32 _ipfsHash, + bytes32 _url, + address _beneficiary, + address _acceptedToken, + uint256 _threshold, + uint256 _deadline, + uint256 _curatorFee + ) external returns (address); +} diff --git a/packages/chain-events/eth/contracts/Commonwealth/IProjectBase.sol b/packages/chain-events/eth/contracts/Commonwealth/IProjectBase.sol new file mode 100644 index 00000000000..782b4bdf7fa --- /dev/null +++ b/packages/chain-events/eth/contracts/Commonwealth/IProjectBase.sol @@ -0,0 +1,43 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import {DataTypes} from './DataTypes.sol'; + +interface IProjectBase { + event Back(address indexed sender, address indexed token, uint256 amount); + event Withdraw(address indexed sender, address indexed token, uint256 amount, bytes32 withdrawalType); + event Succeeded(uint256 timestamp, uint256 amount); + event Failed(); + event ProjectDataChange(bytes32 name, bytes32 oldData, bytes32 newData); + + /////////////////////////////////////////// + // Getters - view functions + ////////////////////////////////////////// + function metaData() external view returns (DataTypes.ProjectMetaData memory); + + function projectData() external view returns (DataTypes.ProjectData memory); + + function protocolData() external view returns (DataTypes.ProtocolData memory); + + function totalFunding() external view returns (uint256); + + function lockedWithdraw() external view returns (bool); + + function funded() external view returns (bool); + + /////////////////////////////////////////// + // functions + ////////////////////////////////////////// + + function setName(bytes32 _name) external; + + function setIpfsHash(bytes32 _ipfsHash) external; + + function setUrl(bytes32 _url) external; + + function back(uint256 _amount) external returns (bool); + + function beneficiaryWithdraw() external returns (bool); + + function backersWithdraw() external returns (bool); +} diff --git a/packages/chain-events/eth/contracts/Commonwealth/IProjectBaseFactory.sol b/packages/chain-events/eth/contracts/Commonwealth/IProjectBaseFactory.sol new file mode 100644 index 00000000000..161a41ae6be --- /dev/null +++ b/packages/chain-events/eth/contracts/Commonwealth/IProjectBaseFactory.sol @@ -0,0 +1,32 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.0; + +import './DataTypes.sol'; + +interface IProjectBaseFactory { + event ProjectCreated(uint256 projectIndex, address projectAddress); + event ProtocolFeeToChange(address oldAddr, address newAddr); + event ProtocolFeeChange(uint8 oldFee, uint8 newFee); + event ProjectImplChange(address oldAddr, address newAddr); + event ProtocolTokenImplChange(address oldAddr, address newAddr); + + function protocolData() external view returns (DataTypes.ProtocolData memory); + + function owner() external view returns (address); + + function projectImp() external view returns (address); + + function projects(uint32 projectIndex) external view returns (address); + + function isAcceptedToken(address token) external view returns (bool); + + function numProjects() external view returns (uint32); + + function addAcceptedTokens(address[] memory _tokens) external; + + function setFeeTo(address _feeTo) external; + + function setProtocolFee(uint8 _protocolFee) external; + + function setProjectImpl(address _projectImpl) external; +} diff --git a/packages/chain-events/eth/contracts/Compound/ERC20VotesMock.sol b/packages/chain-events/eth/contracts/Compound/ERC20VotesMock.sol new file mode 100644 index 00000000000..342824bc4c7 --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/ERC20VotesMock.sol @@ -0,0 +1,21 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts-governance/token/ERC20/extensions/ERC20Votes.sol"; + +contract ERC20VotesMock is ERC20Votes { + constructor(string memory name, string memory symbol) ERC20(name, symbol) ERC20Permit(name) {} + + function mint(address account, uint256 amount) public { + _mint(account, amount); + } + + function burn(address account, uint256 amount) public { + _burn(account, amount); + } + + function getChainId() external view returns (uint256) { + return block.chainid; + } +} \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/Compound/FeiDao.sol b/packages/chain-events/eth/contracts/Compound/FeiDao.sol new file mode 100644 index 00000000000..8c8c939bc76 --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/FeiDao.sol @@ -0,0 +1,206 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +pragma solidity ^0.8.4; + +import '@openzeppelin/contracts-governance/governance/compatibility/GovernorCompatibilityBravo.sol'; +import '@openzeppelin/contracts-governance/governance/extensions/GovernorTimelockCompound.sol'; +import '@openzeppelin/contracts-governance/governance/extensions/GovernorVotesComp.sol'; +import '@openzeppelin/contracts-governance/token/ERC20/extensions/ERC20VotesComp.sol'; + +// Forked functionality from https://github.com/unlock-protocol/unlock/blob/master/smart-contracts/contracts/UnlockProtocolGovernor.sol + +contract FeiDAO is + GovernorCompatibilityBravo, + GovernorVotesComp, + GovernorTimelockCompound +{ + uint256 private _votingDelay = 1; // reduce voting delay to 1 block + uint256 private _votingPeriod = 13000; // extend voting period to 48h + uint256 private _quorum = 25_000_000e18; + uint256 private _proposalThreshold = 2_500_000e18; + + address private _guardian; + uint256 private _eta; + address public constant BACKUP_GOVERNOR = + 0x4C895973334Af8E06fd6dA4f723Ac24A5f259e6B; + uint256 public constant ROLLBACK_DEADLINE = 1635724800; // Nov 1, 2021 midnight UTC + + constructor( + ERC20VotesComp tribe, + ICompoundTimelock timelock, + address guardian + ) + GovernorVotesComp(tribe) + GovernorTimelockCompound(timelock) + Governor('Fei DAO') + { + _guardian = guardian; + } + + /* + * Events to track params changes + */ + event QuorumUpdated(uint256 oldQuorum, uint256 newQuorum); + event VotingDelayUpdated(uint256 oldVotingDelay, uint256 newVotingDelay); + event VotingPeriodUpdated(uint256 oldVotingPeriod, uint256 newVotingPeriod); + event ProposalThresholdUpdated( + uint256 oldProposalThreshold, + uint256 newProposalThreshold + ); + event RollbackQueued(uint256 eta); + event Rollback(); + + function votingDelay() public view override returns (uint256) { + return _votingDelay; + } + + function votingPeriod() public view override returns (uint256) { + return _votingPeriod; + } + + function quorum(uint256) public view override returns (uint256) { + return _quorum; + } + + function proposalThreshold() public view override returns (uint256) { + return _proposalThreshold; + } + + // governance setters + function setVotingDelay(uint256 newVotingDelay) public onlyGovernance { + uint256 oldVotingDelay = _votingDelay; + _votingDelay = newVotingDelay; + emit VotingDelayUpdated(oldVotingDelay, newVotingDelay); + } + + function setVotingPeriod(uint256 newVotingPeriod) public onlyGovernance { + uint256 oldVotingPeriod = _votingPeriod; + _votingPeriod = newVotingPeriod; + emit VotingPeriodUpdated(oldVotingPeriod, newVotingPeriod); + } + + function setQuorum(uint256 newQuorum) public onlyGovernance { + uint256 oldQuorum = _quorum; + _quorum = newQuorum; + emit QuorumUpdated(oldQuorum, newQuorum); + } + + function setProposalThreshold(uint256 newProposalThreshold) + public + onlyGovernance + { + uint256 oldProposalThreshold = _proposalThreshold; + _proposalThreshold = newProposalThreshold; + emit ProposalThresholdUpdated( + oldProposalThreshold, + newProposalThreshold + ); + } + + /// @notice one-time option to roll back the DAO to old GovernorAlpha + /// @dev guardian-only, and expires after the deadline. This function is here as a fallback in case something goes wrong. + function __rollback(uint256 eta) external { + require(msg.sender == _guardian, 'FeiDAO: caller not guardian'); + // Deleting guardian prevents multiple triggers of this function + _guardian = address(0); + + require(eta <= ROLLBACK_DEADLINE, 'FeiDAO: rollback expired'); + _eta = eta; + + ICompoundTimelock _timelock = ICompoundTimelock(payable(timelock())); + _timelock.queueTransaction( + timelock(), + 0, + 'setPendingAdmin(address)', + abi.encode(BACKUP_GOVERNOR), + eta + ); + + emit RollbackQueued(eta); + } + + /// @notice complete the rollback + function __executeRollback() external { + require(_eta <= block.timestamp, 'FeiDAO: too soon'); + require(_guardian == address(0), 'FeiDAO: no queue'); + + ICompoundTimelock _timelock = ICompoundTimelock(payable(timelock())); + _timelock.executeTransaction( + timelock(), + 0, + 'setPendingAdmin(address)', + abi.encode(BACKUP_GOVERNOR), + _eta + ); + + emit Rollback(); + } + + // The following functions are overrides required by Solidity. + function getVotes(address account, uint256 blockNumber) + public + view + override(IGovernor, GovernorVotesComp) + returns (uint256) + { + return super.getVotes(account, blockNumber); + } + + function state(uint256 proposalId) + public + view + override(IGovernor, Governor, GovernorTimelockCompound) + returns (ProposalState) + { + return super.state(proposalId); + } + + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) + public + override(IGovernor, Governor, GovernorCompatibilityBravo) + returns (uint256) + { + return super.propose(targets, values, calldatas, description); + } + + function _execute( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal override(Governor, GovernorTimelockCompound) { + super._execute(proposalId, targets, values, calldatas, descriptionHash); + } + + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal override(Governor, GovernorTimelockCompound) returns (uint256) { + return super._cancel(targets, values, calldatas, descriptionHash); + } + + function _executor() + internal + view + override(Governor, GovernorTimelockCompound) + returns (address) + { + return super._executor(); + } + + function supportsInterface(bytes4 interfaceId) + public + view + override(IERC165, Governor, GovernorTimelockCompound) + returns (bool) + { + return super.supportsInterface(interfaceId); + } +} diff --git a/packages/chain-events/eth/contracts/Compound/GovernorAlpha.sol b/packages/chain-events/eth/contracts/Compound/GovernorAlpha.sol new file mode 100644 index 00000000000..c131cc3489d --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/GovernorAlpha.sol @@ -0,0 +1,547 @@ +pragma solidity >=0.4.21 <0.7.0; +pragma experimental ABIEncoderV2; + + +contract GovernorAlpha { + /// @notice The name of this contract + string public constant name = "Marlin Governor Alpha"; + + /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed + function quorumVotes() public pure returns (uint256) { + return 8000e18; + } // 8000 MPond + + /// @notice The number of votes required in order for a voter to become a proposer + function proposalThreshold() public pure returns (uint256) { + return 1e18; + } // 1 MPond + + /// @notice The maximum number of actions that can be included in a proposal + function proposalMaxOperations() public pure returns (uint256) { + return 10; + } // 10 actions + + /// @notice The delay before voting on a proposal may take place, once proposed + function votingDelay() public pure returns (uint256) { + return 1; + } // 1 block + + /// @notice The duration of voting on a proposal, in blocks + function votingPeriod() public pure returns (uint256) { + return 17200; + } // ~3 days in blocks (assuming 15s blocks) + + /// @notice The address of the MPond Protocol Timelock + TimelockInterface public timelock; + + /// @notice The address of the MPond governance token + MPondInterface public MPond; + + /// @notice The address of the Governor Guardian + address public guardian; + + /// @notice The total number of proposals + uint256 public proposalCount; + + struct Proposal { + /// @notice Unique id for looking up a proposal + uint256 id; + /// @notice Creator of the proposal + address proposer; + /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds + uint256 eta; + /// @notice the ordered list of target addresses for calls to be made + address[] targets; + /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made + uint256[] values; + /// @notice The ordered list of function signatures to be called + string[] signatures; + /// @notice The ordered list of calldata to be passed to each call + bytes[] calldatas; + /// @notice The block at which voting begins: holders must delegate their votes prior to this block + uint256 startBlock; + /// @notice The block at which voting ends: votes must be cast prior to this block + uint256 endBlock; + /// @notice Current number of votes in favor of this proposal + uint256 forVotes; + /// @notice Current number of votes in opposition to this proposal + uint256 againstVotes; + /// @notice Flag marking whether the proposal has been canceled + bool canceled; + /// @notice Flag marking whether the proposal has been executed + bool executed; + /// @notice Receipts of ballots for the entire set of voters + mapping(address => Receipt) receipts; + } + + /// @notice Ballot receipt record for a voter + struct Receipt { + /// @notice Whether or not a vote has been cast + bool hasVoted; + /// @notice Whether or not the voter supports the proposal + bool support; + /// @notice The number of votes the voter had, which were cast + uint96 votes; + } + + /// @notice Possible states that a proposal may be in + enum ProposalState { + Pending, + Active, + Canceled, + Defeated, + Succeeded, + Queued, + Expired, + Executed + } + + /// @notice The official record of all proposals ever proposed + mapping(uint256 => Proposal) public proposals; + + /// @notice The latest proposal for each proposer + mapping(address => uint256) public latestProposalIds; + + /// @notice The EIP-712 typehash for the contract's domain + bytes32 public constant DOMAIN_TYPEHASH = keccak256( + "EIP712Domain(string name,uint256 chainId,address verifyingContract)" + ); + + /// @notice The EIP-712 typehash for the ballot struct used by the contract + bytes32 public constant BALLOT_TYPEHASH = keccak256( + "Ballot(uint256 proposalId,bool support)" + ); + + /// @notice An event emitted when a new proposal is created + event ProposalCreated( + uint256 id, + address proposer, + address[] targets, + uint256[] values, + string[] signatures, + bytes[] calldatas, + uint256 startBlock, + uint256 endBlock, + string description + ); + + /// @notice An event emitted when a vote has been cast on a proposal + event VoteCast( + address voter, + uint256 proposalId, + bool support, + uint256 votes + ); + + /// @notice An event emitted when a proposal has been canceled + event ProposalCanceled(uint256 id); + + /// @notice An event emitted when a proposal has been queued in the Timelock + event ProposalQueued(uint256 id, uint256 eta); + + /// @notice An event emitted when a proposal has been executed in the Timelock + event ProposalExecuted(uint256 id); + + constructor( + address timelock_, + address MPond_, + address guardian_ + ) public { + timelock = TimelockInterface(timelock_); + MPond = MPondInterface(MPond_); + guardian = guardian_; + } + + function propose( + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas, + string memory description + ) public returns (uint256) { + require( + MPond.getPriorVotes(msg.sender, sub256(block.number, 1)) > + proposalThreshold(), + "GovernorAlpha::propose: proposer votes below proposal threshold" + ); + require( + targets.length == values.length && + targets.length == signatures.length && + targets.length == calldatas.length, + "GovernorAlpha::propose: proposal function information arity mismatch" + ); + require( + targets.length != 0, + "GovernorAlpha::propose: must provide actions" + ); + require( + targets.length <= proposalMaxOperations(), + "GovernorAlpha::propose: too many actions" + ); + + uint256 latestProposalId = latestProposalIds[msg.sender]; + if (latestProposalId != 0) { + ProposalState proposersLatestProposalState = state( + latestProposalId + ); + require( + proposersLatestProposalState != ProposalState.Active, + "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal" + ); + require( + proposersLatestProposalState != ProposalState.Pending, + "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal" + ); + } + + uint256 startBlock = add256(block.number, votingDelay()); + uint256 endBlock = add256(startBlock, votingPeriod()); + + proposalCount++; + Proposal memory newProposal = Proposal({ + id: proposalCount, + proposer: msg.sender, + eta: 0, + targets: targets, + values: values, + signatures: signatures, + calldatas: calldatas, + startBlock: startBlock, + endBlock: endBlock, + forVotes: 0, + againstVotes: 0, + canceled: false, + executed: false + }); + + proposals[newProposal.id] = newProposal; + latestProposalIds[newProposal.proposer] = newProposal.id; + + emit ProposalCreated( + newProposal.id, + msg.sender, + targets, + values, + signatures, + calldatas, + startBlock, + endBlock, + description + ); + return newProposal.id; + } + + function queue(uint256 proposalId) public { + require( + state(proposalId) == ProposalState.Succeeded, + "GovernorAlpha::queue: proposal can only be queued if it is succeeded" + ); + Proposal storage proposal = proposals[proposalId]; + uint256 eta = add256(block.timestamp, timelock.delay()); + for (uint256 i = 0; i < proposal.targets.length; i++) { + _queueOrRevert( + proposal.targets[i], + proposal.values[i], + proposal.signatures[i], + proposal.calldatas[i], + eta + ); + } + proposal.eta = eta; + emit ProposalQueued(proposalId, eta); + } + + function _queueOrRevert( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) internal { + require( + !timelock.queuedTransactions( + keccak256(abi.encode(target, value, signature, data, eta)) + ), + "GovernorAlpha::_queueOrRevert: proposal action already queued at eta" + ); + timelock.queueTransaction(target, value, signature, data, eta); + } + + function execute(uint256 proposalId) public payable { + require( + state(proposalId) == ProposalState.Queued, + "GovernorAlpha::execute: proposal can only be executed if it is queued" + ); + Proposal storage proposal = proposals[proposalId]; + proposal.executed = true; + for (uint256 i = 0; i < proposal.targets.length; i++) { + timelock.executeTransaction.value(proposal.values[i])( + proposal.targets[i], + proposal.values[i], + proposal.signatures[i], + proposal.calldatas[i], + proposal.eta + ); + } + emit ProposalExecuted(proposalId); + } + + function cancel(uint256 proposalId) public { + ProposalState state = state(proposalId); + require( + state != ProposalState.Executed, + "GovernorAlpha::cancel: cannot cancel executed proposal" + ); + + Proposal storage proposal = proposals[proposalId]; + require( + msg.sender == guardian || + MPond.getPriorVotes( + proposal.proposer, + sub256(block.number, 1) + ) < + proposalThreshold(), + "GovernorAlpha::cancel: proposer above threshold" + ); + + proposal.canceled = true; + for (uint256 i = 0; i < proposal.targets.length; i++) { + timelock.cancelTransaction( + proposal.targets[i], + proposal.values[i], + proposal.signatures[i], + proposal.calldatas[i], + proposal.eta + ); + } + + emit ProposalCanceled(proposalId); + } + + function getActions(uint256 proposalId) + public + view + returns ( + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas + ) + { + Proposal storage p = proposals[proposalId]; + return (p.targets, p.values, p.signatures, p.calldatas); + } + + function getReceipt(uint256 proposalId, address voter) + public + view + returns (Receipt memory) + { + return proposals[proposalId].receipts[voter]; + } + + function state(uint256 proposalId) public view returns (ProposalState) { + require( + proposalCount >= proposalId && proposalId > 0, + "GovernorAlpha::state: invalid proposal id" + ); + Proposal storage proposal = proposals[proposalId]; + if (proposal.canceled) { + return ProposalState.Canceled; + } else if (block.number <= proposal.startBlock) { + return ProposalState.Pending; + } else if (block.number <= proposal.endBlock) { + return ProposalState.Active; + } else if ( + proposal.forVotes <= proposal.againstVotes || + proposal.forVotes < quorumVotes() + ) { + return ProposalState.Defeated; + } else if (proposal.eta == 0) { + return ProposalState.Succeeded; + } else if (proposal.executed) { + return ProposalState.Executed; + } else if ( + block.timestamp >= add256(proposal.eta, timelock.GRACE_PERIOD()) + ) { + return ProposalState.Expired; + } else { + return ProposalState.Queued; + } + } + + function castVote(uint256 proposalId, bool support) public { + return _castVote(msg.sender, proposalId, support); + } + + function castVoteBySig( + uint256 proposalId, + bool support, + uint8 v, + bytes32 r, + bytes32 s + ) public { + bytes32 domainSeparator = keccak256( + abi.encode( + DOMAIN_TYPEHASH, + keccak256(bytes(name)), + getChainId(), + address(this) + ) + ); + bytes32 structHash = keccak256( + abi.encode(BALLOT_TYPEHASH, proposalId, support) + ); + bytes32 digest = keccak256( + abi.encodePacked("\x19\x01", domainSeparator, structHash) + ); + address signatory = ecrecover(digest, v, r, s); + require( + signatory != address(0), + "GovernorAlpha::castVoteBySig: invalid signature" + ); + return _castVote(signatory, proposalId, support); + } + + function _castVote( + address voter, + uint256 proposalId, + bool support + ) internal { + require( + state(proposalId) == ProposalState.Active, + "GovernorAlpha::_castVote: voting is closed" + ); + Proposal storage proposal = proposals[proposalId]; + Receipt storage receipt = proposal.receipts[voter]; + require( + receipt.hasVoted == false, + "GovernorAlpha::_castVote: voter already voted" + ); + uint96 votes = MPond.getPriorVotes(voter, proposal.startBlock); + + if (support) { + proposal.forVotes = add256(proposal.forVotes, votes); + } else { + proposal.againstVotes = add256(proposal.againstVotes, votes); + } + + receipt.hasVoted = true; + receipt.support = support; + receipt.votes = votes; + + emit VoteCast(voter, proposalId, support, votes); + } + + function __acceptAdmin() public { + require( + msg.sender == guardian, + "GovernorAlpha::__acceptAdmin: sender must be gov guardian" + ); + timelock.acceptAdmin(); + } + + function __abdicate() public { + require( + msg.sender == guardian, + "GovernorAlpha::__abdicate: sender must be gov guardian" + ); + guardian = address(0); + } + + function __queueSetTimelockPendingAdmin( + address newPendingAdmin, + uint256 eta + ) public { + require( + msg.sender == guardian, + "GovernorAlpha::__queueSetTimelockPendingAdmin: sender must be gov guardian" + ); + timelock.queueTransaction( + address(timelock), + 0, + "setPendingAdmin(address)", + abi.encode(newPendingAdmin), + eta + ); + } + + function __executeSetTimelockPendingAdmin( + address newPendingAdmin, + uint256 eta + ) public { + require( + msg.sender == guardian, + "GovernorAlpha::__executeSetTimelockPendingAdmin: sender must be gov guardian" + ); + timelock.executeTransaction( + address(timelock), + 0, + "setPendingAdmin(address)", + abi.encode(newPendingAdmin), + eta + ); + } + + function add256(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "addition overflow"); + return c; + } + + function sub256(uint256 a, uint256 b) internal pure returns (uint256) { + require(b <= a, "subtraction underflow"); + return a - b; + } + + function getChainId() internal pure returns (uint256) { + uint256 chainId; + assembly { + chainId := chainid() + } + return chainId; + } +} + + +interface TimelockInterface { + function delay() external view returns (uint256); + + function GRACE_PERIOD() external view returns (uint256); + + function acceptAdmin() external; + + function queuedTransactions(bytes32 hash) external view returns (bool); + + function queueTransaction( + address target, + uint256 value, + string calldata signature, + bytes calldata data, + uint256 eta + ) external returns (bytes32); + + function cancelTransaction( + address target, + uint256 value, + string calldata signature, + bytes calldata data, + uint256 eta + ) external; + + function executeTransaction( + address target, + uint256 value, + string calldata signature, + bytes calldata data, + uint256 eta + ) external payable returns (bytes memory); +} + + +interface MPondInterface { + function getPriorVotes(address account, uint256 blockNumber) + external + view + returns (uint96); +} diff --git a/packages/chain-events/eth/contracts/Compound/GovernorAlphaMock.sol b/packages/chain-events/eth/contracts/Compound/GovernorAlphaMock.sol new file mode 100644 index 00000000000..79d74b48699 --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/GovernorAlphaMock.sol @@ -0,0 +1,547 @@ +pragma solidity >=0.4.21 <0.7.0; +pragma experimental ABIEncoderV2; + + +contract GovernorAlphaMock { + /// @notice The name of this contract + string public constant name = "Marlin Governor Alpha"; + + /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed + function quorumVotes() public pure returns (uint256) { + return 2e18; + } // 2 MPond + + /// @notice The number of votes required in order for a voter to become a proposer + function proposalThreshold() public pure returns (uint256) { + return 1e18; + } // 1 MPond + + /// @notice The maximum number of actions that can be included in a proposal + function proposalMaxOperations() public pure returns (uint256) { + return 10; + } // 10 actions + + /// @notice The delay before voting on a proposal may take place, once proposed + function votingDelay() public pure returns (uint256) { + return 1; + } // 1 block + + /// @notice The duration of voting on a proposal, in blocks + function votingPeriod() public pure returns (uint256) { + return 12; + } // ~3 days in blocks (assuming 15s blocks) + + /// @notice The address of the MPond Protocol Timelock + TimelockInterface public timelock; + + /// @notice The address of the MPond governance token + MPondInterface public MPond; + + /// @notice The address of the Governor Guardian + address public guardian; + + /// @notice The total number of proposals + uint256 public proposalCount; + + struct Proposal { + /// @notice Unique id for looking up a proposal + uint256 id; + /// @notice Creator of the proposal + address proposer; + /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds + uint256 eta; + /// @notice the ordered list of target addresses for calls to be made + address[] targets; + /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made + uint256[] values; + /// @notice The ordered list of function signatures to be called + string[] signatures; + /// @notice The ordered list of calldata to be passed to each call + bytes[] calldatas; + /// @notice The block at which voting begins: holders must delegate their votes prior to this block + uint256 startBlock; + /// @notice The block at which voting ends: votes must be cast prior to this block + uint256 endBlock; + /// @notice Current number of votes in favor of this proposal + uint256 forVotes; + /// @notice Current number of votes in opposition to this proposal + uint256 againstVotes; + /// @notice Flag marking whether the proposal has been canceled + bool canceled; + /// @notice Flag marking whether the proposal has been executed + bool executed; + /// @notice Receipts of ballots for the entire set of voters + mapping(address => Receipt) receipts; + } + + /// @notice Ballot receipt record for a voter + struct Receipt { + /// @notice Whether or not a vote has been cast + bool hasVoted; + /// @notice Whether or not the voter supports the proposal + bool support; + /// @notice The number of votes the voter had, which were cast + uint96 votes; + } + + /// @notice Possible states that a proposal may be in + enum ProposalState { + Pending, + Active, + Canceled, + Defeated, + Succeeded, + Queued, + Expired, + Executed + } + + /// @notice The official record of all proposals ever proposed + mapping(uint256 => Proposal) public proposals; + + /// @notice The latest proposal for each proposer + mapping(address => uint256) public latestProposalIds; + + /// @notice The EIP-712 typehash for the contract's domain + bytes32 public constant DOMAIN_TYPEHASH = keccak256( + "EIP712Domain(string name,uint256 chainId,address verifyingContract)" + ); + + /// @notice The EIP-712 typehash for the ballot struct used by the contract + bytes32 public constant BALLOT_TYPEHASH = keccak256( + "Ballot(uint256 proposalId,bool support)" + ); + + /// @notice An event emitted when a new proposal is created + event ProposalCreated( + uint256 id, + address proposer, + address[] targets, + uint256[] values, + string[] signatures, + bytes[] calldatas, + uint256 startBlock, + uint256 endBlock, + string description + ); + + /// @notice An event emitted when a vote has been cast on a proposal + event VoteCast( + address voter, + uint256 proposalId, + bool support, + uint256 votes + ); + + /// @notice An event emitted when a proposal has been canceled + event ProposalCanceled(uint256 id); + + /// @notice An event emitted when a proposal has been queued in the Timelock + event ProposalQueued(uint256 id, uint256 eta); + + /// @notice An event emitted when a proposal has been executed in the Timelock + event ProposalExecuted(uint256 id); + + constructor( + address timelock_, + address MPond_, + address guardian_ + ) public { + timelock = TimelockInterface(timelock_); + MPond = MPondInterface(MPond_); + guardian = guardian_; + } + + function propose( + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas, + string memory description + ) public returns (uint256) { + require( + MPond.getPriorVotes(msg.sender, sub256(block.number, 1)) > + proposalThreshold(), + "GovernorAlphaMock::propose: proposer votes below proposal threshold" + ); + require( + targets.length == values.length && + targets.length == signatures.length && + targets.length == calldatas.length, + "GovernorAlphaMock::propose: proposal function information arity mismatch" + ); + require( + targets.length != 0, + "GovernorAlphaMock::propose: must provide actions" + ); + require( + targets.length <= proposalMaxOperations(), + "GovernorAlphaMock::propose: too many actions" + ); + + uint256 latestProposalId = latestProposalIds[msg.sender]; + if (latestProposalId != 0) { + ProposalState proposersLatestProposalState = state( + latestProposalId + ); + require( + proposersLatestProposalState != ProposalState.Active, + "GovernorAlphaMock::propose: one live proposal per proposer, found an already active proposal" + ); + require( + proposersLatestProposalState != ProposalState.Pending, + "GovernorAlphaMock::propose: one live proposal per proposer, found an already pending proposal" + ); + } + + uint256 startBlock = add256(block.number, votingDelay()); + uint256 endBlock = add256(startBlock, votingPeriod()); + + proposalCount++; + Proposal memory newProposal = Proposal({ + id: proposalCount, + proposer: msg.sender, + eta: 0, + targets: targets, + values: values, + signatures: signatures, + calldatas: calldatas, + startBlock: startBlock, + endBlock: endBlock, + forVotes: 0, + againstVotes: 0, + canceled: false, + executed: false + }); + + proposals[newProposal.id] = newProposal; + latestProposalIds[newProposal.proposer] = newProposal.id; + + emit ProposalCreated( + newProposal.id, + msg.sender, + targets, + values, + signatures, + calldatas, + startBlock, + endBlock, + description + ); + return newProposal.id; + } + + function queue(uint256 proposalId) public { + require( + state(proposalId) == ProposalState.Succeeded, + "GovernorAlphaMock::queue: proposal can only be queued if it is succeeded" + ); + Proposal storage proposal = proposals[proposalId]; + uint256 eta = add256(block.timestamp, timelock.delay()); + for (uint256 i = 0; i < proposal.targets.length; i++) { + _queueOrRevert( + proposal.targets[i], + proposal.values[i], + proposal.signatures[i], + proposal.calldatas[i], + eta + ); + } + proposal.eta = eta; + emit ProposalQueued(proposalId, eta); + } + + function _queueOrRevert( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) internal { + require( + !timelock.queuedTransactions( + keccak256(abi.encode(target, value, signature, data, eta)) + ), + "GovernorAlphaMock::_queueOrRevert: proposal action already queued at eta" + ); + timelock.queueTransaction(target, value, signature, data, eta); + } + + function execute(uint256 proposalId) public payable { + require( + state(proposalId) == ProposalState.Queued, + "GovernorAlphaMock::execute: proposal can only be executed if it is queued" + ); + Proposal storage proposal = proposals[proposalId]; + proposal.executed = true; + for (uint256 i = 0; i < proposal.targets.length; i++) { + timelock.executeTransaction.value(proposal.values[i])( + proposal.targets[i], + proposal.values[i], + proposal.signatures[i], + proposal.calldatas[i], + proposal.eta + ); + } + emit ProposalExecuted(proposalId); + } + + function cancel(uint256 proposalId) public { + ProposalState state = state(proposalId); + require( + state != ProposalState.Executed, + "GovernorAlphaMock::cancel: cannot cancel executed proposal" + ); + + Proposal storage proposal = proposals[proposalId]; + require( + msg.sender == guardian || + MPond.getPriorVotes( + proposal.proposer, + sub256(block.number, 1) + ) < + proposalThreshold(), + "GovernorAlphaMock::cancel: proposer above threshold" + ); + + proposal.canceled = true; + for (uint256 i = 0; i < proposal.targets.length; i++) { + timelock.cancelTransaction( + proposal.targets[i], + proposal.values[i], + proposal.signatures[i], + proposal.calldatas[i], + proposal.eta + ); + } + + emit ProposalCanceled(proposalId); + } + + function getActions(uint256 proposalId) + public + view + returns ( + address[] memory targets, + uint256[] memory values, + string[] memory signatures, + bytes[] memory calldatas + ) + { + Proposal storage p = proposals[proposalId]; + return (p.targets, p.values, p.signatures, p.calldatas); + } + + function getReceipt(uint256 proposalId, address voter) + public + view + returns (Receipt memory) + { + return proposals[proposalId].receipts[voter]; + } + + function state(uint256 proposalId) public view returns (ProposalState) { + require( + proposalCount >= proposalId && proposalId > 0, + "GovernorAlphaMock::state: invalid proposal id" + ); + Proposal storage proposal = proposals[proposalId]; + if (proposal.canceled) { + return ProposalState.Canceled; + } else if (block.number <= proposal.startBlock) { + return ProposalState.Pending; + } else if (block.number <= proposal.endBlock) { + return ProposalState.Active; + } else if ( + proposal.forVotes <= proposal.againstVotes || + proposal.forVotes < quorumVotes() + ) { + return ProposalState.Defeated; + } else if (proposal.eta == 0) { + return ProposalState.Succeeded; + } else if (proposal.executed) { + return ProposalState.Executed; + } else if ( + block.timestamp >= add256(proposal.eta, timelock.GRACE_PERIOD()) + ) { + return ProposalState.Expired; + } else { + return ProposalState.Queued; + } + } + + function castVote(uint256 proposalId, bool support) public { + return _castVote(msg.sender, proposalId, support); + } + + function castVoteBySig( + uint256 proposalId, + bool support, + uint8 v, + bytes32 r, + bytes32 s + ) public { + bytes32 domainSeparator = keccak256( + abi.encode( + DOMAIN_TYPEHASH, + keccak256(bytes(name)), + getChainId(), + address(this) + ) + ); + bytes32 structHash = keccak256( + abi.encode(BALLOT_TYPEHASH, proposalId, support) + ); + bytes32 digest = keccak256( + abi.encodePacked("\x19\x01", domainSeparator, structHash) + ); + address signatory = ecrecover(digest, v, r, s); + require( + signatory != address(0), + "GovernorAlphaMock::castVoteBySig: invalid signature" + ); + return _castVote(signatory, proposalId, support); + } + + function _castVote( + address voter, + uint256 proposalId, + bool support + ) internal { + require( + state(proposalId) == ProposalState.Active, + "GovernorAlphaMock::_castVote: voting is closed" + ); + Proposal storage proposal = proposals[proposalId]; + Receipt storage receipt = proposal.receipts[voter]; + require( + receipt.hasVoted == false, + "GovernorAlphaMock::_castVote: voter already voted" + ); + uint96 votes = MPond.getPriorVotes(voter, proposal.startBlock); + + if (support) { + proposal.forVotes = add256(proposal.forVotes, votes); + } else { + proposal.againstVotes = add256(proposal.againstVotes, votes); + } + + receipt.hasVoted = true; + receipt.support = support; + receipt.votes = votes; + + emit VoteCast(voter, proposalId, support, votes); + } + + function __acceptAdmin() public { + require( + msg.sender == guardian, + "GovernorAlphaMock::__acceptAdmin: sender must be gov guardian" + ); + timelock.acceptAdmin(); + } + + function __abdicate() public { + require( + msg.sender == guardian, + "GovernorAlphaMock::__abdicate: sender must be gov guardian" + ); + guardian = address(0); + } + + function __queueSetTimelockPendingAdmin( + address newPendingAdmin, + uint256 eta + ) public { + require( + msg.sender == guardian, + "GovernorAlphaMock::__queueSetTimelockPendingAdmin: sender must be gov guardian" + ); + timelock.queueTransaction( + address(timelock), + 0, + "setPendingAdmin(address)", + abi.encode(newPendingAdmin), + eta + ); + } + + function __executeSetTimelockPendingAdmin( + address newPendingAdmin, + uint256 eta + ) public { + require( + msg.sender == guardian, + "GovernorAlphaMock::__executeSetTimelockPendingAdmin: sender must be gov guardian" + ); + timelock.executeTransaction( + address(timelock), + 0, + "setPendingAdmin(address)", + abi.encode(newPendingAdmin), + eta + ); + } + + function add256(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a, "addition overflow"); + return c; + } + + function sub256(uint256 a, uint256 b) internal pure returns (uint256) { + require(b <= a, "subtraction underflow"); + return a - b; + } + + function getChainId() internal pure returns (uint256) { + uint256 chainId; + assembly { + chainId := chainid() + } + return chainId; + } +} + + +interface TimelockInterface { + function delay() external view returns (uint256); + + function GRACE_PERIOD() external view returns (uint256); + + function acceptAdmin() external; + + function queuedTransactions(bytes32 hash) external view returns (bool); + + function queueTransaction( + address target, + uint256 value, + string calldata signature, + bytes calldata data, + uint256 eta + ) external returns (bytes32); + + function cancelTransaction( + address target, + uint256 value, + string calldata signature, + bytes calldata data, + uint256 eta + ) external; + + function executeTransaction( + address target, + uint256 value, + string calldata signature, + bytes calldata data, + uint256 eta + ) external payable returns (bytes memory); +} + + +interface MPondInterface { + function getPriorVotes(address account, uint256 blockNumber) + external + view + returns (uint96); +} diff --git a/packages/chain-events/eth/contracts/Compound/GovernorBravoDelegate.sol b/packages/chain-events/eth/contracts/Compound/GovernorBravoDelegate.sol new file mode 100644 index 00000000000..7da6b76dca7 --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/GovernorBravoDelegate.sol @@ -0,0 +1,380 @@ +pragma solidity ^0.5.16; +pragma experimental ABIEncoderV2; + +import "./GovernorBravoInterfaces.sol"; + +contract GovernorBravoDelegate is GovernorBravoDelegateStorageV1, GovernorBravoEvents { + + /// @notice The name of this contract + string public constant name = "Compound Governor Bravo"; + + /// @notice The minimum setable proposal threshold + uint public constant MIN_PROPOSAL_THRESHOLD = 50000e18; // 50,000 Comp + + /// @notice The maximum setable proposal threshold + uint public constant MAX_PROPOSAL_THRESHOLD = 100000e18; //100,000 Comp + + /// @notice The minimum setable voting period + uint public constant MIN_VOTING_PERIOD = 5760; // About 24 hours + + /// @notice The max setable voting period + uint public constant MAX_VOTING_PERIOD = 80640; // About 2 weeks + + /// @notice The min setable voting delay + uint public constant MIN_VOTING_DELAY = 1; + + /// @notice The max setable voting delay + uint public constant MAX_VOTING_DELAY = 40320; // About 1 week + + /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed + uint public constant quorumVotes = 400000e18; // 400,000 = 4% of Comp + + /// @notice The maximum number of actions that can be included in a proposal + uint public constant proposalMaxOperations = 10; // 10 actions + + /// @notice The EIP-712 typehash for the contract's domain + bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); + + /// @notice The EIP-712 typehash for the ballot struct used by the contract + bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)"); + + /** + * @notice Used to initialize the contract during delegator contructor + * @param timelock_ The address of the Timelock + * @param comp_ The address of the COMP token + * @param votingPeriod_ The initial voting period + * @param votingDelay_ The initial voting delay + * @param proposalThreshold_ The initial proposal threshold + */ + function initialize(address timelock_, address comp_, uint votingPeriod_, uint votingDelay_, uint proposalThreshold_) public { + require(address(timelock) == address(0), "GovernorBravo::initialize: can only initialize once"); + require(msg.sender == admin, "GovernorBravo::initialize: admin only"); + require(timelock_ != address(0), "GovernorBravo::initialize: invalid timelock address"); + require(comp_ != address(0), "GovernorBravo::initialize: invalid comp address"); + require(votingPeriod_ >= MIN_VOTING_PERIOD && votingPeriod_ <= MAX_VOTING_PERIOD, "GovernorBravo::initialize: invalid voting period"); + require(votingDelay_ >= MIN_VOTING_DELAY && votingDelay_ <= MAX_VOTING_DELAY, "GovernorBravo::initialize: invalid voting delay"); + require(proposalThreshold_ >= MIN_PROPOSAL_THRESHOLD && proposalThreshold_ <= MAX_PROPOSAL_THRESHOLD, "GovernorBravo::initialize: invalid proposal threshold"); + + timelock = TimelockInterface(timelock_); + comp = CompInterface(comp_); + votingPeriod = votingPeriod_; + votingDelay = votingDelay_; + proposalThreshold = proposalThreshold_; + } + + /** + * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold + * @param targets Target addresses for proposal calls + * @param values Eth values for proposal calls + * @param signatures Function signatures for proposal calls + * @param calldatas Calldatas for proposal calls + * @param description String description of the proposal + * @return Proposal id of new proposal + */ + function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { + // Reject proposals before initiating as Governor + require(initialProposalId != 0, "GovernorBravo::propose: Governor Bravo not active"); + require(comp.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold, "GovernorBravo::propose: proposer votes below proposal threshold"); + require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorBravo::propose: proposal function information arity mismatch"); + require(targets.length != 0, "GovernorBravo::propose: must provide actions"); + require(targets.length <= proposalMaxOperations, "GovernorBravo::propose: too many actions"); + + uint latestProposalId = latestProposalIds[msg.sender]; + if (latestProposalId != 0) { + ProposalState proposersLatestProposalState = state(latestProposalId); + require(proposersLatestProposalState != ProposalState.Active, "GovernorBravo::propose: one live proposal per proposer, found an already active proposal"); + require(proposersLatestProposalState != ProposalState.Pending, "GovernorBravo::propose: one live proposal per proposer, found an already pending proposal"); + } + + uint startBlock = add256(block.number, votingDelay); + uint endBlock = add256(startBlock, votingPeriod); + + proposalCount++; + Proposal memory newProposal = Proposal({ + id: proposalCount, + proposer: msg.sender, + eta: 0, + targets: targets, + values: values, + signatures: signatures, + calldatas: calldatas, + startBlock: startBlock, + endBlock: endBlock, + forVotes: 0, + againstVotes: 0, + abstainVotes: 0, + canceled: false, + executed: false + }); + + proposals[newProposal.id] = newProposal; + latestProposalIds[newProposal.proposer] = newProposal.id; + + emit ProposalCreated(newProposal.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description); + return newProposal.id; + } + + /** + * @notice Queues a proposal of state succeeded + * @param proposalId The id of the proposal to queue + */ + function queue(uint proposalId) external { + require(state(proposalId) == ProposalState.Succeeded, "GovernorBravo::queue: proposal can only be queued if it is succeeded"); + Proposal storage proposal = proposals[proposalId]; + uint eta = add256(block.timestamp, timelock.delay()); + for (uint i = 0; i < proposal.targets.length; i++) { + queueOrRevertInternal(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], eta); + } + proposal.eta = eta; + emit ProposalQueued(proposalId, eta); + } + + function queueOrRevertInternal(address target, uint value, string memory signature, bytes memory data, uint eta) internal { + require(!timelock.queuedTransactions(keccak256(abi.encode(target, value, signature, data, eta))), "GovernorBravo::queueOrRevertInternal: identical proposal action already queued at eta"); + timelock.queueTransaction(target, value, signature, data, eta); + } + + /** + * @notice Executes a queued proposal if eta has passed + * @param proposalId The id of the proposal to execute + */ + function execute(uint proposalId) external payable { + require(state(proposalId) == ProposalState.Queued, "GovernorBravo::execute: proposal can only be executed if it is queued"); + Proposal storage proposal = proposals[proposalId]; + proposal.executed = true; + for (uint i = 0; i < proposal.targets.length; i++) { + timelock.executeTransaction.value(proposal.values[i])(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); + } + emit ProposalExecuted(proposalId); + } + + /** + * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold + * @param proposalId The id of the proposal to cancel + */ + function cancel(uint proposalId) external { + require(state(proposalId) != ProposalState.Executed, "GovernorBravo::cancel: cannot cancel executed proposal"); + + Proposal storage proposal = proposals[proposalId]; + require(msg.sender == proposal.proposer || comp.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold, "GovernorBravo::cancel: proposer above threshold"); + + proposal.canceled = true; + for (uint i = 0; i < proposal.targets.length; i++) { + timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); + } + + emit ProposalCanceled(proposalId); + } + + /** + * @notice Gets actions of a proposal + * @param proposalId the id of the proposal + * @return Targets, values, signatures, and calldatas of the proposal actions + */ + function getActions(uint proposalId) external view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { + Proposal storage p = proposals[proposalId]; + return (p.targets, p.values, p.signatures, p.calldatas); + } + + /** + * @notice Gets the receipt for a voter on a given proposal + * @param proposalId the id of proposal + * @param voter The address of the voter + * @return The voting receipt + */ + function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) { + return proposals[proposalId].receipts[voter]; + } + + /** + * @notice Gets the state of a proposal + * @param proposalId The id of the proposal + * @return Proposal state + */ + function state(uint proposalId) public view returns (ProposalState) { + require(proposalCount >= proposalId && proposalId > initialProposalId, "GovernorBravo::state: invalid proposal id"); + Proposal storage proposal = proposals[proposalId]; + if (proposal.canceled) { + return ProposalState.Canceled; + } else if (block.number <= proposal.startBlock) { + return ProposalState.Pending; + } else if (block.number <= proposal.endBlock) { + return ProposalState.Active; + } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes) { + return ProposalState.Defeated; + } else if (proposal.eta == 0) { + return ProposalState.Succeeded; + } else if (proposal.executed) { + return ProposalState.Executed; + } else if (block.timestamp >= add256(proposal.eta, timelock.GRACE_PERIOD())) { + return ProposalState.Expired; + } else { + return ProposalState.Queued; + } + } + + /** + * @notice Cast a vote for a proposal + * @param proposalId The id of the proposal to vote on + * @param support The support value for the vote. 0=against, 1=for, 2=abstain + */ + function castVote(uint proposalId, uint8 support) external { + emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), ""); + } + + /** + * @notice Cast a vote for a proposal with a reason + * @param proposalId The id of the proposal to vote on + * @param support The support value for the vote. 0=against, 1=for, 2=abstain + * @param reason The reason given for the vote by the voter + */ + function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external { + emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), reason); + } + + /** + * @notice Cast a vote for a proposal by signature + * @dev External function that accepts EIP-712 signatures for voting on proposals. + */ + function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external { + bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainIdInternal(), address(this))); + bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support)); + bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); + address signatory = ecrecover(digest, v, r, s); + require(signatory != address(0), "GovernorBravo::castVoteBySig: invalid signature"); + emit VoteCast(signatory, proposalId, support, castVoteInternal(signatory, proposalId, support), ""); + } + + /** + * @notice Internal function that caries out voting logic + * @param voter The voter that is casting their vote + * @param proposalId The id of the proposal to vote on + * @param support The support value for the vote. 0=against, 1=for, 2=abstain + * @return The number of votes cast + */ + function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) { + require(state(proposalId) == ProposalState.Active, "GovernorBravo::castVoteInternal: voting is closed"); + require(support <= 2, "GovernorBravo::castVoteInternal: invalid vote type"); + Proposal storage proposal = proposals[proposalId]; + Receipt storage receipt = proposal.receipts[voter]; + require(receipt.hasVoted == false, "GovernorBravo::castVoteInternal: voter already voted"); + uint96 votes = comp.getPriorVotes(voter, proposal.startBlock); + + if (support == 0) { + proposal.againstVotes = add256(proposal.againstVotes, votes); + } else if (support == 1) { + proposal.forVotes = add256(proposal.forVotes, votes); + } else if (support == 2) { + proposal.abstainVotes = add256(proposal.abstainVotes, votes); + } + + receipt.hasVoted = true; + receipt.support = support; + receipt.votes = votes; + + return votes; + } + + /** + * @notice Admin function for setting the voting delay + * @param newVotingDelay new voting delay, in blocks + */ + function _setVotingDelay(uint newVotingDelay) external { + require(msg.sender == admin, "GovernorBravo::_setVotingDelay: admin only"); + require(newVotingDelay >= MIN_VOTING_DELAY && newVotingDelay <= MAX_VOTING_DELAY, "GovernorBravo::_setVotingDelay: invalid voting delay"); + uint oldVotingDelay = votingDelay; + votingDelay = newVotingDelay; + + emit VotingDelaySet(oldVotingDelay,votingDelay); + } + + /** + * @notice Admin function for setting the voting period + * @param newVotingPeriod new voting period, in blocks + */ + function _setVotingPeriod(uint newVotingPeriod) external { + require(msg.sender == admin, "GovernorBravo::_setVotingPeriod: admin only"); + require(newVotingPeriod >= MIN_VOTING_PERIOD && newVotingPeriod <= MAX_VOTING_PERIOD, "GovernorBravo::_setVotingPeriod: invalid voting period"); + uint oldVotingPeriod = votingPeriod; + votingPeriod = newVotingPeriod; + + emit VotingPeriodSet(oldVotingPeriod, votingPeriod); + } + + /** + * @notice Admin function for setting the proposal threshold + * @dev newProposalThreshold must be greater than the hardcoded min + * @param newProposalThreshold new proposal threshold + */ + function _setProposalThreshold(uint newProposalThreshold) external { + require(msg.sender == admin, "GovernorBravo::_setProposalThreshold: admin only"); + require(newProposalThreshold >= MIN_PROPOSAL_THRESHOLD && newProposalThreshold <= MAX_PROPOSAL_THRESHOLD, "GovernorBravo::_setProposalThreshold: invalid proposal threshold"); + uint oldProposalThreshold = proposalThreshold; + proposalThreshold = newProposalThreshold; + + emit ProposalThresholdSet(oldProposalThreshold, proposalThreshold); + } + + // function setInitialProposalId() external { + // initialProposalId = 1; + // proposalCount = 1; + // } + + /** + * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. + * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. + * @param newPendingAdmin New pending admin. + */ + function _setPendingAdmin(address newPendingAdmin) external { + // Check caller = admin + require(msg.sender == admin, "GovernorBravo:_setPendingAdmin: admin only"); + + // Save current value, if any, for inclusion in log + address oldPendingAdmin = pendingAdmin; + + // Store pendingAdmin with value newPendingAdmin + pendingAdmin = newPendingAdmin; + + // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin) + emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin); + } + + /** + * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin + * @dev Admin function for pending admin to accept role and update admin + */ + function _acceptAdmin() external { + // Check caller is pendingAdmin and pendingAdmin ≠ address(0) + require(msg.sender == pendingAdmin && msg.sender != address(0), "GovernorBravo:_acceptAdmin: pending admin only"); + + // Save current values for inclusion in log + address oldAdmin = admin; + address oldPendingAdmin = pendingAdmin; + + // Store admin with value pendingAdmin + admin = pendingAdmin; + + // Clear the pending value + pendingAdmin = address(0); + + emit NewAdmin(oldAdmin, admin); + emit NewPendingAdmin(oldPendingAdmin, pendingAdmin); + } + + function add256(uint256 a, uint256 b) internal pure returns (uint) { + uint c = a + b; + require(c >= a, "addition overflow"); + return c; + } + + function sub256(uint256 a, uint256 b) internal pure returns (uint) { + require(b <= a, "subtraction underflow"); + return a - b; + } + + function getChainIdInternal() internal pure returns (uint) { + uint chainId; + assembly { chainId := chainid() } + return chainId; + } +} \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/Compound/GovernorBravoDelegateMock.sol b/packages/chain-events/eth/contracts/Compound/GovernorBravoDelegateMock.sol new file mode 100644 index 00000000000..9fb943d217a --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/GovernorBravoDelegateMock.sol @@ -0,0 +1,382 @@ +pragma solidity ^0.5.16; +pragma experimental ABIEncoderV2; + +import "./GovernorBravoInterfaces.sol"; + +// TODO fill out modifications to this contract +contract GovernorBravoDelegateMock is GovernorBravoDelegateStorageV1, GovernorBravoEvents { + + /// @notice The name of this contract + string public constant name = "Compound Governor Bravo"; + + /// @notice The minimum setable proposal threshold + uint public constant MIN_PROPOSAL_THRESHOLD = 1; // 50,000 Comp + + /// @notice The maximum setable proposal threshold + uint public constant MAX_PROPOSAL_THRESHOLD = 100000e18; //100,000 Comp + + /// @notice The minimum setable voting period + uint public constant MIN_VOTING_PERIOD = 5760; // About 24 hours + + /// @notice The max setable voting period + uint public constant MAX_VOTING_PERIOD = 80640; // About 2 weeks + + /// @notice The min setable voting delay + uint public constant MIN_VOTING_DELAY = 1; + + /// @notice The max setable voting delay + uint public constant MAX_VOTING_DELAY = 40320; // About 1 week + + /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed + uint public constant quorumVotes = 1; // Changed from 400k to 1 + + /// @notice The maximum number of actions that can be included in a proposal + uint public constant proposalMaxOperations = 10; // 10 actions + + /// @notice The EIP-712 typehash for the contract's domain + bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); + + /// @notice The EIP-712 typehash for the ballot struct used by the contract + bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)"); + + /** + * @notice Used to initialize the contract during delegator contructor + * @param timelock_ The address of the Timelock + * @param comp_ The address of the COMP token + * @param votingPeriod_ The initial voting period + * @param votingDelay_ The initial voting delay + * @param proposalThreshold_ The initial proposal threshold + */ + function initialize(address timelock_, address comp_, uint votingPeriod_, uint votingDelay_, uint proposalThreshold_) public { + require(address(timelock) == address(0), "GovernorBravo::initialize: can only initialize once"); + require(msg.sender == admin, "GovernorBravo::initialize: admin only"); + require(timelock_ != address(0), "GovernorBravo::initialize: invalid timelock address"); + require(comp_ != address(0), "GovernorBravo::initialize: invalid comp address"); + require(votingPeriod_ >= MIN_VOTING_PERIOD && votingPeriod_ <= MAX_VOTING_PERIOD, "GovernorBravo::initialize: invalid voting period"); + require(votingDelay_ >= MIN_VOTING_DELAY && votingDelay_ <= MAX_VOTING_DELAY, "GovernorBravo::initialize: invalid voting delay"); + require(proposalThreshold_ >= MIN_PROPOSAL_THRESHOLD && proposalThreshold_ <= MAX_PROPOSAL_THRESHOLD, "GovernorBravo::initialize: invalid proposal threshold"); + + timelock = TimelockInterface(timelock_); + comp = CompInterface(comp_); + votingPeriod = votingPeriod_; + votingDelay = votingDelay_; + proposalThreshold = proposalThreshold_; + } + + /** + * @notice Function used to propose a new proposal. Sender must have delegates above the proposal threshold + * @param targets Target addresses for proposal calls + * @param values Eth values for proposal calls + * @param signatures Function signatures for proposal calls + * @param calldatas Calldatas for proposal calls + * @param description String description of the proposal + * @return Proposal id of new proposal + */ + function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { + // Reject proposals before initiating as Governor + require(address(comp) != address(0), "GovernorBravo::propose: Governor Bravo not initialized"); + require(initialProposalId != 0, "GovernorBravo::propose: Governor Bravo not active"); + require(comp.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold, "GovernorBravo::propose: proposer votes below proposal threshold"); + require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorBravo::propose: proposal function information arity mismatch"); + require(targets.length != 0, "GovernorBravo::propose: must provide actions"); + require(targets.length <= proposalMaxOperations, "GovernorBravo::propose: too many actions"); + + uint latestProposalId = latestProposalIds[msg.sender]; + if (latestProposalId != 0) { + ProposalState proposersLatestProposalState = state(latestProposalId); + require(proposersLatestProposalState != ProposalState.Active, "GovernorBravo::propose: one live proposal per proposer, found an already active proposal"); + require(proposersLatestProposalState != ProposalState.Pending, "GovernorBravo::propose: one live proposal per proposer, found an already pending proposal"); + } + + uint startBlock = add256(block.number, votingDelay); + uint endBlock = add256(startBlock, votingPeriod); + + proposalCount++; + Proposal memory newProposal = Proposal({ + id: proposalCount, + proposer: msg.sender, + eta: 0, + targets: targets, + values: values, + signatures: signatures, + calldatas: calldatas, + startBlock: startBlock, + endBlock: endBlock, + forVotes: 0, + againstVotes: 0, + abstainVotes: 0, + canceled: false, + executed: false + }); + + proposals[newProposal.id] = newProposal; + latestProposalIds[newProposal.proposer] = newProposal.id; + + emit ProposalCreated(newProposal.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description); + return newProposal.id; + } + + /** + * @notice Queues a proposal of state succeeded + * @param proposalId The id of the proposal to queue + */ + function queue(uint proposalId) external { + require(state(proposalId) == ProposalState.Succeeded, "GovernorBravo::queue: proposal can only be queued if it is succeeded"); + Proposal storage proposal = proposals[proposalId]; + uint eta = add256(block.timestamp, timelock.delay()); + for (uint i = 0; i < proposal.targets.length; i++) { + queueOrRevertInternal(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], eta); + } + proposal.eta = eta; + emit ProposalQueued(proposalId, eta); + } + + function queueOrRevertInternal(address target, uint value, string memory signature, bytes memory data, uint eta) internal { + require(!timelock.queuedTransactions(keccak256(abi.encode(target, value, signature, data, eta))), "GovernorBravo::queueOrRevertInternal: identical proposal action already queued at eta"); + timelock.queueTransaction(target, value, signature, data, eta); + } + + /** + * @notice Executes a queued proposal if eta has passed + * @param proposalId The id of the proposal to execute + */ + function execute(uint proposalId) external payable { + require(state(proposalId) == ProposalState.Queued, "GovernorBravo::execute: proposal can only be executed if it is queued"); + Proposal storage proposal = proposals[proposalId]; + proposal.executed = true; + for (uint i = 0; i < proposal.targets.length; i++) { + timelock.executeTransaction.value(proposal.values[i])(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); + } + emit ProposalExecuted(proposalId); + } + + /** + * @notice Cancels a proposal only if sender is the proposer, or proposer delegates dropped below proposal threshold + * @param proposalId The id of the proposal to cancel + */ + function cancel(uint proposalId) external { + require(state(proposalId) != ProposalState.Executed, "GovernorBravo::cancel: cannot cancel executed proposal"); + + Proposal storage proposal = proposals[proposalId]; + require(msg.sender == proposal.proposer || comp.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold, "GovernorBravo::cancel: proposer above threshold"); + + proposal.canceled = true; + for (uint i = 0; i < proposal.targets.length; i++) { + timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); + } + + emit ProposalCanceled(proposalId); + } + + /** + * @notice Gets actions of a proposal + * @param proposalId the id of the proposal + * @return Targets, values, signatures, and calldatas of the proposal actions + */ + function getActions(uint proposalId) external view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { + Proposal storage p = proposals[proposalId]; + return (p.targets, p.values, p.signatures, p.calldatas); + } + + /** + * @notice Gets the receipt for a voter on a given proposal + * @param proposalId the id of proposal + * @param voter The address of the voter + * @return The voting receipt + */ + function getReceipt(uint proposalId, address voter) external view returns (Receipt memory) { + return proposals[proposalId].receipts[voter]; + } + + /** + * @notice Gets the state of a proposal + * @param proposalId The id of the proposal + * @return Proposal state + */ + function state(uint proposalId) public view returns (ProposalState) { + require(proposalCount >= proposalId && proposalId > initialProposalId, "GovernorBravo::state: invalid proposal id"); + Proposal storage proposal = proposals[proposalId]; + if (proposal.canceled) { + return ProposalState.Canceled; + } else if (block.number <= proposal.startBlock) { + return ProposalState.Pending; + } else if (block.number <= proposal.endBlock) { + return ProposalState.Active; + } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes) { + return ProposalState.Defeated; + } else if (proposal.eta == 0) { + return ProposalState.Succeeded; + } else if (proposal.executed) { + return ProposalState.Executed; + } else if (block.timestamp >= add256(proposal.eta, timelock.GRACE_PERIOD())) { + return ProposalState.Expired; + } else { + return ProposalState.Queued; + } + } + + /** + * @notice Cast a vote for a proposal + * @param proposalId The id of the proposal to vote on + * @param support The support value for the vote. 0=against, 1=for, 2=abstain + */ + function castVote(uint proposalId, uint8 support) external { + emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), ""); + } + + /** + * @notice Cast a vote for a proposal with a reason + * @param proposalId The id of the proposal to vote on + * @param support The support value for the vote. 0=against, 1=for, 2=abstain + * @param reason The reason given for the vote by the voter + */ + function castVoteWithReason(uint proposalId, uint8 support, string calldata reason) external { + emit VoteCast(msg.sender, proposalId, support, castVoteInternal(msg.sender, proposalId, support), reason); + } + + /** + * @notice Cast a vote for a proposal by signature + * @dev External function that accepts EIP-712 signatures for voting on proposals. + */ + function castVoteBySig(uint proposalId, uint8 support, uint8 v, bytes32 r, bytes32 s) external { + bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainIdInternal(), address(this))); + bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support)); + bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); + address signatory = ecrecover(digest, v, r, s); + require(signatory != address(0), "GovernorBravo::castVoteBySig: invalid signature"); + emit VoteCast(signatory, proposalId, support, castVoteInternal(signatory, proposalId, support), ""); + } + + /** + * @notice Internal function that caries out voting logic + * @param voter The voter that is casting their vote + * @param proposalId The id of the proposal to vote on + * @param support The support value for the vote. 0=against, 1=for, 2=abstain + * @return The number of votes cast + */ + function castVoteInternal(address voter, uint proposalId, uint8 support) internal returns (uint96) { + require(state(proposalId) == ProposalState.Active, "GovernorBravo::castVoteInternal: voting is closed"); + require(support <= 2, "GovernorBravo::castVoteInternal: invalid vote type"); + Proposal storage proposal = proposals[proposalId]; + Receipt storage receipt = proposal.receipts[voter]; + require(receipt.hasVoted == false, "GovernorBravo::castVoteInternal: voter already voted"); + uint96 votes = comp.getPriorVotes(voter, proposal.startBlock); + + if (support == 0) { + proposal.againstVotes = add256(proposal.againstVotes, votes); + } else if (support == 1) { + proposal.forVotes = add256(proposal.forVotes, votes); + } else if (support == 2) { + proposal.abstainVotes = add256(proposal.abstainVotes, votes); + } + + receipt.hasVoted = true; + receipt.support = support; + receipt.votes = votes; + + return votes; + } + + /** + * @notice Admin function for setting the voting delay + * @param newVotingDelay new voting delay, in blocks + */ + function _setVotingDelay(uint newVotingDelay) external { + require(msg.sender == admin, "GovernorBravo::_setVotingDelay: admin only"); + require(newVotingDelay >= MIN_VOTING_DELAY && newVotingDelay <= MAX_VOTING_DELAY, "GovernorBravo::_setVotingDelay: invalid voting delay"); + uint oldVotingDelay = votingDelay; + votingDelay = newVotingDelay; + + emit VotingDelaySet(oldVotingDelay,votingDelay); + } + + /** + * @notice Admin function for setting the voting period + * @param newVotingPeriod new voting period, in blocks + */ + function _setVotingPeriod(uint newVotingPeriod) external { + require(msg.sender == admin, "GovernorBravo::_setVotingPeriod: admin only"); + require(newVotingPeriod >= MIN_VOTING_PERIOD && newVotingPeriod <= MAX_VOTING_PERIOD, "GovernorBravo::_setVotingPeriod: invalid voting period"); + uint oldVotingPeriod = votingPeriod; + votingPeriod = newVotingPeriod; + + emit VotingPeriodSet(oldVotingPeriod, votingPeriod); + } + + /** + * @notice Admin function for setting the proposal threshold + * @dev newProposalThreshold must be greater than the hardcoded min + * @param newProposalThreshold new proposal threshold + */ + function _setProposalThreshold(uint newProposalThreshold) external { + require(msg.sender == admin, "GovernorBravo::_setProposalThreshold: admin only"); + require(newProposalThreshold >= MIN_PROPOSAL_THRESHOLD && newProposalThreshold <= MAX_PROPOSAL_THRESHOLD, "GovernorBravo::_setProposalThreshold: invalid proposal threshold"); + uint oldProposalThreshold = proposalThreshold; + proposalThreshold = newProposalThreshold; + + emit ProposalThresholdSet(oldProposalThreshold, proposalThreshold); + } + + function setInitialProposalId() external { + initialProposalId = 1; + proposalCount = 1; + } + + /** + * @notice Begins transfer of admin rights. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. + * @dev Admin function to begin change of admin. The newPendingAdmin must call `_acceptAdmin` to finalize the transfer. + * @param newPendingAdmin New pending admin. + */ + function _setPendingAdmin(address newPendingAdmin) external { + // Check caller = admin + require(msg.sender == admin, "GovernorBravo:_setPendingAdmin: admin only"); + + // Save current value, if any, for inclusion in log + address oldPendingAdmin = pendingAdmin; + + // Store pendingAdmin with value newPendingAdmin + pendingAdmin = newPendingAdmin; + + // Emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin) + emit NewPendingAdmin(oldPendingAdmin, newPendingAdmin); + } + + /** + * @notice Accepts transfer of admin rights. msg.sender must be pendingAdmin + * @dev Admin function for pending admin to accept role and update admin + */ + function _acceptAdmin() external { + // Check caller is pendingAdmin and pendingAdmin ≠ address(0) + require(msg.sender == pendingAdmin && msg.sender != address(0), "GovernorBravo:_acceptAdmin: pending admin only"); + + // Save current values for inclusion in log + address oldAdmin = admin; + address oldPendingAdmin = pendingAdmin; + + // Store admin with value pendingAdmin + admin = pendingAdmin; + + // Clear the pending value + pendingAdmin = address(0); + + emit NewAdmin(oldAdmin, admin); + emit NewPendingAdmin(oldPendingAdmin, pendingAdmin); + } + + function add256(uint256 a, uint256 b) internal pure returns (uint) { + uint c = a + b; + require(c >= a, "addition overflow"); + return c; + } + + function sub256(uint256 a, uint256 b) internal pure returns (uint) { + require(b <= a, "subtraction underflow"); + return a - b; + } + + function getChainIdInternal() internal pure returns (uint) { + uint chainId; + assembly { chainId := chainid() } + return chainId; + } +} \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/Compound/GovernorBravoDelegator.sol b/packages/chain-events/eth/contracts/Compound/GovernorBravoDelegator.sol new file mode 100644 index 00000000000..a3f12377667 --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/GovernorBravoDelegator.sol @@ -0,0 +1,79 @@ +pragma solidity ^0.5.16; +pragma experimental ABIEncoderV2; + +import "./GovernorBravoInterfaces.sol"; + +contract GovernorBravoDelegator is GovernorBravoDelegatorStorage, GovernorBravoEvents { + constructor( + address timelock_, + address comp_, + address admin_, + address implementation_, + uint votingPeriod_, + uint votingDelay_, + uint proposalThreshold_) public { + + // Admin set to msg.sender for initialization + admin = msg.sender; + + delegateTo(implementation_, abi.encodeWithSignature("initialize(address,address,uint256,uint256,uint256)", + timelock_, + comp_, + votingPeriod_, + votingDelay_, + proposalThreshold_)); + + _setImplementation(implementation_); + + admin = admin_; + } + + + /** + * @notice Called by the admin to update the implementation of the delegator + * @param implementation_ The address of the new implementation for delegation + */ + function _setImplementation(address implementation_) public { + require(msg.sender == admin, "GovernorBravoDelegator::_setImplementation: admin only"); + require(implementation_ != address(0), "GovernorBravoDelegator::_setImplementation: invalid implementation address"); + + address oldImplementation = implementation; + implementation = implementation_; + + emit NewImplementation(oldImplementation, implementation); + } + + /** + * @notice Internal method to delegate execution to another contract + * @dev It returns to the external caller whatever the implementation returns or forwards reverts + * @param callee The contract to delegatecall + * @param data The raw data to delegatecall + */ + function delegateTo(address callee, bytes memory data) internal { + (bool success, bytes memory returnData) = callee.delegatecall(data); + assembly { + if eq(success, 0) { + revert(add(returnData, 0x20), returndatasize) + } + } + } + + /** + * @dev Delegates execution to an implementation contract. + * It returns to the external caller whatever the implementation returns + * or forwards reverts. + */ + function () external payable { + // delegate all other functions to current implementation + (bool success, ) = implementation.delegatecall(msg.data); + + assembly { + let free_mem_ptr := mload(0x40) + returndatacopy(free_mem_ptr, 0, returndatasize) + + switch success + case 0 { revert(free_mem_ptr, returndatasize) } + default { return(free_mem_ptr, returndatasize) } + } + } +} \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/Compound/GovernorBravoImmutable.sol b/packages/chain-events/eth/contracts/Compound/GovernorBravoImmutable.sol new file mode 100644 index 00000000000..0d3db7fead9 --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/GovernorBravoImmutable.sol @@ -0,0 +1,37 @@ +pragma solidity ^0.5.16; +pragma experimental ABIEncoderV2; + +import "./GovernorBravoDelegateMock.sol"; + +contract GovernorBravoImmutable is GovernorBravoDelegateMock { + + constructor( + address timelock_, + address comp_, + address admin_, + uint votingPeriod_, + uint votingDelay_, + uint proposalThreshold_) public { + admin = msg.sender; + initialize(timelock_, comp_, votingPeriod_, votingDelay_, proposalThreshold_); + + admin = admin_; + } + + + function initialize(address timelock_, address comp_, uint votingPeriod_, uint votingDelay_, uint proposalThreshold_) public { + require(msg.sender == admin, "GovernorBravo::initialize: admin only"); + require(address(timelock) == address(0), "GovernorBravo::initialize: can only initialize once"); + + timelock = TimelockInterface(timelock_); + comp = CompInterface(comp_); + votingPeriod = votingPeriod_; + votingDelay = votingDelay_; + proposalThreshold = proposalThreshold_; + } + + function _initiate() public { + proposalCount = 1; + initialProposalId = 1; + } +} \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/Compound/GovernorBravoInterfaces.sol b/packages/chain-events/eth/contracts/Compound/GovernorBravoInterfaces.sol new file mode 100644 index 00000000000..153e5af11c8 --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/GovernorBravoInterfaces.sol @@ -0,0 +1,184 @@ +pragma solidity ^0.5.16; +pragma experimental ABIEncoderV2; + + +contract GovernorBravoEvents { + /// @notice An event emitted when a new proposal is created + event ProposalCreated(uint id, address proposer, address[] targets, uint[] values, string[] signatures, bytes[] calldatas, uint startBlock, uint endBlock, string description); + + /// @notice An event emitted when a vote has been cast on a proposal + /// @param voter The address which casted a vote + /// @param proposalId The proposal id which was voted on + /// @param support Support value for the vote. 0=against, 1=for, 2=abstain + /// @param votes Number of votes which were cast by the voter + /// @param reason The reason given for the vote by the voter + event VoteCast(address indexed voter, uint proposalId, uint8 support, uint votes, string reason); + + /// @notice An event emitted when a proposal has been canceled + event ProposalCanceled(uint id); + + /// @notice An event emitted when a proposal has been queued in the Timelock + event ProposalQueued(uint id, uint eta); + + /// @notice An event emitted when a proposal has been executed in the Timelock + event ProposalExecuted(uint id); + + /// @notice An event emitted when the voting delay is set + event VotingDelaySet(uint oldVotingDelay, uint newVotingDelay); + + /// @notice An event emitted when the voting period is set + event VotingPeriodSet(uint oldVotingPeriod, uint newVotingPeriod); + + /// @notice Emitted when implementation is changed + event NewImplementation(address oldImplementation, address newImplementation); + + /// @notice Emitted when proposal threshold is set + event ProposalThresholdSet(uint oldProposalThreshold, uint newProposalThreshold); + + /// @notice Emitted when pendingAdmin is changed + event NewPendingAdmin(address oldPendingAdmin, address newPendingAdmin); + + /// @notice Emitted when pendingAdmin is accepted, which means admin is updated + event NewAdmin(address oldAdmin, address newAdmin); +} + +contract GovernorBravoDelegatorStorage { + /// @notice Administrator for this contract + address public admin; + + /// @notice Pending administrator for this contract + address public pendingAdmin; + + /// @notice Active brains of Governor + address public implementation; +} + + +/** + * @title Storage for Governor Bravo Delegate + * @notice For future upgrades, do not change GovernorBravoDelegateStorageV1. Create a new + * contract which implements GovernorBravoDelegateStorageV1 and following the naming convention + * GovernorBravoDelegateStorageVX. + */ +contract GovernorBravoDelegateStorageV1 is GovernorBravoDelegatorStorage { + + /// @notice The delay before voting on a proposal may take place, once proposed, in blocks + uint public votingDelay; + + /// @notice The duration of voting on a proposal, in blocks + uint public votingPeriod; + + /// @notice The number of votes required in order for a voter to become a proposer + uint public proposalThreshold; + + /// @notice Initial proposal id set at become + uint public initialProposalId; + + /// @notice The total number of proposals + uint public proposalCount; + + /// @notice The address of the Compound Protocol Timelock + TimelockInterface public timelock; + + /// @notice The address of the Compound governance token + CompInterface public comp; + + /// @notice The official record of all proposals ever proposed + mapping (uint => Proposal) public proposals; + + /// @notice The latest proposal for each proposer + mapping (address => uint) public latestProposalIds; + + + struct Proposal { + /// @notice Unique id for looking up a proposal + uint id; + + /// @notice Creator of the proposal + address proposer; + + /// @notice The timestamp that the proposal will be available for execution, set once the vote succeeds + uint eta; + + /// @notice the ordered list of target addresses for calls to be made + address[] targets; + + /// @notice The ordered list of values (i.e. msg.value) to be passed to the calls to be made + uint[] values; + + /// @notice The ordered list of function signatures to be called + string[] signatures; + + /// @notice The ordered list of calldata to be passed to each call + bytes[] calldatas; + + /// @notice The block at which voting begins: holders must delegate their votes prior to this block + uint startBlock; + + /// @notice The block at which voting ends: votes must be cast prior to this block + uint endBlock; + + /// @notice Current number of votes in favor of this proposal + uint forVotes; + + /// @notice Current number of votes in opposition to this proposal + uint againstVotes; + + /// @notice Current number of votes for abstaining for this proposal + uint abstainVotes; + + /// @notice Flag marking whether the proposal has been canceled + bool canceled; + + /// @notice Flag marking whether the proposal has been executed + bool executed; + + /// @notice Receipts of ballots for the entire set of voters + mapping (address => Receipt) receipts; + } + + /// @notice Ballot receipt record for a voter + struct Receipt { + /// @notice Whether or not a vote has been cast + bool hasVoted; + + /// @notice Whether or not the voter supports the proposal or abstains + uint8 support; + + /// @notice The number of votes the voter had, which were cast + uint96 votes; + } + + /// @notice Possible states that a proposal may be in + enum ProposalState { + Pending, + Active, + Canceled, + Defeated, + Succeeded, + Queued, + Expired, + Executed + } +} + +interface TimelockInterface { + function delay() external view returns (uint); + function GRACE_PERIOD() external view returns (uint); + function acceptAdmin() external; + function queuedTransactions(bytes32 hash) external view returns (bool); + function queueTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external returns (bytes32); + function cancelTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external; + function executeTransaction(address target, uint value, string calldata signature, bytes calldata data, uint eta) external payable returns (bytes memory); +} + +interface CompInterface { + function getPriorVotes(address account, uint blockNumber) external view returns (uint96); +} + +/* +interface GovernorAlpha { + /// @notice The total number of proposals + function proposalCount() external returns (uint); +} +*/ \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/Compound/GovernorMock.sol b/packages/chain-events/eth/contracts/Compound/GovernorMock.sol new file mode 100644 index 00000000000..895ce730936 --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/GovernorMock.sol @@ -0,0 +1,128 @@ +// SPDX-License-Identifier: MIT + +pragma solidity ^0.8.0; + +import "@openzeppelin/contracts-governance/governance/extensions/GovernorTimelockControl.sol"; +import "@openzeppelin/contracts-governance/governance/extensions/GovernorCountingSimple.sol"; +import "@openzeppelin/contracts-governance/governance/extensions/GovernorVotesQuorumFraction.sol"; +import "@openzeppelin/contracts-governance/governance/extensions/GovernorProposalThreshold.sol"; + +contract GovernorMock is GovernorTimelockControl, GovernorProposalThreshold, GovernorVotesQuorumFraction, GovernorCountingSimple { + uint256 immutable _votingDelay; + uint256 immutable _votingPeriod; + uint256 immutable _proposalThreshold; + + constructor( + string memory name_, + ERC20Votes token_, + uint256 votingDelay_, + uint256 votingPeriod_, + TimelockController timelock_, + uint256 quorumNumerator_, + uint256 proposalThreshold_ + ) + Governor(name_) + GovernorTimelockControl(timelock_) + GovernorVotes(token_) + GovernorVotesQuorumFraction(quorumNumerator_) + { + _votingDelay = votingDelay_; + _votingPeriod = votingPeriod_; + _proposalThreshold = proposalThreshold_; + } + + function supportsInterface(bytes4 interfaceId) + public + view + virtual + override(Governor, GovernorTimelockControl) + returns (bool) + { + return super.supportsInterface(interfaceId); + } + + function votingDelay() public view override returns (uint256) { + return _votingDelay; + } + + function votingPeriod() public view override returns (uint256) { + return _votingPeriod; + } + + function quorum(uint256 blockNumber) + public + view + override(IGovernor, GovernorVotesQuorumFraction) + returns (uint256) + { + return super.quorum(blockNumber); + } + + function cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) public returns (uint256 proposalId) { + return _cancel(targets, values, calldatas, descriptionHash); + } + + /** + * Overriden functions + */ + function proposalThreshold() public view virtual override returns (uint256) { + return _proposalThreshold; + } + + function propose( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + string memory description + ) public virtual override(IGovernor, Governor, GovernorProposalThreshold) returns (uint256) { + return super.propose(targets, values, calldatas, description); + } + + function state(uint256 proposalId) + public + view + virtual + override(Governor, GovernorTimelockControl) + returns (ProposalState) + { + return super.state(proposalId); + } + + function _execute( + uint256 proposalId, + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override(Governor, GovernorTimelockControl) { + super._execute(proposalId, targets, values, calldatas, descriptionHash); + } + + function _cancel( + address[] memory targets, + uint256[] memory values, + bytes[] memory calldatas, + bytes32 descriptionHash + ) internal virtual override(Governor, GovernorTimelockControl) returns (uint256 proposalId) { + return super._cancel(targets, values, calldatas, descriptionHash); + } + + function getVotes(address account, uint256 blockNumber) + public + view + virtual + override(IGovernor, GovernorVotes) + returns (uint256) + { + return super.getVotes(account, blockNumber); + } + + function _executor() internal view virtual override(Governor, GovernorTimelockControl) returns (address) { + return super._executor(); + } +} \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/Compound/MPond.sol b/packages/chain-events/eth/contracts/Compound/MPond.sol new file mode 100644 index 00000000000..5d9db10860f --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/MPond.sol @@ -0,0 +1,578 @@ +pragma solidity >=0.4.21 <0.7.0; +pragma experimental ABIEncoderV2; + + +contract MPond { + /// @notice EIP-20 token name for this token + string public constant name = "Marlin Governance Token"; + + /// @notice EIP-20 token symbol for this token + string public constant symbol = "MPOND"; + + /// @notice EIP-20 token decimals for this token + uint8 public constant decimals = 18; + + /// @notice Total number of tokens in circulation + uint256 public constant totalSupply = 10000e18; // 10k MPond + uint256 public constant bridgeSupply = 7000e18; // 3k MPond + /// @notice Allowance amounts on behalf of others + mapping(address => mapping(address => uint96)) internal allowances; + + /// @notice Official record of token balances for each account + mapping(address => uint96) internal balances; + + /// @notice A record of each accounts delegate + mapping(address => mapping(address => uint96)) public delegates; + + /// @notice A checkpoint for marking number of votes from a given block + struct Checkpoint { + uint32 fromBlock; + uint96 votes; + } + + /// @notice A record of votes checkpoints for each account, by index + mapping(address => mapping(uint32 => Checkpoint)) public checkpoints; + + /// @notice The number of checkpoints for each account + mapping(address => uint32) public numCheckpoints; + + /// @notice The EIP-712 typehash for the contract's domain + bytes32 public constant DOMAIN_TYPEHASH = keccak256( + "EIP712Domain(string name,uint256 chainId,address verifyingContract)" + ); + + /// @notice The EIP-712 typehash for the delegation struct used by the contract + bytes32 public constant DELEGATION_TYPEHASH = keccak256( + "Delegation(address delegatee,uint256 nonce,uint256 expiry,uint96 amount)" + ); + + /// @notice The EIP-712 typehash for the delegation struct used by the contract + bytes32 public constant UNDELEGATION_TYPEHASH = keccak256( + "Unelegation(address delegatee,uint256 nonce,uint256 expiry,uint96 amount)" + ); + /// @notice A record of states for signing / validating signatures + mapping(address => uint256) public nonces; + + /// customized params + address public admin; + mapping(address => bool) public isWhiteListed; + bool public enableAllTranfers = true; + + /// @notice An event thats emitted when an account changes its delegate + event DelegateChanged( + address indexed delegator, + address indexed fromDelegate, + address indexed toDelegate + ); + + /// @notice An event thats emitted when a delegate account's vote balance changes + event DelegateVotesChanged( + address indexed delegate, + uint256 previousBalance, + uint256 newBalance + ); + + /// @notice The standard EIP-20 transfer event + event Transfer(address indexed from, address indexed to, uint256 amount); + + /// @notice The standard EIP-20 approval event + event Approval( + address indexed owner, + address indexed spender, + uint256 amount + ); + + /** + * @notice Construct a new Comp token + * @param account The initial account to grant all the tokens + */ + constructor(address account, address bridge) public { + require( + account != bridge, + "Bridge and accoutn should not be the same address" + ); + balances[bridge] = uint96(bridgeSupply); + delegates[bridge][address(0)] = uint96(bridgeSupply); + isWhiteListed[bridge] = true; + emit Transfer(address(0), bridge, bridgeSupply); + + uint96 remainingSupply = sub96( + uint96(totalSupply), + uint96(bridgeSupply), + "Comp: Subtraction overflow in the constructor" + ); + balances[account] = remainingSupply; + delegates[account][address(0)] = remainingSupply; + isWhiteListed[account] = true; + emit Transfer(address(0), account, uint256(remainingSupply)); + } + + function addWhiteListAddress(address _address) external returns (bool) { + require(msg.sender == admin, "Only admin can whitelist"); + isWhiteListed[_address] = true; + return true; + } + + function enableAllTransfers() external returns (bool) { + require(msg.sender == admin, "Only enable can enable all transfers"); + enableAllTranfers = true; + return true; + } + + function isWhiteListedTransfer(address _address1, address _address2) + public + view + returns (bool) + { + return + (isWhiteListed[_address1] || isWhiteListed[_address2]) || + enableAllTranfers; + } + + /** + * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` + * @param account The address of the account holding the funds + * @param spender The address of the account spending the funds + * @return The number of tokens approved + */ + function allowance(address account, address spender) + external + view + returns (uint256) + { + return allowances[account][spender]; + } + + /** + * @notice Approve `spender` to transfer up to `amount` from `src` + * @dev This will overwrite the approval amount for `spender` + * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) + * @param spender The address of the account which may transfer tokens + * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) + * @return Whether or not the approval succeeded + */ + function approve(address spender, uint256 rawAmount) + external + returns (bool) + { + uint96 amount; + if (rawAmount == uint256(-1)) { + amount = uint96(-1); + } else { + amount = safe96(rawAmount, "Comp::approve: amount exceeds 96 bits"); + } + + allowances[msg.sender][spender] = amount; + + emit Approval(msg.sender, spender, amount); + return true; + } + + /** + * @notice Get the number of tokens held by the `account` + * @param account The address of the account to get the balance of + * @return The number of tokens held + */ + function balanceOf(address account) external view returns (uint256) { + return balances[account]; + } + + /** + * @notice Transfer `amount` tokens from `msg.sender` to `dst` + * @param dst The address of the destination account + * @param rawAmount The number of tokens to transfer + * @return Whether or not the transfer succeeded + */ + function transfer(address dst, uint256 rawAmount) external returns (bool) { + require( + isWhiteListedTransfer(msg.sender, dst), + "Atleast of the address (msg.sender or dst) should be whitelisted" + ); + uint96 amount = safe96( + rawAmount, + "Comp::transfer: amount exceeds 96 bits" + ); + _transferTokens(msg.sender, dst, amount); + return true; + } + + /** + * @notice Transfer `amount` tokens from `src` to `dst` + * @param src The address of the source account + * @param dst The address of the destination account + * @param rawAmount The number of tokens to transfer + * @return Whether or not the transfer succeeded + */ + function transferFrom( + address src, + address dst, + uint256 rawAmount + ) external returns (bool) { + require( + isWhiteListedTransfer(msg.sender, dst), + "Atleast of the address (src or dst) should be whitelisted" + ); + address spender = msg.sender; + uint96 spenderAllowance = allowances[src][spender]; + uint96 amount = safe96( + rawAmount, + "Comp::approve: amount exceeds 96 bits" + ); + + if (spender != src && spenderAllowance != uint96(-1)) { + uint96 newAllowance = sub96( + spenderAllowance, + amount, + "Comp::transferFrom: transfer amount exceeds spender allowance" + ); + allowances[src][spender] = newAllowance; + + emit Approval(src, spender, newAllowance); + } + + _transferTokens(src, dst, amount); + return true; + } + + /** + * @notice Delegate votes from `msg.sender` to `delegatee` + * @param delegatee The address to delegate votes to + */ + function delegate(address delegatee, uint96 amount) public { + return _delegate(msg.sender, delegatee, amount); + } + + function undelegate(address delegatee, uint96 amount) public { + return _undelegate(msg.sender, delegatee, amount); + } + + /** + * @notice Delegates votes from signatory to `delegatee` + * @param delegatee The address to delegate votes to + * @param nonce The contract state required to match the signature + * @param expiry The time at which to expire the signature + * @param v The recovery byte of the signature + * @param r Half of the ECDSA signature pair + * @param s Half of the ECDSA signature pair + */ + function delegateBySig( + address delegatee, + uint256 nonce, + uint256 expiry, + uint8 v, + bytes32 r, + bytes32 s, + uint96 amount + ) public { + bytes32 domainSeparator = keccak256( + abi.encode( + DOMAIN_TYPEHASH, + keccak256(bytes(name)), + getChainId(), + address(this) + ) + ); + bytes32 structHash = keccak256( + abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry, amount) + ); + bytes32 digest = keccak256( + abi.encodePacked("\x19\x01", domainSeparator, structHash) + ); + address signatory = ecrecover(digest, v, r, s); + require( + signatory != address(0), + "Comp::delegateBySig: invalid signature" + ); + require( + nonce == nonces[signatory]++, + "Comp::delegateBySig: invalid nonce" + ); + require(now <= expiry, "Comp::delegateBySig: signature expired"); + return _delegate(signatory, delegatee, amount); + } + + function undelegateBySig( + address delegatee, + uint256 nonce, + uint256 expiry, + uint8 v, + bytes32 r, + bytes32 s, + uint96 amount + ) public { + bytes32 domainSeparator = keccak256( + abi.encode( + DOMAIN_TYPEHASH, + keccak256(bytes(name)), + getChainId(), + address(this) + ) + ); + bytes32 structHash = keccak256( + abi.encode(UNDELEGATION_TYPEHASH, delegatee, nonce, expiry, amount) + ); + bytes32 digest = keccak256( + abi.encodePacked("\x19\x01", domainSeparator, structHash) + ); + address signatory = ecrecover(digest, v, r, s); + require( + signatory != address(0), + "Comp::undelegateBySig: invalid signature" + ); + require( + nonce == nonces[signatory]++, + "Comp::undelegateBySig: invalid nonce" + ); + require(now <= expiry, "Comp::undelegateBySig: signature expired"); + return _undelegate(signatory, delegatee, amount); + } + + /** + * @notice Gets the current votes balance for `account` + * @param account The address to get votes balance + * @return The number of current votes for `account` + */ + function getCurrentVotes(address account) external view returns (uint96) { + uint32 nCheckpoints = numCheckpoints[account]; + return + nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; + } + + /** + * @notice Determine the prior number of votes for an account as of a block number + * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. + * @param account The address of the account to check + * @param blockNumber The block number to get the vote balance at + * @return The number of votes the account had as of the given block + */ + function getPriorVotes(address account, uint256 blockNumber) + public + view + returns (uint96) + { + require( + blockNumber < block.number, + "Comp::getPriorVotes: not yet determined" + ); + + uint32 nCheckpoints = numCheckpoints[account]; + if (nCheckpoints == 0) { + return 0; + } + + // First check most recent balance + if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { + return checkpoints[account][nCheckpoints - 1].votes; + } + + // Next check implicit zero balance + if (checkpoints[account][0].fromBlock > blockNumber) { + return 0; + } + + uint32 lower = 0; + uint32 upper = nCheckpoints - 1; + while (upper > lower) { + uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow + Checkpoint memory cp = checkpoints[account][center]; + if (cp.fromBlock == blockNumber) { + return cp.votes; + } else if (cp.fromBlock < blockNumber) { + lower = center; + } else { + upper = center - 1; + } + } + return checkpoints[account][lower].votes; + } + + function _delegate( + address delegator, + address delegatee, + uint96 amount + ) internal { + delegates[delegator][address(0)] = sub96( + delegates[delegator][address(0)], + amount, + "Comp: delegates underflow" + ); + delegates[delegator][delegatee] = add96( + delegates[delegator][delegatee], + amount, + "Comp: delegates overflow" + ); + + emit DelegateChanged(delegator, address(0), delegatee); + + _moveDelegates(address(0), delegatee, amount); + } + + function _undelegate( + address delegator, + address delegatee, + uint96 amount + ) internal { + delegates[delegator][delegatee] = sub96( + delegates[delegator][delegatee], + amount, + "Comp: undelegates underflow" + ); + delegates[delegator][address(0)] = add96( + delegates[delegator][address(0)], + amount, + "Comp: delegates underflow" + ); + emit DelegateChanged(delegator, delegatee, address(0)); + _moveDelegates(delegatee, address(0), amount); + } + + function _transferTokens( + address src, + address dst, + uint96 amount + ) internal { + require( + src != address(0), + "Comp::_transferTokens: cannot transfer from the zero address" + ); + require( + delegates[src][address(0)] >= amount, + "Comp: _transferTokens: undelegated amount should be greater than transfer amount" + ); + require( + dst != address(0), + "Comp::_transferTokens: cannot transfer to the zero address" + ); + + balances[src] = sub96( + balances[src], + amount, + "Comp::_transferTokens: transfer amount exceeds balance" + ); + delegates[src][address(0)] = sub96( + delegates[src][address(0)], + amount, + "Comp: _tranferTokens: undelegate subtraction error" + ); + + balances[dst] = add96( + balances[dst], + amount, + "Comp::_transferTokens: transfer amount overflows" + ); + delegates[dst][address(0)] = add96( + delegates[dst][address(0)], + amount, + "Comp: _transferTokens: undelegate addition error" + ); + emit Transfer(src, dst, amount); + + // _moveDelegates(delegates[src], delegates[dst], amount); + } + + function _moveDelegates( + address srcRep, + address dstRep, + uint96 amount + ) internal { + if (srcRep != dstRep && amount > 0) { + if (srcRep != address(0)) { + uint32 srcRepNum = numCheckpoints[srcRep]; + uint96 srcRepOld = srcRepNum > 0 + ? checkpoints[srcRep][srcRepNum - 1].votes + : 0; + uint96 srcRepNew = sub96( + srcRepOld, + amount, + "Comp::_moveVotes: vote amount underflows" + ); + _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); + } + + if (dstRep != address(0)) { + uint32 dstRepNum = numCheckpoints[dstRep]; + uint96 dstRepOld = dstRepNum > 0 + ? checkpoints[dstRep][dstRepNum - 1].votes + : 0; + uint96 dstRepNew = add96( + dstRepOld, + amount, + "Comp::_moveVotes: vote amount overflows" + ); + _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); + } + } + } + + function _writeCheckpoint( + address delegatee, + uint32 nCheckpoints, + uint96 oldVotes, + uint96 newVotes + ) internal { + uint32 blockNumber = safe32( + block.number, + "Comp::_writeCheckpoint: block number exceeds 32 bits" + ); + + if ( + nCheckpoints > 0 && + checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber + ) { + checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; + } else { + checkpoints[delegatee][nCheckpoints] = Checkpoint( + blockNumber, + newVotes + ); + numCheckpoints[delegatee] = nCheckpoints + 1; + } + + emit DelegateVotesChanged(delegatee, oldVotes, newVotes); + } + + function safe32(uint256 n, string memory errorMessage) + internal + pure + returns (uint32) + { + require(n < 2**32, errorMessage); + return uint32(n); + } + + function safe96(uint256 n, string memory errorMessage) + internal + pure + returns (uint96) + { + require(n < 2**96, errorMessage); + return uint96(n); + } + + function add96( + uint96 a, + uint96 b, + string memory errorMessage + ) internal pure returns (uint96) { + uint96 c = a + b; + require(c >= a, errorMessage); + return c; + } + + function sub96( + uint96 a, + uint96 b, + string memory errorMessage + ) internal pure returns (uint96) { + require(b <= a, errorMessage); + return a - b; + } + + function getChainId() internal pure returns (uint256) { + uint256 chainId; + assembly { + chainId := chainid() + } + return chainId; + } +} diff --git a/packages/chain-events/eth/contracts/Compound/Timelock.sol b/packages/chain-events/eth/contracts/Compound/Timelock.sol new file mode 100644 index 00000000000..792258a45b2 --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/Timelock.sol @@ -0,0 +1,206 @@ +pragma solidity >=0.4.21 <0.7.0; + +import "@openzeppelin/contracts/math/SafeMath.sol"; + + +contract Timelock { + using SafeMath for uint256; + + event NewAdmin(address indexed newAdmin); + event NewPendingAdmin(address indexed newPendingAdmin); + event NewDelay(uint256 indexed newDelay); + event CancelTransaction( + bytes32 indexed txHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 eta + ); + event ExecuteTransaction( + bytes32 indexed txHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 eta + ); + event QueueTransaction( + bytes32 indexed txHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 eta + ); + + uint256 public constant GRACE_PERIOD = 14 days; + uint256 public constant MINIMUM_DELAY = 2 days; + uint256 public constant MAXIMUM_DELAY = 30 days; + + address public admin; + address public pendingAdmin; + uint256 public delay; + + mapping(bytes32 => bool) public queuedTransactions; + + constructor(address admin_, uint256 delay_) public { + require( + delay_ >= MINIMUM_DELAY, + "Timelock::constructor: Delay must exceed minimum delay." + ); + require( + delay_ <= MAXIMUM_DELAY, + "Timelock::setDelay: Delay must not exceed maximum delay." + ); + + admin = admin_; + delay = delay_; + } + + function() external payable {} + + function setDelay(uint256 delay_) public { + require( + msg.sender == address(this), + "Timelock::setDelay: Call must come from Timelock." + ); + require( + delay_ >= MINIMUM_DELAY, + "Timelock::setDelay: Delay must exceed minimum delay." + ); + require( + delay_ <= MAXIMUM_DELAY, + "Timelock::setDelay: Delay must not exceed maximum delay." + ); + delay = delay_; + + emit NewDelay(delay); + } + + function acceptAdmin() public { + require( + msg.sender == pendingAdmin, + "Timelock::acceptAdmin: Call must come from pendingAdmin." + ); + admin = msg.sender; + pendingAdmin = address(0); + + emit NewAdmin(admin); + } + + function setPendingAdmin(address pendingAdmin_) public { + require( + msg.sender == address(this), + "Timelock::setPendingAdmin: Call must come from Timelock." + ); + pendingAdmin = pendingAdmin_; + + emit NewPendingAdmin(pendingAdmin); + } + + function queueTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) public returns (bytes32) { + require( + msg.sender == admin, + "Timelock::queueTransaction: Call must come from admin." + ); + require( + eta >= getBlockTimestamp().add(delay), + "Timelock::queueTransaction: Estimated execution block must satisfy delay." + ); + + bytes32 txHash = keccak256( + abi.encode(target, value, signature, data, eta) + ); + queuedTransactions[txHash] = true; + + emit QueueTransaction(txHash, target, value, signature, data, eta); + return txHash; + } + + function cancelTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) public { + require( + msg.sender == admin, + "Timelock::cancelTransaction: Call must come from admin." + ); + + bytes32 txHash = keccak256( + abi.encode(target, value, signature, data, eta) + ); + queuedTransactions[txHash] = false; + + emit CancelTransaction(txHash, target, value, signature, data, eta); + } + + function executeTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) public payable returns (bytes memory) { + require( + msg.sender == admin, + "Timelock::executeTransaction: Call must come from admin." + ); + + bytes32 txHash = keccak256( + abi.encode(target, value, signature, data, eta) + ); + require( + queuedTransactions[txHash], + "Timelock::executeTransaction: Transaction hasn't been queued." + ); + require( + getBlockTimestamp() >= eta, + "Timelock::executeTransaction: Transaction hasn't surpassed time lock." + ); + require( + getBlockTimestamp() <= eta.add(GRACE_PERIOD), + "Timelock::executeTransaction: Transaction is stale." + ); + + queuedTransactions[txHash] = false; + + bytes memory callData; + + if (bytes(signature).length == 0) { + callData = data; + } else { + callData = abi.encodePacked( + bytes4(keccak256(bytes(signature))), + data + ); + } + + // solium-disable-next-line security/no-call-value + (bool success, bytes memory returnData) = target.call.value(value)( + callData + ); + require( + success, + "Timelock::executeTransaction: Transaction execution reverted." + ); + + emit ExecuteTransaction(txHash, target, value, signature, data, eta); + + return returnData; + } + + function getBlockTimestamp() internal view returns (uint256) { + // solium-disable-next-line security/no-block-members + return block.timestamp; + } +} diff --git a/packages/chain-events/eth/contracts/Compound/TimelockMock.sol b/packages/chain-events/eth/contracts/Compound/TimelockMock.sol new file mode 100644 index 00000000000..103d030c102 --- /dev/null +++ b/packages/chain-events/eth/contracts/Compound/TimelockMock.sol @@ -0,0 +1,211 @@ +pragma solidity >=0.4.21 <0.7.0; + +import "@openzeppelin/contracts/math/SafeMath.sol"; + + +contract TimelockMock { + using SafeMath for uint256; + + event NewAdmin(address indexed newAdmin); + event NewPendingAdmin(address indexed newPendingAdmin); + event NewDelay(uint256 indexed newDelay); + event CancelTransaction( + bytes32 indexed txHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 eta + ); + event ExecuteTransaction( + bytes32 indexed txHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 eta + ); + event QueueTransaction( + bytes32 indexed txHash, + address indexed target, + uint256 value, + string signature, + bytes data, + uint256 eta + ); + + uint256 public constant GRACE_PERIOD = 14 minutes; + uint256 public constant MINIMUM_DELAY = 2 minutes; + uint256 public constant MAXIMUM_DELAY = 30 minutes; + + address public admin; + address public pendingAdmin; + uint256 public delay; + + mapping(bytes32 => bool) public queuedTransactions; + + constructor(address admin_, uint256 delay_) public { + require( + delay_ >= MINIMUM_DELAY, + "TimelockMock::constructor: Delay must exceed minimum delay." + ); + require( + delay_ <= MAXIMUM_DELAY, + "TimelockMock::setDelay: Delay must not exceed maximum delay." + ); + + admin = admin_; + delay = delay_; + } + + function() external payable {} + + function setDelay(uint256 delay_) public { + require( + msg.sender == address(this), + "TimelockMock::setDelay: Call must come from TimelockMock." + ); + require( + delay_ >= MINIMUM_DELAY, + "TimelockMock::setDelay: Delay must exceed minimum delay." + ); + require( + delay_ <= MAXIMUM_DELAY, + "TimelockMock::setDelay: Delay must not exceed maximum delay." + ); + delay = delay_; + + emit NewDelay(delay); + } + + function acceptAdmin() public { + require( + msg.sender == pendingAdmin, + "TimelockMock::acceptAdmin: Call must come from pendingAdmin." + ); + admin = msg.sender; + pendingAdmin = address(0); + + emit NewAdmin(admin); + } + + function setPendingAdmin(address pendingAdmin_) public { + require( + msg.sender == address(this), + "TimelockMock::setPendingAdmin: Call must come from TimelockMock." + ); + pendingAdmin = pendingAdmin_; + + emit NewPendingAdmin(pendingAdmin); + } + + function queueTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) public returns (bytes32) { + // Remove this check for integration test purposes. We just want the events. + // require( + // msg.sender == admin, + // "TimelockMock::queueTransaction: Call must come from admin." + // ); + require( + eta >= getBlockTimestamp().add(delay), + "TimelockMock::queueTransaction: Estimated execution block must satisfy delay." + ); + + bytes32 txHash = keccak256( + abi.encode(target, value, signature, data, eta) + ); + queuedTransactions[txHash] = true; + + emit QueueTransaction(txHash, target, value, signature, data, eta); + return txHash; + } + + function cancelTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) public { + // Remove requirement for testing purposes. + // require( + // msg.sender == admin, + // "TimelockMock::cancelTransaction: Call must come from admin." + // ); + + bytes32 txHash = keccak256( + abi.encode(target, value, signature, data, eta) + ); + queuedTransactions[txHash] = false; + + emit CancelTransaction(txHash, target, value, signature, data, eta); + } + + function executeTransaction( + address target, + uint256 value, + string memory signature, + bytes memory data, + uint256 eta + ) public payable returns (bytes memory) { + + // Remove this check for integration test purposes. We just want the events. + // require( + // msg.sender == admin, + // "TimelockMock::executeTransaction: Call must come from admin." + // ); + + bytes32 txHash = keccak256( + abi.encode(target, value, signature, data, eta) + ); + require( + queuedTransactions[txHash], + "TimelockMock::executeTransaction: Transaction hasn't been queued." + ); + // Modify contract again for speeding up testing. + // require( + // getBlockTimestamp() >= eta, + // "TimelockMock::executeTransaction: Transaction hasn't surpassed time lock." + // ); + require( + getBlockTimestamp() <= eta.add(GRACE_PERIOD), + "TimelockMock::executeTransaction: Transaction is stale." + ); + + queuedTransactions[txHash] = false; + + bytes memory callData; + + if (bytes(signature).length == 0) { + callData = data; + } else { + callData = abi.encodePacked( + bytes4(keccak256(bytes(signature))), + data + ); + } + + // solium-disable-next-line security/no-call-value + (bool success, bytes memory returnData) = target.call.value(value)( + callData + ); + require( + success, + "TimelockMock::executeTransaction: Transaction execution reverted." + ); + + emit ExecuteTransaction(txHash, target, value, signature, data, eta); + + return returnData; + } + + function getBlockTimestamp() internal view returns (uint256) { + // solium-disable-next-line security/no-block-members + return block.timestamp; + } +} diff --git a/packages/chain-events/eth/contracts/Migrations.sol b/packages/chain-events/eth/contracts/Migrations.sol new file mode 100644 index 00000000000..478d5f35efe --- /dev/null +++ b/packages/chain-events/eth/contracts/Migrations.sol @@ -0,0 +1,23 @@ +pragma solidity >=0.4.21 <0.7.0; + +contract Migrations { + address public owner; + uint public last_completed_migration; + + constructor() public { + owner = msg.sender; + } + + modifier restricted() { + if (msg.sender == owner) _; + } + + function setCompleted(uint completed) public restricted { + last_completed_migration = completed; + } + + function upgrade(address new_address) public restricted { + Migrations upgraded = Migrations(new_address); + upgraded.setCompleted(last_completed_migration); + } +} \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/MolochV1/GuildBank.sol b/packages/chain-events/eth/contracts/MolochV1/GuildBank.sol new file mode 100644 index 00000000000..e83bfd56a32 --- /dev/null +++ b/packages/chain-events/eth/contracts/MolochV1/GuildBank.sol @@ -0,0 +1,23 @@ +pragma solidity ^0.5.3; + +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "@openzeppelin/contracts/ownership/Ownable.sol"; +import "@openzeppelin/contracts/math/SafeMath.sol"; + +contract GuildBank1 is Ownable { + using SafeMath for uint256; + + IERC20 public approvedToken; // approved token contract reference + + event Withdrawal(address indexed receiver, uint256 amount); + + constructor(address approvedTokenAddress) public { + approvedToken = IERC20(approvedTokenAddress); + } + + function withdraw(address receiver, uint256 shares, uint256 totalShares) public onlyOwner returns (bool) { + uint256 amount = approvedToken.balanceOf(address(this)).mul(shares).div(totalShares); + emit Withdrawal(receiver, amount); + return approvedToken.transfer(receiver, amount); + } +} \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/MolochV1/Moloch.sol b/packages/chain-events/eth/contracts/MolochV1/Moloch.sol new file mode 100644 index 00000000000..7bca8012c2e --- /dev/null +++ b/packages/chain-events/eth/contracts/MolochV1/Moloch.sol @@ -0,0 +1,414 @@ +pragma solidity ^0.5.3; + +import "@openzeppelin/contracts/math/SafeMath.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "./GuildBank.sol"; + +contract Moloch1 { + using SafeMath for uint256; + + /*************** + GLOBAL CONSTANTS + ***************/ + uint256 public periodDuration; // default = 17280 = 4.8 hours in seconds (5 periods per day) + uint256 public votingPeriodLength; // default = 35 periods (7 days) + uint256 public gracePeriodLength; // default = 35 periods (7 days) + uint256 public abortWindow; // default = 5 periods (1 day) + uint256 public proposalDeposit; // default = 10 ETH (~$1,000 worth of ETH at contract deployment) + uint256 public dilutionBound; // default = 3 - maximum multiplier a YES voter will be obligated to pay in case of mass ragequit + uint256 public processingReward; // default = 0.1 - amount of ETH to give to whoever processes a proposal + uint256 public summoningTime; // needed to determine the current period + + IERC20 public approvedToken; // approved token contract reference; default = wETH + GuildBank1 public guildBank; // guild bank contract reference + + // HARD-CODED LIMITS + // These numbers are quite arbitrary; they are small enough to avoid overflows when doing calculations + // with periods or shares, yet big enough to not limit reasonable use cases. + uint256 constant MAX_VOTING_PERIOD_LENGTH = 10**18; // maximum length of voting period + uint256 constant MAX_GRACE_PERIOD_LENGTH = 10**18; // maximum length of grace period + uint256 constant MAX_DILUTION_BOUND = 10**18; // maximum dilution bound + uint256 constant MAX_NUMBER_OF_SHARES = 10**18; // maximum number of shares that can be minted + + /*************** + EVENTS + ***************/ + event SubmitProposal(uint256 proposalIndex, address indexed delegateKey, address indexed memberAddress, address indexed applicant, uint256 tokenTribute, uint256 sharesRequested); + event SubmitVote(uint256 indexed proposalIndex, address indexed delegateKey, address indexed memberAddress, uint8 uintVote); + event ProcessProposal(uint256 indexed proposalIndex, address indexed applicant, address indexed memberAddress, uint256 tokenTribute, uint256 sharesRequested, bool didPass); + event Ragequit(address indexed memberAddress, uint256 sharesToBurn); + event Abort(uint256 indexed proposalIndex, address applicantAddress); + event UpdateDelegateKey(address indexed memberAddress, address newDelegateKey); + event SummonComplete(address indexed summoner, uint256 shares); + + /****************** + INTERNAL ACCOUNTING + ******************/ + uint256 public totalShares = 0; // total shares across all members + uint256 public totalSharesRequested = 0; // total shares that have been requested in unprocessed proposals + + enum Vote { + Null, // default value, counted as abstention + Yes, + No + } + + struct Member { + address delegateKey; // the key responsible for submitting proposals and voting - defaults to member address unless updated + uint256 shares; // the # of shares assigned to this member + bool exists; // always true once a member has been created + uint256 highestIndexYesVote; // highest proposal index # on which the member voted YES + } + + struct Proposal { + address proposer; // the member who submitted the proposal + address applicant; // the applicant who wishes to become a member - this key will be used for withdrawals + uint256 sharesRequested; // the # of shares the applicant is requesting + uint256 startingPeriod; // the period in which voting can start for this proposal + uint256 yesVotes; // the total number of YES votes for this proposal + uint256 noVotes; // the total number of NO votes for this proposal + bool processed; // true only if the proposal has been processed + bool didPass; // true only if the proposal passed + bool aborted; // true only if applicant calls "abort" fn before end of voting period + uint256 tokenTribute; // amount of tokens offered as tribute + string details; // proposal details - could be IPFS hash, plaintext, or JSON + uint256 maxTotalSharesAtYesVote; // the maximum # of total shares encountered at a yes vote on this proposal + mapping (address => Vote) votesByMember; // the votes on this proposal by each member + } + + mapping (address => Member) public members; + mapping (address => address) public memberAddressByDelegateKey; + Proposal[] public proposalQueue; + + /******** + MODIFIERS + ********/ + modifier onlyMember { + require(members[msg.sender].shares > 0, "Moloch::onlyMember - not a member"); + _; + } + + modifier onlyDelegate { + require(members[memberAddressByDelegateKey[msg.sender]].shares > 0, "Moloch::onlyDelegate - not a delegate"); + _; + } + + /******** + FUNCTIONS + ********/ + constructor( + address summoner, + address _approvedToken, + uint256 _periodDuration, + uint256 _votingPeriodLength, + uint256 _gracePeriodLength, + uint256 _abortWindow, + uint256 _proposalDeposit, + uint256 _dilutionBound, + uint256 _processingReward + ) public { + require(summoner != address(0), "Moloch::constructor - summoner cannot be 0"); + require(_approvedToken != address(0), "Moloch::constructor - _approvedToken cannot be 0"); + require(_periodDuration > 0, "Moloch::constructor - _periodDuration cannot be 0"); + require(_votingPeriodLength > 0, "Moloch::constructor - _votingPeriodLength cannot be 0"); + require(_votingPeriodLength <= MAX_VOTING_PERIOD_LENGTH, "Moloch::constructor - _votingPeriodLength exceeds limit"); + require(_gracePeriodLength <= MAX_GRACE_PERIOD_LENGTH, "Moloch::constructor - _gracePeriodLength exceeds limit"); + require(_abortWindow > 0, "Moloch::constructor - _abortWindow cannot be 0"); + require(_abortWindow <= _votingPeriodLength, "Moloch::constructor - _abortWindow must be smaller than or equal to _votingPeriodLength"); + require(_dilutionBound > 0, "Moloch::constructor - _dilutionBound cannot be 0"); + require(_dilutionBound <= MAX_DILUTION_BOUND, "Moloch::constructor - _dilutionBound exceeds limit"); + require(_proposalDeposit >= _processingReward, "Moloch::constructor - _proposalDeposit cannot be smaller than _processingReward"); + + approvedToken = IERC20(_approvedToken); + + guildBank = new GuildBank1(_approvedToken); + + periodDuration = _periodDuration; + votingPeriodLength = _votingPeriodLength; + gracePeriodLength = _gracePeriodLength; + abortWindow = _abortWindow; + proposalDeposit = _proposalDeposit; + dilutionBound = _dilutionBound; + processingReward = _processingReward; + + summoningTime = now; + + members[summoner] = Member(summoner, 1, true, 0); + memberAddressByDelegateKey[summoner] = summoner; + totalShares = 1; + + emit SummonComplete(summoner, 1); + } + + /***************** + PROPOSAL FUNCTIONS + *****************/ + + function submitProposal( + address applicant, + uint256 tokenTribute, + uint256 sharesRequested, + string memory details + ) + public + onlyDelegate + { + require(applicant != address(0), "Moloch::submitProposal - applicant cannot be 0"); + + // Make sure we won't run into overflows when doing calculations with shares. + // Note that totalShares + totalSharesRequested + sharesRequested is an upper bound + // on the number of shares that can exist until this proposal has been processed. + require(totalShares.add(totalSharesRequested).add(sharesRequested) <= MAX_NUMBER_OF_SHARES, "Moloch::submitProposal - too many shares requested"); + + totalSharesRequested = totalSharesRequested.add(sharesRequested); + + address memberAddress = memberAddressByDelegateKey[msg.sender]; + + // collect proposal deposit from proposer and store it in the Moloch until the proposal is processed + require(approvedToken.transferFrom(msg.sender, address(this), proposalDeposit), "Moloch::submitProposal - proposal deposit token transfer failed"); + + // collect tribute from applicant and store it in the Moloch until the proposal is processed + require(approvedToken.transferFrom(applicant, address(this), tokenTribute), "Moloch::submitProposal - tribute token transfer failed"); + + // compute startingPeriod for proposal + uint256 startingPeriod = max( + getCurrentPeriod(), + proposalQueue.length == 0 ? 0 : proposalQueue[proposalQueue.length.sub(1)].startingPeriod + ).add(1); + + // create proposal ... + Proposal memory proposal = Proposal({ + proposer: memberAddress, + applicant: applicant, + sharesRequested: sharesRequested, + startingPeriod: startingPeriod, + yesVotes: 0, + noVotes: 0, + processed: false, + didPass: false, + aborted: false, + tokenTribute: tokenTribute, + details: details, + maxTotalSharesAtYesVote: 0 + }); + + // ... and append it to the queue + proposalQueue.push(proposal); + + uint256 proposalIndex = proposalQueue.length.sub(1); + emit SubmitProposal(proposalIndex, msg.sender, memberAddress, applicant, tokenTribute, sharesRequested); + } + + function submitVote(uint256 proposalIndex, uint8 uintVote) public onlyDelegate { + address memberAddress = memberAddressByDelegateKey[msg.sender]; + Member storage member = members[memberAddress]; + + require(proposalIndex < proposalQueue.length, "Moloch::submitVote - proposal does not exist"); + Proposal storage proposal = proposalQueue[proposalIndex]; + + require(uintVote < 3, "Moloch::submitVote - uintVote must be less than 3"); + Vote vote = Vote(uintVote); + + require(getCurrentPeriod() >= proposal.startingPeriod, "Moloch::submitVote - voting period has not started"); + require(!hasVotingPeriodExpired(proposal.startingPeriod), "Moloch::submitVote - proposal voting period has expired"); + require(proposal.votesByMember[memberAddress] == Vote.Null, "Moloch::submitVote - member has already voted on this proposal"); + require(vote == Vote.Yes || vote == Vote.No, "Moloch::submitVote - vote must be either Yes or No"); + require(!proposal.aborted, "Moloch::submitVote - proposal has been aborted"); + + // store vote + proposal.votesByMember[memberAddress] = vote; + + // count vote + if (vote == Vote.Yes) { + proposal.yesVotes = proposal.yesVotes.add(member.shares); + + // set highest index (latest) yes vote - must be processed for member to ragequit + if (proposalIndex > member.highestIndexYesVote) { + member.highestIndexYesVote = proposalIndex; + } + + // set maximum of total shares encountered at a yes vote - used to bound dilution for yes voters + if (totalShares > proposal.maxTotalSharesAtYesVote) { + proposal.maxTotalSharesAtYesVote = totalShares; + } + + } else if (vote == Vote.No) { + proposal.noVotes = proposal.noVotes.add(member.shares); + } + + emit SubmitVote(proposalIndex, msg.sender, memberAddress, uintVote); + } + + function processProposal(uint256 proposalIndex) public { + require(proposalIndex < proposalQueue.length, "Moloch::processProposal - proposal does not exist"); + Proposal storage proposal = proposalQueue[proposalIndex]; + + require(getCurrentPeriod() >= proposal.startingPeriod.add(votingPeriodLength).add(gracePeriodLength), "Moloch::processProposal - proposal is not ready to be processed"); + require(proposal.processed == false, "Moloch::processProposal - proposal has already been processed"); + require(proposalIndex == 0 || proposalQueue[proposalIndex.sub(1)].processed, "Moloch::processProposal - previous proposal must be processed"); + + proposal.processed = true; + totalSharesRequested = totalSharesRequested.sub(proposal.sharesRequested); + + bool didPass = proposal.yesVotes > proposal.noVotes; + + // Make the proposal fail if the dilutionBound is exceeded + if (totalShares.mul(dilutionBound) < proposal.maxTotalSharesAtYesVote) { + didPass = false; + } + + // PROPOSAL PASSED + if (didPass && !proposal.aborted) { + + proposal.didPass = true; + + // if the applicant is already a member, add to their existing shares + if (members[proposal.applicant].exists) { + members[proposal.applicant].shares = members[proposal.applicant].shares.add(proposal.sharesRequested); + + // the applicant is a new member, create a new record for them + } else { + // if the applicant address is already taken by a member's delegateKey, reset it to their member address + if (members[memberAddressByDelegateKey[proposal.applicant]].exists) { + address memberToOverride = memberAddressByDelegateKey[proposal.applicant]; + memberAddressByDelegateKey[memberToOverride] = memberToOverride; + members[memberToOverride].delegateKey = memberToOverride; + } + + // use applicant address as delegateKey by default + members[proposal.applicant] = Member(proposal.applicant, proposal.sharesRequested, true, 0); + memberAddressByDelegateKey[proposal.applicant] = proposal.applicant; + } + + // mint new shares + totalShares = totalShares.add(proposal.sharesRequested); + + // transfer tokens to guild bank + require( + approvedToken.transfer(address(guildBank), proposal.tokenTribute), + "Moloch::processProposal - token transfer to guild bank failed" + ); + + // PROPOSAL FAILED OR ABORTED + } else { + // return all tokens to the applicant + require( + approvedToken.transfer(proposal.applicant, proposal.tokenTribute), + "Moloch::processProposal - failing vote token transfer failed" + ); + } + + // send msg.sender the processingReward + require( + approvedToken.transfer(msg.sender, processingReward), + "Moloch::processProposal - failed to send processing reward to msg.sender" + ); + + // return deposit to proposer (subtract processing reward) + require( + approvedToken.transfer(proposal.proposer, proposalDeposit.sub(processingReward)), + "Moloch::processProposal - failed to return proposal deposit to proposer" + ); + + emit ProcessProposal( + proposalIndex, + proposal.applicant, + proposal.proposer, + proposal.tokenTribute, + proposal.sharesRequested, + didPass + ); + } + + function ragequit(uint256 sharesToBurn) public onlyMember { + uint256 initialTotalShares = totalShares; + + Member storage member = members[msg.sender]; + + require(member.shares >= sharesToBurn, "Moloch::ragequit - insufficient shares"); + + require(canRagequit(member.highestIndexYesVote), "Moloch::ragequit - cant ragequit until highest index proposal member voted YES on is processed"); + + // burn shares + member.shares = member.shares.sub(sharesToBurn); + totalShares = totalShares.sub(sharesToBurn); + + // instruct guildBank to transfer fair share of tokens to the ragequitter + require( + guildBank.withdraw(msg.sender, sharesToBurn, initialTotalShares), + "Moloch::ragequit - withdrawal of tokens from guildBank failed" + ); + + emit Ragequit(msg.sender, sharesToBurn); + } + + function abort(uint256 proposalIndex) public { + require(proposalIndex < proposalQueue.length, "Moloch::abort - proposal does not exist"); + Proposal storage proposal = proposalQueue[proposalIndex]; + + require(msg.sender == proposal.applicant, "Moloch::abort - msg.sender must be applicant"); + require(getCurrentPeriod() < proposal.startingPeriod.add(abortWindow), "Moloch::abort - abort window must not have passed"); + require(!proposal.aborted, "Moloch::abort - proposal must not have already been aborted"); + + uint256 tokensToAbort = proposal.tokenTribute; + proposal.tokenTribute = 0; + proposal.aborted = true; + + // return all tokens to the applicant + require( + approvedToken.transfer(proposal.applicant, tokensToAbort), + "Moloch::processProposal - failed to return tribute to applicant" + ); + + emit Abort(proposalIndex, msg.sender); + } + + function updateDelegateKey(address newDelegateKey) public onlyMember { + require(newDelegateKey != address(0), "Moloch::updateDelegateKey - newDelegateKey cannot be 0"); + + // skip checks if member is setting the delegate key to their member address + if (newDelegateKey != msg.sender) { + require(!members[newDelegateKey].exists, "Moloch::updateDelegateKey - cant overwrite existing members"); + require(!members[memberAddressByDelegateKey[newDelegateKey]].exists, "Moloch::updateDelegateKey - cant overwrite existing delegate keys"); + } + + Member storage member = members[msg.sender]; + memberAddressByDelegateKey[member.delegateKey] = address(0); + memberAddressByDelegateKey[newDelegateKey] = msg.sender; + member.delegateKey = newDelegateKey; + + emit UpdateDelegateKey(msg.sender, newDelegateKey); + } + + /*************** + GETTER FUNCTIONS + ***************/ + + function max(uint256 x, uint256 y) internal pure returns (uint256) { + return x >= y ? x : y; + } + + function getCurrentPeriod() public view returns (uint256) { + return now.sub(summoningTime).div(periodDuration); + } + + function getProposalQueueLength() public view returns (uint256) { + return proposalQueue.length; + } + + // can only ragequit if the latest proposal you voted YES on has been processed + function canRagequit(uint256 highestIndexYesVote) public view returns (bool) { + require(highestIndexYesVote < proposalQueue.length, "Moloch::canRagequit - proposal does not exist"); + return proposalQueue[highestIndexYesVote].processed; + } + + function hasVotingPeriodExpired(uint256 startingPeriod) public view returns (bool) { + return getCurrentPeriod() >= startingPeriod.add(votingPeriodLength); + } + + function getMemberProposalVote(address memberAddress, uint256 proposalIndex) public view returns (Vote) { + require(members[memberAddress].exists, "Moloch::getMemberProposalVote - member doesn't exist"); + require(proposalIndex < proposalQueue.length, "Moloch::getMemberProposalVote - proposal doesn't exist"); + return proposalQueue[proposalIndex].votesByMember[memberAddress]; + } +} \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/MolochV1/Token.sol b/packages/chain-events/eth/contracts/MolochV1/Token.sol new file mode 100644 index 00000000000..f15c025bb4a --- /dev/null +++ b/packages/chain-events/eth/contracts/MolochV1/Token.sol @@ -0,0 +1,9 @@ +pragma solidity ^0.5.2; + +import "./oz/ERC20.sol"; + +contract Token is ERC20 { + constructor(uint256 supply) public { + _mint(msg.sender, supply); + } +} \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/MolochV1/oz/ERC20.sol b/packages/chain-events/eth/contracts/MolochV1/oz/ERC20.sol new file mode 100644 index 00000000000..aadf6b76912 --- /dev/null +++ b/packages/chain-events/eth/contracts/MolochV1/oz/ERC20.sol @@ -0,0 +1,190 @@ +pragma solidity ^0.5.2; + +import "./IERC20.sol"; +import "./SafeMath.sol"; + +/** + * @title Standard ERC20 token + * + * @dev Implementation of the basic standard token. + * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md + * Originally based on code by FirstBlood: + * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol + * + * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for + * all accounts just by listening to said events. Note that this isn't required by the specification, and other + * compliant implementations may not do it. + */ +contract ERC20 is IERC20 { + using SafeMath for uint256; + + mapping (address => uint256) private _balances; + + mapping (address => mapping (address => uint256)) private _allowed; + + uint256 private _totalSupply; + + /** + * @dev Total number of tokens in existence + */ + function totalSupply() public view returns (uint256) { + return _totalSupply; + } + + /** + * @dev Gets the balance of the specified address. + * @param owner The address to query the balance of. + * @return An uint256 representing the amount owned by the passed address. + */ + function balanceOf(address owner) public view returns (uint256) { + return _balances[owner]; + } + + /** + * @dev Function to check the amount of tokens that an owner allowed to a spender. + * @param owner address The address which owns the funds. + * @param spender address The address which will spend the funds. + * @return A uint256 specifying the amount of tokens still available for the spender. + */ + function allowance(address owner, address spender) public view returns (uint256) { + return _allowed[owner][spender]; + } + + /** + * @dev Transfer token for a specified address + * @param to The address to transfer to. + * @param value The amount to be transferred. + */ + function transfer(address to, uint256 value) public returns (bool) { + _transfer(msg.sender, to, value); + return true; + } + + /** + * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. + * Beware that changing an allowance with this method brings the risk that someone may use both the old + * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this + * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: + * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 + * @param spender The address which will spend the funds. + * @param value The amount of tokens to be spent. + */ + function approve(address spender, uint256 value) public returns (bool) { + _approve(msg.sender, spender, value); + return true; + } + + /** + * @dev Transfer tokens from one address to another. + * Note that while this function emits an Approval event, this is not required as per the specification, + * and other compliant implementations may not emit the event. + * @param from address The address which you want to send tokens from + * @param to address The address which you want to transfer to + * @param value uint256 the amount of tokens to be transferred + */ + function transferFrom(address from, address to, uint256 value) public returns (bool) { + _transfer(from, to, value); + _approve(from, msg.sender, _allowed[from][msg.sender].sub(value)); + return true; + } + + /** + * @dev Increase the amount of tokens that an owner allowed to a spender. + * approve should be called when allowed_[_spender] == 0. To increment + * allowed value is better to use this function to avoid 2 calls (and wait until + * the first transaction is mined) + * From MonolithDAO Token.sol + * Emits an Approval event. + * @param spender The address which will spend the funds. + * @param addedValue The amount of tokens to increase the allowance by. + */ + function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { + _approve(msg.sender, spender, _allowed[msg.sender][spender].add(addedValue)); + return true; + } + + /** + * @dev Decrease the amount of tokens that an owner allowed to a spender. + * approve should be called when allowed_[_spender] == 0. To decrement + * allowed value is better to use this function to avoid 2 calls (and wait until + * the first transaction is mined) + * From MonolithDAO Token.sol + * Emits an Approval event. + * @param spender The address which will spend the funds. + * @param subtractedValue The amount of tokens to decrease the allowance by. + */ + function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { + _approve(msg.sender, spender, _allowed[msg.sender][spender].sub(subtractedValue)); + return true; + } + + /** + * @dev Transfer token for a specified addresses + * @param from The address to transfer from. + * @param to The address to transfer to. + * @param value The amount to be transferred. + */ + function _transfer(address from, address to, uint256 value) internal { + require(to != address(0)); + + _balances[from] = _balances[from].sub(value); + _balances[to] = _balances[to].add(value); + emit Transfer(from, to, value); + } + + /** + * @dev Internal function that mints an amount of the token and assigns it to + * an account. This encapsulates the modification of balances such that the + * proper events are emitted. + * @param account The account that will receive the created tokens. + * @param value The amount that will be created. + */ + function _mint(address account, uint256 value) internal { + require(account != address(0)); + + _totalSupply = _totalSupply.add(value); + _balances[account] = _balances[account].add(value); + emit Transfer(address(0), account, value); + } + + /** + * @dev Internal function that burns an amount of the token of a given + * account. + * @param account The account whose tokens will be burnt. + * @param value The amount that will be burnt. + */ + function _burn(address account, uint256 value) internal { + require(account != address(0)); + + _totalSupply = _totalSupply.sub(value); + _balances[account] = _balances[account].sub(value); + emit Transfer(account, address(0), value); + } + + /** + * @dev Approve an address to spend another addresses' tokens. + * @param owner The address that owns the tokens. + * @param spender The address that will spend the tokens. + * @param value The number of tokens that can be spent. + */ + function _approve(address owner, address spender, uint256 value) internal { + require(spender != address(0)); + require(owner != address(0)); + + _allowed[owner][spender] = value; + emit Approval(owner, spender, value); + } + + /** + * @dev Internal function that burns an amount of the token of a given + * account, deducting from the sender's allowance for said account. Uses the + * internal burn function. + * Emits an Approval event (reflecting the reduced allowance). + * @param account The account whose tokens will be burnt. + * @param value The amount that will be burnt. + */ + function _burnFrom(address account, uint256 value) internal { + _burn(account, value); + _approve(account, msg.sender, _allowed[account][msg.sender].sub(value)); + } +} diff --git a/packages/chain-events/eth/contracts/MolochV1/oz/IERC20.sol b/packages/chain-events/eth/contracts/MolochV1/oz/IERC20.sol new file mode 100644 index 00000000000..4d208c79660 --- /dev/null +++ b/packages/chain-events/eth/contracts/MolochV1/oz/IERC20.sol @@ -0,0 +1,23 @@ +pragma solidity ^0.5.2; + +/** + * @title ERC20 interface + * @dev see https://github.com/ethereum/EIPs/issues/20 + */ +interface IERC20 { + function transfer(address to, uint256 value) external returns (bool); + + function approve(address spender, uint256 value) external returns (bool); + + function transferFrom(address from, address to, uint256 value) external returns (bool); + + function totalSupply() external view returns (uint256); + + function balanceOf(address who) external view returns (uint256); + + function allowance(address owner, address spender) external view returns (uint256); + + event Transfer(address indexed from, address indexed to, uint256 value); + + event Approval(address indexed owner, address indexed spender, uint256 value); +} diff --git a/packages/chain-events/eth/contracts/MolochV1/oz/SafeMath.sol b/packages/chain-events/eth/contracts/MolochV1/oz/SafeMath.sol new file mode 100644 index 00000000000..5dd4bb903d0 --- /dev/null +++ b/packages/chain-events/eth/contracts/MolochV1/oz/SafeMath.sol @@ -0,0 +1,65 @@ +pragma solidity ^0.5.2; + +/** + * @title SafeMath + * @dev Unsigned math operations with safety checks that revert on error + */ +library SafeMath { + /** + * @dev Multiplies two unsigned integers, reverts on overflow. + */ + function mul(uint256 a, uint256 b) internal pure returns (uint256) { + // Gas optimization: this is cheaper than requiring 'a' not being zero, but the + // benefit is lost if 'b' is also tested. + // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 + if (a == 0) { + return 0; + } + + uint256 c = a * b; + require(c / a == b); + + return c; + } + + /** + * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero. + */ + function div(uint256 a, uint256 b) internal pure returns (uint256) { + // Solidity only automatically asserts when dividing by 0 + require(b > 0); + uint256 c = a / b; + // assert(a == b * c + a % b); // There is no case in which this doesn't hold + + return c; + } + + /** + * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). + */ + function sub(uint256 a, uint256 b) internal pure returns (uint256) { + require(b <= a); + uint256 c = a - b; + + return c; + } + + /** + * @dev Adds two unsigned integers, reverts on overflow. + */ + function add(uint256 a, uint256 b) internal pure returns (uint256) { + uint256 c = a + b; + require(c >= a); + + return c; + } + + /** + * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), + * reverts when dividing by zero. + */ + function mod(uint256 a, uint256 b) internal pure returns (uint256) { + require(b != 0); + return a % b; + } +} diff --git a/packages/chain-events/eth/contracts/MolochV2/GuildBank.sol b/packages/chain-events/eth/contracts/MolochV2/GuildBank.sol new file mode 100644 index 00000000000..5b8204175bb --- /dev/null +++ b/packages/chain-events/eth/contracts/MolochV2/GuildBank.sol @@ -0,0 +1,24 @@ +pragma solidity ^0.5.3; + +import "@openzeppelin/contracts/ownership/Ownable.sol"; +import "@openzeppelin/contracts/math/SafeMath.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; + +contract GuildBank2 is Ownable { + using SafeMath for uint256; + + event Withdrawal(address indexed receiver, address indexed tokenAddress, uint256 amount); + + function withdraw(address receiver, uint256 shares, uint256 totalShares, IERC20[] memory _approvedTokens) public onlyOwner returns (bool) { + for (uint256 i=0; i < _approvedTokens.length; i++) { + uint256 amount = _approvedTokens[i].balanceOf(address(this)).mul(shares).div(totalShares); + emit Withdrawal(receiver, address(_approvedTokens[i]), amount); + return _approvedTokens[i].transfer(receiver, amount); + } + } + + function withdrawToken(IERC20 token, address receiver, uint256 amount) public onlyOwner returns (bool) { + emit Withdrawal(receiver, address(token), amount); + return token.transfer(receiver, amount); + } +} \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/MolochV2/Helper.sol b/packages/chain-events/eth/contracts/MolochV2/Helper.sol new file mode 100644 index 00000000000..a1f611bdd25 --- /dev/null +++ b/packages/chain-events/eth/contracts/MolochV2/Helper.sol @@ -0,0 +1,9 @@ +pragma solidity ^0.5.0; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; +import "@openzeppelin/contracts/token/ERC777/ERC777.sol"; + +contract Helper { + constructor() public {} +} \ No newline at end of file diff --git a/packages/chain-events/eth/contracts/MolochV2/Moloch.sol b/packages/chain-events/eth/contracts/MolochV2/Moloch.sol new file mode 100644 index 00000000000..efda2e81329 --- /dev/null +++ b/packages/chain-events/eth/contracts/MolochV2/Moloch.sol @@ -0,0 +1,590 @@ +pragma solidity ^0.5.3; + +import "@openzeppelin/contracts/math/SafeMath.sol"; +import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; +import "./GuildBank.sol"; + +contract Moloch2 { + using SafeMath for uint256; + + // **************** + // GLOBAL CONSTANTS + // **************** + uint256 public periodDuration; // default = 17280 = 4.8 hours in seconds (5 periods per day) + uint256 public votingPeriodLength; // default = 35 periods (7 days) + uint256 public gracePeriodLength; // default = 35 periods (7 days) + uint256 public emergencyExitWait; // default = 35 periods (7 days) - if proposal has not been processed after this time, its logic will be skipped + uint256 public proposalDeposit; // default = 10 ETH (~$1,000 worth of ETH at contract deployment) + uint256 public dilutionBound; // default = 3 - maximum multiplier a YES voter will be obligated to pay in case of mass ragequit + uint256 public processingReward; // default = 0.1 - amount of ETH to give to whoever processes a proposal + uint256 public summoningTime; // needed to determine the current period + + IERC20 public depositToken; // reference to the deposit token + GuildBank2 public guildBank; // guild bank contract reference + + // HARD-CODED LIMITS + // These numbers are quite arbitrary; they are small enough to avoid overflows when doing calculations + // with periods or shares, yet big enough to not limit reasonable use cases. + uint256 constant MAX_VOTING_PERIOD_LENGTH = 10**18; // maximum length of voting period + uint256 constant MAX_GRACE_PERIOD_LENGTH = 10**18; // maximum length of grace period + uint256 constant MAX_DILUTION_BOUND = 10**18; // maximum dilution bound + uint256 constant MAX_NUMBER_OF_SHARES = 10**18; // maximum number of shares that can be minted + + // *************** + // EVENTS + // *************** + event SubmitProposal(uint256 proposalIndex, address indexed delegateKey, address indexed memberAddress, address indexed applicant, uint256 tributeOffered, uint256 sharesRequested); + event SubmitVote(uint256 indexed proposalIndex, address indexed delegateKey, address indexed memberAddress, uint8 uintVote); + event ProcessProposal(uint256 indexed proposalIndex, address indexed applicant, address indexed memberAddress, uint256 tributeOffered, uint256 sharesRequested, bool didPass); + event Ragequit(address indexed memberAddress, uint256 sharesToBurn); + event CancelProposal(uint256 indexed proposalIndex, address applicantAddress); + event UpdateDelegateKey(address indexed memberAddress, address newDelegateKey); + event SummonComplete(address indexed summoner, uint256 shares); + + // ******************* + // INTERNAL ACCOUNTING + // ******************* + uint256 public proposalCount = 0; // total proposals submitted + uint256 public totalShares = 0; // total shares across all members + uint256 public totalSharesRequested = 0; // total shares that have been requested in unprocessed proposals + + enum Vote { + Null, // default value, counted as abstention + Yes, + No + } + + struct Member { + address delegateKey; // the key responsible for submitting proposals and voting - defaults to member address unless updated + uint256 shares; // the # of shares assigned to this member + bool exists; // always true once a member has been created + uint256 highestIndexYesVote; // highest proposal index # on which the member voted YES + } + + struct Proposal { + address applicant; // the applicant who wishes to become a member - this key will be used for withdrawals + address proposer; // whoever submitted the proposal (can be non-member) + address sponsor; // the member who sponsored the proposal + uint256 sharesRequested; // the # of shares the applicant is requesting + uint256 tributeOffered; // amount of tokens offered as tribute + IERC20 tributeToken; // token being offered as tribute + uint256 paymentRequested; // the payments requested for each applicant + IERC20 paymentToken; // token to send payment in + uint256 startingPeriod; // the period in which voting can start for this proposal + uint256 yesVotes; // the total number of YES votes for this proposal + uint256 noVotes; // the total number of NO votes for this proposal + bool[6] flags; // [sponsored, processed, didPass, cancelled, whitelist, guildkick] + // 0. sponsored - true only if the proposal has been submitted by a member + // 1. processed - true only if the proposal has been processed + // 2. didPass - true only if the proposal passed + // 3. cancelled - true only if the proposer called cancelProposal before a member sponsored the proposal + // 4. whitelist - true only if this is a whitelist proposal, NOTE - tributeToken is target of whitelist + // 5. guildkick - true only if this is a guild kick proposal, NOTE - applicant is target of guild kick + string details; // proposal details - could be IPFS hash, plaintext, or JSON + uint256 maxTotalSharesAtYesVote; // the maximum # of total shares encountered at a yes vote on this proposal + mapping (address => Vote) votesByMember; // the votes on this proposal by each member + } + + mapping (address => bool) public tokenWhitelist; + IERC20[] public approvedTokens; + + mapping (address => bool) public proposedToWhitelist; // true if a token has been proposed to the whitelist (to avoid duplicate whitelist proposals) + mapping (address => bool) public proposedToKick; // true if a member has been proposed to be kicked (to avoid duplicate guild kick proposals) + + mapping (address => Member) public members; + mapping (address => address) public memberAddressByDelegateKey; + + // proposals by ID + mapping (uint256 => Proposal) public proposals; + + // the queue of proposals (only store a reference by the proposal id) + uint256[] public proposalQueue; + + // ********* + // MODIFIERS + // ********* + modifier onlyMember { + require(members[msg.sender].shares > 0, "Moloch::onlyMember - not a member"); + _; + } + + modifier onlyDelegate { + require(members[memberAddressByDelegateKey[msg.sender]].shares > 0, "Moloch::onlyDelegate - not a delegate"); + _; + } + + // ********* + // FUNCTIONS + // ********* + constructor( + address summoner, + address[] memory _approvedTokens, + uint256 _periodDuration, + uint256 _votingPeriodLength, + uint256 _gracePeriodLength, + uint256 _emergencyExitWait, + uint256 _proposalDeposit, + uint256 _dilutionBound, + uint256 _processingReward + ) public { + require(summoner != address(0), "Moloch::constructor - summoner cannot be 0"); + require(_periodDuration > 0, "Moloch::constructor - _periodDuration cannot be 0"); + require(_votingPeriodLength > 0, "Moloch::constructor - _votingPeriodLength cannot be 0"); + require(_votingPeriodLength <= MAX_VOTING_PERIOD_LENGTH, "Moloch::constructor - _votingPeriodLength exceeds limit"); + require(_gracePeriodLength <= MAX_GRACE_PERIOD_LENGTH, "Moloch::constructor - _gracePeriodLength exceeds limit"); + require(_emergencyExitWait > 0, "Moloch::constructor - _emergencyExitWait cannot be 0"); + require(_dilutionBound > 0, "Moloch::constructor - _dilutionBound cannot be 0"); + require(_dilutionBound <= MAX_DILUTION_BOUND, "Moloch::constructor - _dilutionBound exceeds limit"); + require(_approvedTokens.length > 0, "Moloch::constructor - need at least one approved token"); + require(_proposalDeposit >= _processingReward, "Moloch::constructor - _proposalDeposit cannot be smaller than _processingReward"); + + // first approved token is the deposit token + depositToken = IERC20(_approvedTokens[0]); + + for (uint256 i=0; i < _approvedTokens.length; i++) { + require(_approvedTokens[i] != address(0), "Moloch::constructor - _approvedToken cannot be 0"); + require(!tokenWhitelist[_approvedTokens[i]], "Moloch::constructor - duplicate approved token"); + tokenWhitelist[_approvedTokens[i]] = true; + approvedTokens.push(IERC20(_approvedTokens[i])); + } + + guildBank = new GuildBank2(); + + periodDuration = _periodDuration; + votingPeriodLength = _votingPeriodLength; + gracePeriodLength = _gracePeriodLength; + emergencyExitWait = _emergencyExitWait; + proposalDeposit = _proposalDeposit; + dilutionBound = _dilutionBound; + processingReward = _processingReward; + + summoningTime = now; + + members[summoner] = Member(summoner, 1, true, 0); + memberAddressByDelegateKey[summoner] = summoner; + totalShares = 1; + + emit SummonComplete(summoner, 1); + } + + // ****************** + // PROPOSAL FUNCTIONS + // ****************** + + function submitProposal( + address applicant, + uint256 sharesRequested, + uint256 tributeOffered, + address tributeToken, + uint256 paymentRequested, + address paymentToken, + string memory details + ) + public + { + require(tokenWhitelist[tributeToken], "Moloch::submitProposal - tributeToken is not whitelisted"); + require(tokenWhitelist[paymentToken], "Moloch::submitProposal - payment is not whitelisted"); + require(applicant != address(0), "Moloch::submitProposal - applicant cannot be 0"); + + // collect tribute from applicant and store it in the Moloch until the proposal is processed + require(IERC20(tributeToken).transferFrom(msg.sender, address(this), tributeOffered), "Moloch::submitProposal - tribute token transfer failed"); + + bool[6] memory flags; + + // create proposal... + Proposal memory proposal = Proposal({ + applicant: applicant, + proposer: msg.sender, + sponsor: address(0), + sharesRequested: sharesRequested, + tributeOffered: tributeOffered, + tributeToken: IERC20(tributeToken), + paymentRequested: paymentRequested, + paymentToken: IERC20(paymentToken), + startingPeriod: 0, + yesVotes: 0, + noVotes: 0, + flags: flags, + details: details, + maxTotalSharesAtYesVote: 0 + }); + + proposals[proposalCount] = proposal; // save proposal by its id + proposalCount += 1; // increment proposal counter + + // uint256 proposalIndex = proposalQueue.length.sub(1); + // TODO emit SubmitProposal(proposalIndex, msg.sender, memberAddress, applicant, tributeOffered, sharesRequested); + } + + function submitWhitelistProposal(address tokenToWhitelist, string memory details) public { + require(tokenToWhitelist != address(0), "Moloch::submitWhitelistProposal - must provide token address"); + require(!tokenWhitelist[tokenToWhitelist], "Moloch::submitWhitelistProposal - can't already have whitelisted the token"); + + bool[6] memory flags; + flags[4] = true; // whitelist proposal = true + + // create proposal ... + Proposal memory proposal = Proposal({ + applicant: address(0), + proposer: msg.sender, + sponsor: address(0), + sharesRequested: 0, + tributeOffered: 0, + tributeToken: IERC20(tokenToWhitelist), // tributeToken = tokenToWhitelist + paymentRequested: 0, + paymentToken: IERC20(address(0)), + startingPeriod: 0, + yesVotes: 0, + noVotes: 0, + flags: flags, + details: details, + maxTotalSharesAtYesVote: 0 + }); + + + proposals[proposalCount] = proposal; // save proposal by its id + proposalCount += 1; // increment proposal counter + + // uint256 proposalIndex = proposalQueue.length.sub(1); + // TODO emit SubmitProposal(proposalIndex, msg.sender, memberAddress, applicant, tributeOffered, sharesRequested); + } + + function submitGuildKickProposal(address memberToKick, string memory details) public { + require(members[memberToKick].shares > 0, "Moloch::submitGuildKickProposal - member must have at least one share"); + + bool[6] memory flags; + flags[5] = true; // guild kick proposal = true + + // create proposal ... + Proposal memory proposal = Proposal({ + applicant: memberToKick, // applicant = memberToKick + proposer: msg.sender, + sponsor: address(0), + sharesRequested: 0, + tributeOffered: 0, + tributeToken: IERC20(address(0)), + paymentRequested: 0, + paymentToken: IERC20(address(0)), + startingPeriod: 0, + yesVotes: 0, + noVotes: 0, + flags: flags, + details: details, + maxTotalSharesAtYesVote: 0 + }); + + proposals[proposalCount] = proposal; // save proposal by its id + proposalCount += 1; // increment proposal counter + + // uint256 proposalIndex = proposalQueue.length.sub(1); + // TODO emit SubmitProposal(proposalIndex, msg.sender, memberAddress, applicant, tributeOffered, sharesRequested); + } + + function sponsorProposal(uint256 proposalId) public onlyDelegate { + // collect proposal deposit from proposer and store it in the Moloch until the proposal is processed + require(depositToken.transferFrom(msg.sender, address(this), proposalDeposit), "Moloch::submitProposal - proposal deposit token transfer failed"); + + Proposal memory proposal = proposals[proposalId]; + + require(!proposal.flags[0], "Moloch::sponsorProposal - proposal has already been sponsored"); + require(!proposal.flags[3], "Moloch::sponsorProposal - proposal has been cancelled"); + + // token whitelist proposal + if (proposal.flags[4]) { + require(!proposedToWhitelist[address(proposal.tributeToken)]); // already an active proposal to whitelist this token + proposedToWhitelist[address(proposal.tributeToken)] = true; + + // gkick proposal + } else if (proposal.flags[5]) { + require(!proposedToKick[proposal.applicant]); // already an active proposal to kick this member + proposedToKick[proposal.applicant] = true; + + // standard proposal + } else { + // Make sure we won't run into overflows when doing calculations with shares. + // Note that totalShares + totalSharesRequested + sharesRequested is an upper bound + // on the number of shares that can exist until this proposal has been processed. + require(totalShares.add(totalSharesRequested).add(proposal.sharesRequested) <= MAX_NUMBER_OF_SHARES, "Moloch::submitProposal - too many shares requested"); + totalSharesRequested = totalSharesRequested.add(proposal.sharesRequested); + } + + // compute startingPeriod for proposal + uint256 startingPeriod = max( + getCurrentPeriod(), + proposalQueue.length == 0 ? 0 : proposals[proposalQueue[proposalQueue.length.sub(1)]].startingPeriod + ).add(1); + + proposal.startingPeriod = startingPeriod; + + address memberAddress = memberAddressByDelegateKey[msg.sender]; + proposal.sponsor = memberAddress; + + // ... and append it to the queue by its id + proposalQueue.push(proposalId); + + // uint256 proposalIndex = proposalQueue.length.sub(1); + // emit SponsorProposal(proposalId, proposalIndex, msg.sender, memberAddress, applicant, tributeOffered, sharesRequested); + } + + function submitVote(uint256 proposalIndex, uint8 uintVote) public onlyDelegate { + address memberAddress = memberAddressByDelegateKey[msg.sender]; + Member storage member = members[memberAddress]; + + require(proposalIndex < proposalQueue.length, "Moloch::submitVote - proposal does not exist"); + Proposal storage proposal = proposals[proposalQueue[proposalIndex]]; + + require(uintVote < 3, "Moloch::submitVote - uintVote must be less than 3"); + Vote vote = Vote(uintVote); + + require(proposal.flags[0], "Moloch::submitVote - proposal has not been sponsored"); + require(getCurrentPeriod() >= proposal.startingPeriod, "Moloch::submitVote - voting period has not started"); + require(!hasVotingPeriodExpired(proposal.startingPeriod), "Moloch::submitVote - proposal voting period has expired"); + require(proposal.votesByMember[memberAddress] == Vote.Null, "Moloch::submitVote - member has already voted on this proposal"); + require(vote == Vote.Yes || vote == Vote.No, "Moloch::submitVote - vote must be either Yes or No"); + + // store vote + proposal.votesByMember[memberAddress] = vote; + + // count vote + if (vote == Vote.Yes) { + proposal.yesVotes = proposal.yesVotes.add(member.shares); + + // set highest index (latest) yes vote - must be processed for member to ragequit + if (proposalIndex > member.highestIndexYesVote) { + member.highestIndexYesVote = proposalIndex; + } + + // set maximum of total shares encountered at a yes vote - used to bound dilution for yes voters + if (totalShares > proposal.maxTotalSharesAtYesVote) { + proposal.maxTotalSharesAtYesVote = totalShares; + } + + } else if (vote == Vote.No) { + proposal.noVotes = proposal.noVotes.add(member.shares); + } + + emit SubmitVote(proposalIndex, msg.sender, memberAddress, uintVote); + } + + function processProposal(uint256 proposalIndex) public { + require(proposalIndex < proposalQueue.length, "Moloch::processProposal - proposal does not exist"); + Proposal storage proposal = proposals[proposalQueue[proposalIndex]]; + + require(getCurrentPeriod() >= proposal.startingPeriod.add(votingPeriodLength).add(gracePeriodLength), "Moloch::processProposal - proposal is not ready to be processed"); + require(proposal.flags[1] == false, "Moloch::processProposal - proposal has already been processed"); + require(proposalIndex == 0 || proposals[proposalQueue[proposalIndex.sub(1)]].flags[1], "Moloch::processProposal - previous proposal must be processed"); + + proposal.flags[1] = true; + totalSharesRequested = totalSharesRequested.sub(proposal.sharesRequested); + + bool didPass = proposal.yesVotes > proposal.noVotes; + + // If emergencyExitWait has passed from when this proposal *should* have been able to be processed, skip all effects + bool emergencyProcessing = false; + if (getCurrentPeriod() >= proposal.startingPeriod.add(votingPeriodLength).add(gracePeriodLength).add(emergencyExitWait)) { + emergencyProcessing = true; + didPass = false; + } + + // Make the proposal fail if the dilutionBound is exceeded + if (totalShares.mul(dilutionBound) < proposal.maxTotalSharesAtYesVote) { + didPass = false; + } + + // Make sure there is enough tokens for payments, or auto-fail + if (proposal.paymentRequested >= proposal.paymentToken.balanceOf(address(guildBank))) { + didPass = false; + } + + // PROPOSAL PASSED + if (didPass) { + + proposal.flags[2] = true; // didPass = true + + // whitelist proposal passed, add token to whitelist + if (proposal.flags[4]) { + tokenWhitelist[address(proposal.tributeToken)] = true; + approvedTokens.push(proposal.tributeToken); + + // guild kick proposal passed, ragequit 100% of the member's shares + // NOTE - if any approvedToken is broken gkicks will fail and get stuck here (until emergency processing) + } else if (proposal.flags[5]) { + _ragequit(members[proposal.applicant].shares, approvedTokens); + + // standard proposal passed, collect tribute, send payment, mint shares + } else { + // if the applicant is already a member, add to their existing shares + if (members[proposal.applicant].exists) { + members[proposal.applicant].shares = members[proposal.applicant].shares.add(proposal.sharesRequested); + + // the applicant is a new member, create a new record for them + } else { + // if the applicant address is already taken by a member's delegateKey, reset it to their member address + if (members[memberAddressByDelegateKey[proposal.applicant]].exists) { + address memberToOverride = memberAddressByDelegateKey[proposal.applicant]; + memberAddressByDelegateKey[memberToOverride] = memberToOverride; + members[memberToOverride].delegateKey = memberToOverride; + } + + // use applicant address as delegateKey by default + members[proposal.applicant] = Member(proposal.applicant, proposal.sharesRequested, true, 0); + memberAddressByDelegateKey[proposal.applicant] = proposal.applicant; + } + + // mint new shares + totalShares = totalShares.add(proposal.sharesRequested); + + // transfer tribute tokens to guild bank + require( + proposal.tributeToken.transfer(address(guildBank), proposal.tributeOffered), + "Moloch::processProposal - token transfer to guild bank failed" + ); + + // transfer payment tokens to applicant + require( + guildBank.withdrawToken(proposal.paymentToken, proposal.applicant, proposal.paymentRequested), + "Moloch::processProposal - token payment to applicant failed" + ); + } + + // PROPOSAL FAILED + } else { + // Don't return applicant tokens if we are in emergency processing - likely the tokens are broken + if (!emergencyProcessing) { + // return all tokens to the proposer + require( + proposal.tributeToken.transfer(proposal.proposer, proposal.tributeOffered), + "Moloch::processProposal - failing vote token transfer failed" + ); + } + } + + // if token whitelist proposal, remove token from tokens proposed to whitelist + if (proposal.flags[4]) { + proposedToWhitelist[address(proposal.tributeToken)] = false; + } + + // if guild kick proposal, remove member from list of members proposed to be kicked + if (proposal.flags[5]) { + proposedToKick[proposal.applicant] = false; + } + + // send msg.sender the processingReward + require( + depositToken.transfer(msg.sender, processingReward), + "Moloch::processProposal - failed to send processing reward to msg.sender" + ); + + // return deposit to sponsor (subtract processing reward) + require( + depositToken.transfer(proposal.sponsor, proposalDeposit.sub(processingReward)), + "Moloch::processProposal - failed to return proposal deposit to sponsor" + ); + + // TODO emit ProcessProposal() + } + + function ragequit(uint256 sharesToBurn) public onlyMember { + _ragequit(sharesToBurn, approvedTokens); + } + + function safeRagequit(uint256 sharesToBurn, IERC20[] memory tokenList) public onlyMember { + // all tokens in tokenList must be in the tokenWhitelist + for (uint256 i=0; i < tokenList.length; i++) { + require(tokenWhitelist[address(tokenList[i])], "Moloch::safeRequit - token must be whitelisted"); + + // check token uniqueness - for every token address after the first, enforce ascending lexical order + if (i > 0) { + require(tokenList[i] > tokenList[i-1], "Moloch::safeRagequit - tokenList must be unique and in ascending order"); + } + } + + _ragequit(sharesToBurn, tokenList); + } + + function _ragequit(uint256 sharesToBurn, IERC20[] memory _approvedTokens) internal { + uint256 initialTotalShares = totalShares; + + Member storage member = members[msg.sender]; + + require(member.shares >= sharesToBurn, "Moloch::ragequit - insufficient shares"); + + require(canRagequit(member.highestIndexYesVote), "Moloch::ragequit - cant ragequit until highest index proposal member voted YES on is processed"); + + // burn shares + member.shares = member.shares.sub(sharesToBurn); + totalShares = totalShares.sub(sharesToBurn); + + // instruct guildBank to transfer fair share of tokens to the ragequitter + require( + guildBank.withdraw(msg.sender, sharesToBurn, initialTotalShares, _approvedTokens), + "Moloch::ragequit - withdrawal of tokens from guildBank failed" + ); + + emit Ragequit(msg.sender, sharesToBurn); + } + + function cancelProposal(uint256 proposalId) public { + Proposal storage proposal = proposals[proposalId]; + require(!proposal.flags[0], "Moloch::cancelProposal - proposal has already been sponsored"); + require(msg.sender == proposal.proposer, "Moloch::cancelProposal - only the proposer can cancel"); + + proposal.flags[3] = true; // cancelled + + require( + proposal.tributeToken.transfer(proposal.proposer, proposal.tributeOffered), + "Moloch::processProposal - failed to return tribute to proposer" + ); + + emit CancelProposal(proposalId, msg.sender); + } + + function updateDelegateKey(address newDelegateKey) public onlyMember { + require(newDelegateKey != address(0), "Moloch::updateDelegateKey - newDelegateKey cannot be 0"); + + // skip checks if member is setting the delegate key to their member address + if (newDelegateKey != msg.sender) { + require(!members[newDelegateKey].exists, "Moloch::updateDelegateKey - cant overwrite existing members"); + require(!members[memberAddressByDelegateKey[newDelegateKey]].exists, "Moloch::updateDelegateKey - cant overwrite existing delegate keys"); + } + + Member storage member = members[msg.sender]; + memberAddressByDelegateKey[member.delegateKey] = address(0); + memberAddressByDelegateKey[newDelegateKey] = msg.sender; + member.delegateKey = newDelegateKey; + + emit UpdateDelegateKey(msg.sender, newDelegateKey); + } + + // **************** + // GETTER FUNCTIONS + // **************** + + function max(uint256 x, uint256 y) internal pure returns (uint256) { + return x >= y ? x : y; + } + + function getCurrentPeriod() public view returns (uint256) { + return now.sub(summoningTime).div(periodDuration); + } + + function getProposalQueueLength() public view returns (uint256) { + return proposalQueue.length; + } + + // can only ragequit if the latest proposal you voted YES on has been processed + function canRagequit(uint256 highestIndexYesVote) public view returns (bool) { + require(highestIndexYesVote < proposalQueue.length, "Moloch::canRagequit - proposal does not exist"); + return proposals[proposalQueue[highestIndexYesVote]].flags[1]; // processed + } + + function hasVotingPeriodExpired(uint256 startingPeriod) public view returns (bool) { + return getCurrentPeriod() >= startingPeriod.add(votingPeriodLength); + } + + function getMemberProposalVote(address memberAddress, uint256 proposalIndex) public view returns (Vote) { + require(members[memberAddress].exists, "Moloch::getMemberProposalVote - member doesn't exist"); + require(proposalIndex < proposalQueue.length, "Moloch::getMemberProposalVote - proposal doesn't exist"); + return proposals[proposalQueue[proposalIndex]].votesByMember[memberAddress]; + } +} \ No newline at end of file diff --git a/packages/chain-events/eth/hardhat.config.ts b/packages/chain-events/eth/hardhat.config.ts new file mode 100644 index 00000000000..c11a75371cf --- /dev/null +++ b/packages/chain-events/eth/hardhat.config.ts @@ -0,0 +1,66 @@ +// eslint-disable-next-line import/no-extraneous-dependencies +import 'hardhat-typechain'; +import '@nomiclabs/hardhat-waffle'; + +export default { + solidity: { + compilers: [ + { + version: '0.8.4', + settings: { + optimizer: { enabled: true, runs: 200 }, + evmVersion: 'istanbul', + }, + }, + { + version: '0.8.0', + settings: { + optimizer: { enabled: true, runs: 200 }, + evmVersion: 'istanbul', + }, + }, + { + version: '0.7.5', + settings: { + optimizer: { enabled: true, runs: 200 }, + evmVersion: 'istanbul', + }, + }, + { + version: '0.6.8', + settings: { + optimizer: { enabled: true, runs: 200 }, + evmVersion: 'istanbul', + }, + }, + { + version: '0.6.12', + settings: { + optimizer: { enabled: true, runs: 200 }, + evmVersion: 'istanbul', + }, + }, + { + version: '0.5.5', + settings: { + optimizer: { enabled: true, runs: 200 }, + evmVersion: 'petersburg', + }, + }, + { + version: '0.5.16', + settings: { + optimizer: { enabled: true, runs: 200 }, + evmVersion: 'istanbul', + }, + }, + ], + }, + typechain: { + outDir: '../src/contractTypes', + target: 'ethers-v5', + }, + mocha: { + timeout: 40000 + }, +}; diff --git a/packages/chain-events/eth/migrations/1_initial_migration.js b/packages/chain-events/eth/migrations/1_initial_migration.js new file mode 100644 index 00000000000..82c676e13bb --- /dev/null +++ b/packages/chain-events/eth/migrations/1_initial_migration.js @@ -0,0 +1,6 @@ +const Migrations = artifacts.require('Migrations'); + +// eslint-disable-next-line func-names +module.exports = function (deployer) { + deployer.deploy(Migrations); +}; diff --git a/packages/chain-events/eth/migrations/2_deploy_contracts.js b/packages/chain-events/eth/migrations/2_deploy_contracts.js new file mode 100644 index 00000000000..978737eca20 --- /dev/null +++ b/packages/chain-events/eth/migrations/2_deploy_contracts.js @@ -0,0 +1,22 @@ +const MolochV2 = artifacts.require('Moloch2'); +const GuildBankV2 = artifacts.require('GuildBank2'); +const HelperV2 = artifacts.require('Helper'); + +// eslint-disable-next-line func-names +module.exports = function (deployer) { + deployer.deploy(MolochV2, + '0xcE7aa2D3C1F8B572B50238230f5D55A78dB86087', // Summoner + ['0xcE7aa2D3C1F8B572B50238230f5D55A78dB86087'], // approvedTokens + 17280, // _periodDuration + 35, // _votingPeriodLength + 35, // _gracePeriodLength + 70, // _abortWindow + '10000000', // _proposalDeposit + 3, // _diluationBound + '10000000', // _processingReward + // { gas: 25000 } + // eslint-disable-next-line function-paren-newline + ); + deployer.deploy(GuildBankV2); + // deployer.deploy(Helper); +}; diff --git a/packages/chain-events/eth/migrations/3_moloch_v1.js b/packages/chain-events/eth/migrations/3_moloch_v1.js new file mode 100644 index 00000000000..a0ea866e1f8 --- /dev/null +++ b/packages/chain-events/eth/migrations/3_moloch_v1.js @@ -0,0 +1,30 @@ +const MolochV1 = artifacts.require('Moloch1'); +const GuildBankV1 = artifacts.require('GuildBank1'); +const Token = artifacts.require('Token'); + +// eslint-disable-next-line func-names +module.exports = async function (deployer, network, accounts) { + await deployer.deploy(Token, 10000); + const token = await Token.deployed(); + + const summoner = accounts[0]; + const applicants = accounts.slice(5); + + await deployer.deploy(MolochV1, + summoner, + token.address, // approvedTokens: + 60, // _periodDuration: + 2, // _votingPeriodLength: + 2, // _gracePeriodLength: + 1, // _abortWindow: + '3', // _proposalDeposit: + 3, // _diluationBound: + '3', // _processingReward: + // { gas: 25000 } + // eslint-disable-next-line function-paren-newline + ); + const moloch = await MolochV1.deployed(); + + await deployer.deploy(GuildBankV1, summoner); + // deployer.deploy(Helper); +}; diff --git a/packages/chain-events/eth/migrations/4_marlin_v2.js b/packages/chain-events/eth/migrations/4_marlin_v2.js new file mode 100644 index 00000000000..59ef09b68b6 --- /dev/null +++ b/packages/chain-events/eth/migrations/4_marlin_v2.js @@ -0,0 +1,16 @@ +const MPond = artifacts.require('MPond'); +const GovernorAlpha = artifacts.require('GovernorAlpha'); +const Timelock = artifacts.require('Timelock'); + +// eslint-disable-next-line func-names +module.exports = async function (deployer, network, accounts) { + // Marlin Contracts + // accounts[0] is initial mpondGuardian, admin of timelock, and guardian of GovernorAlpha + const mpondGuardian = accounts[0] + await deployer.deploy(MPond, mpondGuardian, accounts[1]); + const mpond = await MPond.deployed(); + await deployer.deploy(Timelock, mpondGuardian, 172800); // 172800 is 2 days in seconds, which is the minimum delay for the contract + const timelock = await Timelock.deployed(); + await deployer.deploy(GovernorAlpha, timelock.address, mpond.address, mpondGuardian); + const governorAlpha = GovernorAlpha.deployed(); +}; \ No newline at end of file diff --git a/packages/chain-events/eth/scripts/triggerEvents.js b/packages/chain-events/eth/scripts/triggerEvents.js new file mode 100644 index 00000000000..95947e114af --- /dev/null +++ b/packages/chain-events/eth/scripts/triggerEvents.js @@ -0,0 +1,59 @@ +const truffleContract = require('truffle-contract'); +const Web3 = require('web3'); +const provider = new Web3.providers.HttpProvider('http://localhost:9545'); +const web3 = new Web3(provider); + +const Moloch1Contract = truffleContract(require('../build/contracts/Moloch1.json')); +Moloch1Contract.setProvider(provider); + +const TokenContract = truffleContract(require('../build/contracts/Token.json')); +TokenContract.setProvider(web3.currentProvider); + +const summoner = '0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1'; +const applicant = '0xFFcf8FDEE72ac11b5c542428B35EEF5769C409f0'; + +async function submitProposal(moloch1, token) { + await token.transfer(applicant, 10, { from: summoner }); + await token.approve(moloch1.address, 5, { from: summoner }); + await token.approve(moloch1.address, 5, { from: applicant }); + await moloch1.submitProposal(applicant, 5, 5, 'hello', { from: summoner }); + console.log('Proposal created!'); +} + +async function submitVote(moloch1, proposalIndex) { + await moloch1.submitVote(proposalIndex, 1, { from: summoner }); + console.log('Vote submitted!'); +} + +async function processProposal(moloch1, proposalIndex) { + await moloch1.processProposal(proposalIndex, { from: summoner }); + console.log('Proposal processed!'); +} + +async function abort(moloch1, proposalIndex) { + await moloch1.abortProposal(proposalIndex, { from: applicant }); + console.log('Proposal aborted!'); +} + +async function ragequit(moloch1, sharesToBurn, who) { + await moloch1.ragequit(sharesToBurn, { from: who }); + console.log('Ragequit!'); +} + +async function updateDelegateKey(moloch1, newKey, who) { + await moloch1.updateDelegateKey(newKey, { from: who }); + console.log('Delegate key updated!'); +} + +// eslint-disable-next-line func-names +module.exports = async function (callback) { + try { + const [ moloch1, token ] = await Promise.all([ Moloch1Contract.deployed(), TokenContract.deployed() ]); + await submitProposal(moloch1, token); + await submitVote(moloch1, 0); + console.log('Done!'); + callback(); + } catch (err) { + callback(err); + } +}; diff --git a/packages/chain-events/eth/truffle-config.js b/packages/chain-events/eth/truffle-config.js new file mode 100644 index 00000000000..06fef89e3fc --- /dev/null +++ b/packages/chain-events/eth/truffle-config.js @@ -0,0 +1,70 @@ +/* eslint-disable import/no-extraneous-dependencies */ +/* eslint-disable quotes */ +/* eslint-disable no-multi-spaces */ + +require('@babel/register'); +require('@babel/polyfill'); + +// const HDWalletProvider = require('truffle-hdwallet-provider'); +// const infuraKey = "fj4jll3k....."; +// +// const fs = require('fs'); +// const mnemonic = fs.readFileSync(".secret").toString().trim(); + +module.exports = { + /** + * Networks define how you connect to your ethereum client and let you set the + * defaults web3 uses to send transactions. If you don't specify one truffle + * will spin up a development blockchain for you on port 9545 when you + * run `develop` or `test`. You can ask a truffle command to use a specific + * network from the command line, e.g + * + * $ truffle test --network + */ + + networks: { + // Useful for testing. The `development` name is special - truffle uses it by default + // if it's defined here and no other network is specified at the command line. + // You should run a client (like ganache-cli, geth or parity) in a separate terminal + // tab if you use this network and you must also set the `host`, `port` and `network_id` + // options below to some value. + // + development: { + host: '127.0.0.1', // Localhost (default: none) + port: 9545, // Standard Ethereum port (default: none) + network_id: '*', // Any network (default: none) + gas: 8000000, + gasPrice: 2000, // 20 gwei (in wei) (default: 100 gwei) + }, + + // Another network with more advanced options... + // advanced: { + // port: 8777, // Custom port + // network_id: 1342, // Custom network + // gas: 8500000, // Gas sent with each transaction (default: ~6700000) + // gasPrice: 20000000000, // 20 gwei (in wei) (default: 100 gwei) + // from:
, // Account to send txs from (default: accounts[0]) + // websockets: true // Enable EventEmitter interface for web3 (default: false) + // }, + }, + + // Set default mocha options here, use special reporters etc. + mocha: { + // timeout: 100000 + }, + + // Configure your compilers + compilers: { + solc: { + // version: '0.5.1', // Fetch exact version from solc-bin (default: truffle's version) + // docker: true, // Use "0.5.1" you've installed locally with docker (default: false) + // settings: { // See the solidity docs for advice about optimization and evmVersion + // optimizer: { + // enabled: false, + // runs: 200 + // }, + // evmVersion: "byzantium" + // } + }, + }, +}; diff --git a/packages/chain-events/manyListenerConfigEx.json b/packages/chain-events/manyListenerConfigEx.json new file mode 100644 index 00000000000..123b958bb28 --- /dev/null +++ b/packages/chain-events/manyListenerConfigEx.json @@ -0,0 +1,13 @@ +[ + { + "network": "kusama", + "url": "", + "archival": false, + "skipCatchup": true + }, + { + "network": "polkadot", + "archival": false, + "skipCatchup": true + } +] diff --git a/packages/chain-events/package.json b/packages/chain-events/package.json new file mode 100644 index 00000000000..82e4ded412e --- /dev/null +++ b/packages/chain-events/package.json @@ -0,0 +1,103 @@ +{ + "name": "chain-events", + "version": "0.13.3", + "description": "Listen to various chains for events.", + "license": "GPL-3.0", + "files": [ + "src/" + ], + "main": "src/index.ts", + "types": "dist/index.d.ts", + "scripts": { + "build": "rimraf dist/ && tsc --project tsconfig.json && copyfiles -u 1 \"./src/**/*.d.ts\" \"dist\"", + "compile-contracts": "cd eth && npx hardhat compile", + "unit-test": "ts-mocha --config ./.mocharc.json ./test/unit/**/*.spec.ts", + "integration-test": "cd eth && hardhat test ../test/integration/*.spec.ts", + "lint": "eslint src/ test/", + "listen": "ts-node -T ./scripts/listener.ts", + "listenV2": "ts-node -T ./scripts/listenerV2.ts", + "listen-archival": "ts-node -T ./scripts/listener.ts -n edgeware-local -a true", + "scrape": "ts-node -T ./scripts/scraper.ts", + "ganache": "ganache-cli -m \"Alice\" -p 9545 -l 800000000 --allowUnlimitedContractSize", + "batch-poll": "ts-node -T ./scripts/batchPoller.ts", + "preyalcpublish": "yarn build" + }, + "engines": { + "node": ">=14" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/hicommonwealth/chain-events.git" + }, + "bugs": { + "url": "https://github.com/hicommonwealth/chain-events/issues" + }, + "homepage": "https://github.com/hicommonwealth/chain-events#readme", + "dependencies": { + "@ethersproject/abi": "^5.0.0", + "@ethersproject/bytes": "^5.0.0", + "@ethersproject/providers": "^5.0.0", + "@nomiclabs/hardhat-ethers": "^2.0.2", + "@polkadot/api": "6.0.5", + "@polkadot/api-derive": "6.0.5", + "@polkadot/types": "6.0.5", + "@polkadot/util": "7.4.1", + "bn.js": "^5.1.3", + "ethereum-block-by-date": "^1.4.0", + "ethers": "^5.0.0", + "lodash": "^4.17.21", + "moment": "^2.29.1", + "node-fetch": "^2.6.1", + "pg": "^8.6.0", + "pg-format": "^1.0.4", + "sleep-promise": "^8.0.1", + "typescript-logging": "^0.6.4", + "underscore": "^1.10.2", + "web3": "^1.3.1", + "web3-core": "^1.3.1", + "web3-utils": "^1.3.1" + }, + "devDependencies": { + "@aave/aave-token": "^1.0.4", + "@babel/core": "^7.10.3", + "@babel/polyfill": "^7.10.1", + "@babel/register": "^7.10.3", + "@istanbuljs/nyc-config-typescript": "^0.1.3", + "@nomiclabs/hardhat-waffle": "^2.0.1", + "@openzeppelin/contracts": "^2.4.0", + "@openzeppelin/contracts-governance": "npm:@openzeppelin/contracts@^4.3.2", + "@typechain/ethers-v5": "^6.0.0", + "@types/bn.js": "^4.11.6", + "@types/chai": "^4.2.11", + "@types/mocha": "^7.0.2", + "@types/node": "^14.0.14", + "@types/underscore": "^1.10.1", + "@types/yargs": "^15.0.9", + "@typescript-eslint/eslint-plugin": "^4.22.0", + "@typescript-eslint/parser": "^4.22.0", + "chai": "^4.2.0", + "copyfiles": "^2.4.1", + "dotenv": "^10.0.0", + "eslint": "^7.14.0", + "eslint-config-airbnb-base": "^14.0.0", + "eslint-config-prettier": "^6.10.1", + "eslint-plugin-import": "^2.20.0", + "eslint-plugin-prettier": "^3.1.2", + "ganache-cli": "^6.9.1", + "hardhat": "^2.6.4", + "hardhat-typechain": "^0.3.5", + "install-peers-cli": "^2.2.0", + "jsdom": "^16.2.2", + "jsdom-global": "^3.0.2", + "mocha": "^8.2.1", + "nyc": "^15.1.0", + "prettier": "2.0.2", + "rimraf": "^3.0.2", + "ts-generator": "^0.1.1", + "ts-mocha": "^8.0.0", + "ts-node": "^8.10.2", + "typechain": "^4.0.1", + "typescript": "^4.3.4", + "yargs": "^16.1.0" + } +} diff --git a/packages/chain-events/scripts/batchPoller.ts b/packages/chain-events/scripts/batchPoller.ts new file mode 100644 index 00000000000..2decb2f468d --- /dev/null +++ b/packages/chain-events/scripts/batchPoller.ts @@ -0,0 +1,113 @@ +import { ApiPromise } from '@polkadot/api'; +import { LogGroupControlSettings } from 'typescript-logging'; +import { + chainSupportedBy, SubstrateEvents, IEventHandler, IDisconnectedRange, CWEvent, SubstrateTypes +} from '../dist/index'; +import { factoryControl } from '../dist/logging'; + +export async function batchQuery( + api: ApiPromise, + eventHandlers: IEventHandler[], + fullRange?: IDisconnectedRange, + aggregateFirst = false, // fetch all blocks before running processor function +) { + // turn off debug logging for poller -- it's annoying + factoryControl.change({ group: 'all', logLevel: 'Info' } as LogGroupControlSettings); + + // create range if not already set + const latestBlock = +(await api.derive.chain.bestNumber()); + if (!fullRange) { + fullRange = { + startBlock: 0, + endBlock: latestBlock + }; + } else if (!fullRange.endBlock) { + fullRange.endBlock = latestBlock; + } + + const processBlocksFn = async (blocks: SubstrateTypes.Block[]) => { + // process all blocks + const processor = new SubstrateEvents.Processor(api); + for (const block of blocks) { + // retrieve events from block + const events = await processor.process(block); + + // send all events through event-handlers in sequence + await Promise.all(events.map(async (event) => { + let prevResult = null; + for (const handler of eventHandlers) { + try { + // pass result of last handler into next one (chaining db events) + prevResult = await handler.handle(event, prevResult); + } catch (err) { + console.error(`Event handle failure: ${err.message}`); + break; + } + } + })); + } + } + + // TODO: configure chunk size + const CHUNK_SIZE = 1000; + + const poller = new SubstrateEvents.Poller(api); + const results = []; + // iterate over all blocks in chunks, from smallest to largest, and place in result array + for (let block = fullRange.startBlock + CHUNK_SIZE; block <= fullRange.endBlock; block += CHUNK_SIZE) { + try { + const chunk = await poller.poll({ + startBlock: block - CHUNK_SIZE, + endBlock: Math.min(block, fullRange.endBlock) + }, CHUNK_SIZE); + + // the final query will be smaller than CHUNK_SIZE, otherwise a shortened length means pruning took place + if (chunk.length < CHUNK_SIZE && block < fullRange.endBlock) { + throw new Error('Found pruned headers, must query archival node'); + } + console.log(`Fetched blocks ${chunk[0].header.number} to ${chunk[CHUNK_SIZE - 1].header.number}.`); + + if (aggregateFirst) { + // compile chunks into results + results.push(...chunk); + } else { + // process chunk immediately, and do not aggregate + await processBlocksFn(chunk); + } + } catch (err) { + console.error(`Failed to fetch blocks ${block - CHUNK_SIZE}-${block}: ${err.message}.`); + // TODO: exit if desired + } + } + if (aggregateFirst) { + await processBlocksFn(results); + } +} + +class StandaloneEventHandler extends IEventHandler { + public async handle(event: CWEvent): Promise { + console.log(`Received event: ${JSON.stringify(event, null, 2)}`); + } +} + +function main() { + const args = process.argv.slice(2); + const chain = args[0] || 'edgeware'; + console.log(`Listening to events on ${chain}.`); + + const networks = { + 'edgeware': 'ws://mainnet1.edgewa.re:9944', + 'edgeware-local': 'ws://localhost:9944', + 'edgeware-testnet': 'wss://beresheet1.edgewa.re', + }; + + const url = networks[chain]; + + if (!url) throw new Error(`no url for chain ${chain}`); + SubstrateEvents.createApi(url, {}).then(async (api) => { + await batchQuery(api, [ new StandaloneEventHandler() ]); + process.exit(0); + }); +} + +main(); diff --git a/packages/chain-events/scripts/listener.ts b/packages/chain-events/scripts/listener.ts new file mode 100644 index 00000000000..d2a4dfe023c --- /dev/null +++ b/packages/chain-events/scripts/listener.ts @@ -0,0 +1,258 @@ +/* eslint-disable import/no-extraneous-dependencies */ +/* eslint-disable no-console */ + +import * as yargs from 'yargs'; +import fetch from 'node-fetch'; +import EthDater from 'ethereum-block-by-date'; + +import { + IEventHandler, + CWEvent, + SubstrateEvents, + CompoundEvents, + MolochEvents, + AaveEvents, + Erc20Events, + SupportedNetwork, + Erc721Events, +} from '../src/index'; + +import { contracts, networkSpecs, networkUrls } from './listenerUtils'; + +// eslint-disable-next-line @typescript-eslint/no-var-requires +require('dotenv').config(); + +const { argv } = yargs + .options({ + network: { + alias: 'n', + choices: Object.values(SupportedNetwork), + demandOption: true, + description: 'network listener to use', + }, + chain: { + alias: 'c', + type: 'string', + description: 'chain to listen on', + }, + url: { + alias: 'u', + type: 'string', + description: 'node url', + }, + contractAddress: { + alias: 'a', + type: 'string', + description: 'eth contract address', + }, + archival: { + alias: 'A', + type: 'boolean', + description: 'run listener in archival mode or not', + }, + startBlock: { + alias: 'b', + type: 'number', + description: + 'when running in archival mode, which block should we start from', + }, + }) + .check((data) => { + if (!data.url && !data.chain) { + if (data.network === SupportedNetwork.Substrate) { + throw new Error('Must pass either URL or chain name!'); + } else { + // default to eth mainnet if not on substrate + data.chain = 'erc20'; + } + } + if (!networkUrls[data.chain] && !data.url) { + throw new Error(`no URL found for ${data.chain}`); + } + if ( + data.network !== SupportedNetwork.Substrate && + data.network !== SupportedNetwork.ERC20 && + data.network !== SupportedNetwork.ERC721 && + !data.contractAddress && + !contracts[data.chain] + ) { + throw new Error(`no contract found for ${data.chain}`); + } + if ( + data.network === SupportedNetwork.Substrate && + !networkSpecs[data.chain] + ) { + throw new Error(`no spec found for ${data.chain}`); + } + return true; + }); + +const { archival } = argv; +// if running in archival mode then which block shall we star from +const startBlock: number = argv.startBlock ?? 0; +const { network } = argv; +const chain = argv.chain || 'dummy'; +const url = argv.url || networkUrls[chain]; +const spec = networkSpecs[chain]; +const contract = argv.contractAddress || contracts[chain]; + +class StandaloneEventHandler extends IEventHandler { + // eslint-disable-next-line class-methods-use-this + public async handle(event: CWEvent): Promise { + console.log(`Received event: ${JSON.stringify(event, null, 2)}`); + return null; + } +} +const skipCatchup = false; +const tokenListUrls = ['https://gateway.ipfs.io/ipns/tokens.uniswap.org']; +const nftListUrls = [ + 'https://raw.githubusercontent.com/jnaviask/collectible-lists/main/test/schema/bigexample.collectiblelist.json', +]; + +interface TokenListEntry { + chainId: number; + address: string; + name: string; + symbol: string; + standard?: string; // erc721 + decimals?: number; // 18 +} + +async function getTokenList(tokenListUrl: string): Promise { + const data = await fetch(tokenListUrl) + .then((o) => o.json()) + .catch((e) => { + console.error(e); + return []; + }); + return data?.tokens?.filter((o) => o); +} + +console.log(`Connecting to ${chain} on url ${url}...`); + +if (network === SupportedNetwork.Substrate) { + SubstrateEvents.createApi(url, spec as any).then(async (api) => { + const fetcher = new SubstrateEvents.StorageFetcher(api); + try { + const fetched = await fetcher.fetch(); + console.log(fetched.map((f) => f.data)); + } catch (err) { + console.log(err); + console.error(`Got error from fetcher: ${JSON.stringify(err, null, 2)}.`); + } + SubstrateEvents.subscribeEvents({ + chain, + api, + handlers: [new StandaloneEventHandler()], + skipCatchup, + archival, + startBlock, + verbose: true, + enricherConfig: { balanceTransferThresholdPermill: 1_000 }, // 0.1% of total issuance + }); + }); +} else if (network === SupportedNetwork.Moloch) { + const contractVersion = 1; + MolochEvents.createApi(url, contractVersion, contract).then(async (api) => { + const dater = new EthDater(api.provider); + const fetcher = new MolochEvents.StorageFetcher( + api, + contractVersion, + dater + ); + try { + const fetched = await fetcher.fetch( + { startBlock: 11000000, maxResults: 3 }, + true + ); + // const fetched = await fetcher.fetchOne('132'); + console.log(fetched.map((f) => f.data)); + } catch (err) { + console.log(err); + console.error(`Got error from fetcher: ${JSON.stringify(err, null, 2)}.`); + } + MolochEvents.subscribeEvents({ + chain, + api, + contractVersion, + handlers: [new StandaloneEventHandler()], + skipCatchup, + verbose: true, + }); + }); +} else if (network === SupportedNetwork.Compound) { + CompoundEvents.createApi(url, contract).then(async (api) => { + const fetcher = new CompoundEvents.StorageFetcher(api); + try { + const fetched = await fetcher.fetch({ + startBlock: 13353227, + maxResults: 1, + }); + // const fetched = await fetcher.fetchOne('2'); + console.log(fetched.map((f) => f.data)); + } catch (err) { + console.log(err); + console.error(`Got error from fetcher: ${JSON.stringify(err, null, 2)}.`); + } + CompoundEvents.subscribeEvents({ + chain, + api, + handlers: [new StandaloneEventHandler()], + skipCatchup, + verbose: true, + }); + }); +} else if (network === SupportedNetwork.Aave) { + AaveEvents.createApi(url, contract).then(async (api) => { + const fetcher = new AaveEvents.StorageFetcher(api); + try { + const fetched = await fetcher.fetch({ + startBlock: 13353227, + maxResults: 1, + }); + // const fetched = await fetcher.fetchOne('10'); + console.log(fetched.sort((a, b) => a.blockNumber - b.blockNumber)); + } catch (err) { + console.log(err); + console.error(`Got error from fetcher: ${JSON.stringify(err, null, 2)}.`); + } + AaveEvents.subscribeEvents({ + chain, + api, + handlers: [new StandaloneEventHandler()], + skipCatchup, + verbose: true, + }); + }); +} else if (network === SupportedNetwork.ERC20) { + getTokenList(tokenListUrls[0]).then(async (tokens) => { + const validTokens = tokens.filter((t) => t.chainId === 1); + const tokenAddresses = validTokens.map((o) => o.address); + const tokenNames = validTokens.map((o) => o.name); + const api = await Erc20Events.createApi(url, tokenAddresses, tokenNames); + Erc20Events.subscribeEvents({ + chain, + api, + handlers: [new StandaloneEventHandler()], + skipCatchup, + verbose: false, + enricherConfig: { balanceTransferThresholdPermill: 500_000 }, // 50% of total supply + }); + }); +} else if (network === SupportedNetwork.ERC721) { + getTokenList(nftListUrls[0]).then(async (tokens) => { + const validTokens = tokens.filter( + (t) => t.chainId === 1 && t.standard === 'erc721' + ); + const tokenAddresses = validTokens.map((o) => o.address); + const tokenNames = validTokens.map((o) => o.name); + const api = await Erc721Events.createApi(url, tokenAddresses, tokenNames); + Erc721Events.subscribeEvents({ + chain, + api, + handlers: [new StandaloneEventHandler()], + skipCatchup, + verbose: false, + }); + }); +} diff --git a/packages/chain-events/scripts/listenerUtils.ts b/packages/chain-events/scripts/listenerUtils.ts new file mode 100644 index 00000000000..b068e610bff --- /dev/null +++ b/packages/chain-events/scripts/listenerUtils.ts @@ -0,0 +1,63 @@ +import type { RegisteredTypes } from '@polkadot/types/types'; + +import { HydraDXSpec } from './specs/hydraDX'; +import { KulupuSpec } from './specs/kulupu'; +import { StafiSpec } from './specs/stafi'; +import { CloverSpec } from './specs/clover'; +import { EdgewareSpec } from './specs/edgeware'; + +export const networkUrls = { + clover: 'wss://api.clover.finance', + hydradx: 'wss://rpc-01.snakenet.hydradx.io', + edgeware: 'ws://mainnet2.edgewa.re:9944', + 'edgeware-local': 'ws://localhost:9944', + 'edgeware-testnet': 'wss://beresheet1.edgewa.re', + kusama: 'wss://kusama-rpc.polkadot.io', + polkadot: 'wss://rpc.polkadot.io', + kulupu: 'ws://rpc.kulupu.corepaper.org/ws', + stafi: 'wss://scan-rpc.stafi.io/ws', + + moloch: 'wss://eth-mainnet.alchemyapi.io/v2/cNC4XfxR7biwO2bfIO5aKcs9EMPxTQfr', + 'moloch-local': 'ws://127.0.0.1:9545', + + marlin: 'wss://eth-mainnet.alchemyapi.io/v2/cNC4XfxR7biwO2bfIO5aKcs9EMPxTQfr', + 'marlin-local': 'ws://127.0.0.1:9545', + uniswap: + 'wss://eth-mainnet.alchemyapi.io/v2/cNC4XfxR7biwO2bfIO5aKcs9EMPxTQfr', + tribe: 'wss://eth-mainnet.alchemyapi.io/v2/cNC4XfxR7biwO2bfIO5aKcs9EMPxTQfr', + + aave: 'wss://eth-mainnet.alchemyapi.io/v2/cNC4XfxR7biwO2bfIO5aKcs9EMPxTQfr', + 'aave-local': 'ws://127.0.0.1:9545', + 'dydx-ropsten': + 'wss://eth-ropsten.alchemyapi.io/v2/2xXT2xx5AvA3GFTev3j_nB9LzWdmxPk7', + dydx: 'wss://eth-mainnet.alchemyapi.io/v2/cNC4XfxR7biwO2bfIO5aKcs9EMPxTQfr', + frax: 'ws://localhost:8545', + + erc20: 'wss://eth-mainnet.alchemyapi.io/v2/cNC4XfxR7biwO2bfIO5aKcs9EMPxTQfr', + 'eth-local': 'ws://127.0.0.1:8545', +} as const; + +export const networkSpecs: { [chain: string]: RegisteredTypes } = { + clover: CloverSpec, + hydradx: HydraDXSpec, + kulupu: KulupuSpec, + edgeware: EdgewareSpec, + 'edgeware-local': EdgewareSpec, + 'edgeware-testnet': EdgewareSpec, + stafi: StafiSpec, + kusama: {}, + polkadot: {}, +}; + +export const contracts = { + moloch: '0x1fd169A4f5c59ACf79d0Fd5d91D1201EF1Bce9f1', + 'moloch-local': '0x9561C133DD8580860B6b7E504bC5Aa500f0f06a7', + marlin: '0x777992c2E4EDF704e49680468a9299C6679e37F6', + aave: '0xEC568fffba86c094cf06b22134B23074DFE2252c', + 'aave-local': '0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9', + 'dydx-ropsten': '0x6938240Ba19cB8a614444156244b658f650c8D5c', + dydx: '0x7E9B1672616FF6D6629Ef2879419aaE79A9018D2', + uniswap: '0xc4e172459f1e7939d522503b81afaac1014ce6f6', + frax: '0x9fE46736679d2D9a65F0992F2272dE9f3c7fa6e0', + 'commonwealth-local': '0x7914a8b73E11432953d9cCda060018EA1d9DCde9', +}; diff --git a/packages/chain-events/scripts/listenerV2.ts b/packages/chain-events/scripts/listenerV2.ts new file mode 100644 index 00000000000..35331846790 --- /dev/null +++ b/packages/chain-events/scripts/listenerV2.ts @@ -0,0 +1,129 @@ +import * as yargs from 'yargs'; + +import { createListener, LoggingHandler, SupportedNetwork } from '../src'; + +import { networkUrls, contracts, networkSpecs } from './listenerUtils'; + +require('dotenv').config(); + +const { argv } = yargs.options({ + network: { + alias: 'n', + choices: Object.values(SupportedNetwork), + demandOption: true, + description: 'network to listen on', + }, + chain: { + alias: 'c', + type: 'string', + description: 'name of chain to listen on', + }, + url: { + alias: 'u', + type: 'string', + description: 'node url', + }, + contractAddress: { + alias: 'a', + type: 'string', + description: 'eth contract address', + }, + tokenName: { + alias: 't', + type: 'string', + description: + 'Name of the token if network is erc20 and contractAddress is a erc20 token address', + }, + reconnectSince: { + alias: 'R', + type: 'number', + description: 'Block number to query from', + }, +}); + +const shortcuts = { + substrate: { + chain: 'edgeware', + network: SupportedNetwork.Substrate, + url: networkUrls.edgeware, + spec: networkSpecs.edgeware, + enricherConfig: { + balanceTransferThreshold: 500_000, + }, + }, + erc20: { + chain: 'erc20', + network: SupportedNetwork.ERC20, + url: networkUrls.erc20, + tokenAddresses: ['0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'], + tokenNames: ['usd-coin'], + }, + compound: { + chain: 'marlin', + network: SupportedNetwork.Compound, + url: networkUrls.marlin, + address: contracts.marlin, + }, + aave: { + chain: 'dydx', + network: SupportedNetwork.Aave, + url: networkUrls.dydx, + address: contracts.dydx, + }, + moloch: { + chain: 'moloch', + network: SupportedNetwork.Moloch, + url: networkUrls.moloch, + address: contracts.moloch, + }, + commonwealth: { + chain: 'commonwealth', + network: SupportedNetwork.Commonwealth, + url: networkUrls['eth-local'], + address: contracts['commonwealth-local'], + }, +}; + +async function main(): Promise { + let listener; + let sc; + if (argv.network && !argv.chain) sc = shortcuts[argv.network]; + try { + listener = await createListener( + argv.chain || sc.chain || 'dummyChain', + argv.network || sc.network, + { + url: argv.url || sc.url || networkUrls[argv.chain], + address: argv.contractAddress || sc.address || contracts[argv.chain], + tokenAddresses: argv.contractAddress + ? [argv.contractAddress] + : sc.tokenAddresses, + tokenNames: argv.tokenName ? [argv.tokenName] : sc.tokenNames, + verbose: false, + spec: sc.spec || networkSpecs[argv.chain], + enricherConfig: sc.enricherConfig || { + balanceTransferThreshold: 500_000, + }, + discoverReconnectRange: argv.reconnectSince + ? () => Promise.resolve({ startBlock: argv.reconnectSince }) + : undefined, + } + ); + + listener.eventHandlers.logger = { + handler: new LoggingHandler(), + excludedEvents: [], + }; + + await listener.subscribe(); + } catch (e) { + console.log(e); + } + + return listener; +} + +main().then((listener) => { + const temp = listener; + console.log('Subscribed...'); +}); diff --git a/packages/chain-events/scripts/scraper.ts b/packages/chain-events/scripts/scraper.ts new file mode 100644 index 00000000000..e194cd6f665 --- /dev/null +++ b/packages/chain-events/scripts/scraper.ts @@ -0,0 +1,57 @@ +import { SubstrateEvents, SubstrateTypes } from '../dist/index'; +import { Registration } from '@polkadot/types/interfaces'; +import { Option } from '@polkadot/types'; +import { ParseType } from '../dist/substrate/filters/type_parser'; +import fs from 'fs'; + +const args = process.argv.slice(2); +const chain = args[0] || 'edgeware'; +console.log(`Listening to events on ${chain}.`); + +const networks = { + 'edgeware': 'ws://mainnet1.edgewa.re:9944', + 'edgeware-local': 'ws://localhost:9944', + 'edgeware-testnet': 'wss://beresheet1.edgewa.re', +}; + +const url = networks[chain]; + +if (!url) throw new Error(`no url for chain ${chain}`); +SubstrateEvents.createApi(url, {}).then(async (api) => { + const subscriber = new SubstrateEvents.Subscriber(api); + const identities = {}; + const FINISH_BLOCK = 1000000; + subscriber.subscribe(async (block) => { + // go through events and add new identities + for (const { event } of block.events) { + const kind = ParseType(block.versionName, block.versionNumber, event.section, event.method); + if (kind === SubstrateTypes.EventKind.IdentitySet) { + // query the entire identity data + const who = event.data[0].toString(); + const registrationOpt = await api.query.identity.identityOf>(who); + + // if the identity data exists, populate the object + if (registrationOpt.isSome) { + const { info } = registrationOpt.unwrap(); + identities[who] = info; + } + } if (kind === SubstrateTypes.EventKind.IdentityCleared || kind === SubstrateTypes.EventKind.IdentityKilled) { + // clear deleted identities from our scaped object + const who = event.data[0].toString(); + if (identities[who]) { + delete identities[who]; + } + } + } + + // check for completion + if (+block.header.number >= FINISH_BLOCK) { + subscriber.unsubscribe(); + + // write identities out to file and exit + fs.writeFileSync('./identities.json', JSON.stringify(identities, null, 2)); + await api.disconnect(); + process.exit(0); + } + }); +}); diff --git a/packages/chain-events/scripts/specs/clover.ts b/packages/chain-events/scripts/specs/clover.ts new file mode 100644 index 00000000000..70c9fffee73 --- /dev/null +++ b/packages/chain-events/scripts/specs/clover.ts @@ -0,0 +1,19 @@ +import { RegisteredTypes } from '@polkadot/types/types'; + +export const CloverSpec: RegisteredTypes = { + types: { + Amount: 'i128', + Keys: 'SessionKeys4', + AmountOf: 'Amount', + Balance: 'u128', + Rate: 'FixedU128', + Ratio: 'FixedU128', + EcdsaSignature: '[u8; 65]', + EvmAddress: 'H160', + EthereumTxHash: 'H256', + BridgeNetworks: { + _enum: ['BSC', 'Ethereum'], + }, + AccountInfo: 'AccountInfoWithDualRefCount', + }, +}; diff --git a/packages/chain-events/scripts/specs/edgeware.ts b/packages/chain-events/scripts/specs/edgeware.ts new file mode 100644 index 00000000000..a696aeb057c --- /dev/null +++ b/packages/chain-events/scripts/specs/edgeware.ts @@ -0,0 +1,604 @@ +import type { RegisteredTypes } from '@polkadot/types/types'; + +export const EdgewareSpec: RegisteredTypes = { + typesBundle: { + spec: { + beresheet: { + types: [ + { + minmax: [10047, null], + types: { + Balance2: 'u128', + DepositNonce: 'u64', + ResourceId: '[u8; 32]', + ProposalStatus: { + _enum: ['Initiated', 'Approved', 'Rejected'], + }, + ProposalVotes: { + votes_for: 'Vec', + votes_against: 'Vec', + staus: 'ProposalStatus', + expiry: 'BlockNumber', + }, + VoteStage: { + _enum: ['PreVoting', 'Commit', 'Voting', 'Completed'], + }, + VoteType: { + _enum: ['Binary', 'MultiOption', 'RankedChoice'], + }, + TallyType: { + _enum: ['OnePerson', 'OneCoin'], + }, + VoteOutcome: '[u8; 32]', + VotingTally: 'Option>', + VoteData: { + initiator: 'AccountId', + stage: 'VoteStage', + vote_type: 'VoteType', + tally_type: 'TallyType', + is_commit_reveal: 'bool', + }, + Commitments: 'Vec<(AccountId, VoteOutcome)>', + Reveals: 'Vec<(AccountId, Vec)>', + VoteRecord: { + id: 'u64', + commitments: 'Commitments', + reveals: 'Reveals', + data: 'VoteData', + outcomes: 'Vec', + }, + ProposalRecord: { + index: 'u32', + author: 'AccountId', + stage: 'VoteStage', + transition_time: 'u32', + title: 'Text', + contents: 'Text', + vote_id: 'u64', + }, + ProposalContents: 'Bytes', + ProposalTitle: 'Bytes', + CID: 'Vec', + Properties: { + _set: { + Transferable: 1, + Burnable: 2, + }, + }, + ClassData: { + deposit: 'Balance', + properties: 'Properties', + }, + TokenData: { + deposit: 'Balance', + }, + ClassInfo: { + metadata: 'Vec', + total_issuance: 'TokenId', + owner: 'AccountId', + data: 'ClassData', + }, + ClassInfoOf: 'ClassInfo', + TokenInfo: { + metadata: 'Vec', + owner: 'AccountId', + data: 'TokenData', + }, + TokenInfoOf: 'TokenInfo', + TokenId: 'u64', + ClassIdOf: 'ClassId', + TokenIdOf: 'TokenId', + Amount: 'i128', + AmountOf: 'Amount', + Approval: { + amount: 'Balance', + deposit: 'Balance', + }, + ApprovalKey: { + owner: 'AccountId', + delegate: 'AccountId', + }, + Commitment: 'ScalarData', + CurrencyId: 'u64', + CurrencyIdOf: 'CurrencyId', + DustHandlerType: { + _enum: { + Burn: 'Null', + Transfer: 'AccountId', + }, + }, + HashFunction: { + _enum: [ + 'PoseidonDefault', + 'PoseidonExp3', + 'PoseidonExp5', + 'PoseidonExp17', + 'MiMC', + 'Blake2', + 'Sha256', + ], + }, + Manager: { + accountId: 'AccountId', + required: 'bool', + }, + MerkleTree: { + leaf_count: 'u32', + max_leaves: 'u32', + depth: 'u8', + root_hash: 'ScalarData', + edge_nodes: 'Vec', + hasher: 'HashFunction', + should_store_leaves: 'bool', + }, + MixerInfo: { + minimum_deposit_length_for_reward: 'BlockNumber', + fixed_deposit_size: 'Balance', + currency_id: 'CurrencyIdOf', + }, + Nullifier: 'ScalarData', + ScalarData: '[u8; 32]', + TokenDetails: { + owner: 'AccountId', + issuer: 'AccountId', + admin: 'AccountId', + freezer: 'AccountId', + supply: 'Balance', + deposit: 'Balance', + min_balance: 'Balance', + approvals: 'u32', + is_frozen: 'bool', + dust_type: 'DustHandlerType', + }, + TokenMetadata: { + deposit: 'Balance', + name: 'Vec', + symbol: 'Vec', + decimals: 'u8', + is_frozen: 'bool', + }, + TreeId: 'u32', + WithdrawProof: { + mixer_id: 'TreeId', + cached_block: 'BlockNumber', + cached_root: 'ScalarData', + comms: 'Vec', + nullifier_hash: 'ScalarData', + proof_bytes: 'Vec', + leaf_index_commitments: 'Vec', + proof_commitments: 'Vec', + recipient: 'Option', + relayer: 'Option', + }, + ETHBlock: { + inner: 'Block', + }, + ETHReceipts: { + inner: 'Vec', + }, + ETHTxStatuses: { + inner: 'Vec', + }, + AccountInfo: 'AccountInfoWithTripleRefCount', + Address: 'MultiAddress', + LookupSource: 'MultiAddress', + }, + }, + ], + }, + edgeware: { + alias: { + voting: { + Tally: 'VotingTally', + }, + }, + types: [ + { + minmax: [0, 31], + types: { + ProposalRecord: { + index: 'u32', + author: 'AccountId', + stage: 'VoteStage', + transition_time: 'u32', + title: 'Text', + contents: 'Text', + vote_id: 'u64', + }, + ProposalContents: 'Bytes', + ProposalTitle: 'Bytes', + Balance2: 'u128', + VoteStage: { + _enum: ['PreVoting', 'Commit', 'Voting', 'Completed'], + }, + VoteType: { + _enum: ['Binary', 'MultiOption', 'RankedChoice'], + }, + TallyType: { + _enum: ['OnePerson', 'OneCoin'], + }, + VoteOutcome: '[u8; 32]', + VotingTally: 'Option>', + VoteData: { + initiator: 'AccountId', + stage: 'VoteStage', + vote_type: 'VoteType', + tally_type: 'TallyType', + is_commit_reveal: 'bool', + }, + Commitments: 'Vec<(AccountId, VoteOutcome)>', + Reveals: 'Vec<(AccountId, Vec)>', + VoteRecord: { + id: 'u64', + commitments: 'Commitments', + reveals: 'Reveals', + data: 'VoteData', + outcomes: 'Vec', + }, + 'voting::VoteType': 'VoteType', + 'voting::TallyType': 'TallyType', + 'voting::Tally': 'VotingTally', + Keys: 'SessionKeys4', + StakingLedger: 'StakingLedgerTo240', + Votes: 'VotesTo230', + ReferendumInfo: 'ReferendumInfoTo239', + Weight: 'u32', + DispatchInfo: 'DispatchInfoTo244', + OpenTip: 'OpenTipTo225', + ContractExecResult: 'ContractExecResultTo255', + CompactAssignments: 'CompactAssignmentsTo257', + RewardDestination: 'RewardDestinationTo257', + RefCount: 'RefCountTo259', + AccountInfo: 'AccountInfoWithRefCount', + Address: 'IndicesLookupSource', + LookupSource: 'IndicesLookupSource', + }, + }, + { + minmax: [32, 38], + types: { + ProposalRecord: { + index: 'u32', + author: 'AccountId', + stage: 'VoteStage', + transition_time: 'u32', + title: 'Text', + contents: 'Text', + vote_id: 'u64', + }, + ProposalContents: 'Bytes', + ProposalTitle: 'Bytes', + Balance2: 'u128', + VoteStage: { + _enum: ['PreVoting', 'Commit', 'Voting', 'Completed'], + }, + VoteType: { + _enum: ['Binary', 'MultiOption', 'RankedChoice'], + }, + TallyType: { + _enum: ['OnePerson', 'OneCoin'], + }, + VoteOutcome: '[u8; 32]', + VotingTally: 'Option>', + VoteData: { + initiator: 'AccountId', + stage: 'VoteStage', + vote_type: 'VoteType', + tally_type: 'TallyType', + is_commit_reveal: 'bool', + }, + Commitments: 'Vec<(AccountId, VoteOutcome)>', + Reveals: 'Vec<(AccountId, Vec)>', + VoteRecord: { + id: 'u64', + commitments: 'Commitments', + reveals: 'Reveals', + data: 'VoteData', + outcomes: 'Vec', + }, + 'voting::VoteType': 'VoteType', + 'voting::TallyType': 'TallyType', + 'voting::Tally': 'VotingTally', + CompactAssignments: 'CompactAssignmentsTo257', + ContractExecResult: 'ContractExecResultTo255', + RewardDestination: 'RewardDestinationTo257', + RefCount: 'u32', + AccountInfo: 'AccountInfoWithRefCount', + Address: 'IndicesLookupSource', + LookupSource: 'IndicesLookupSource', + }, + }, + { + minmax: [39, 41], + types: { + ProposalRecord: { + index: 'u32', + author: 'AccountId', + stage: 'VoteStage', + transition_time: 'u32', + title: 'Text', + contents: 'Text', + vote_id: 'u64', + }, + ProposalContents: 'Bytes', + ProposalTitle: 'Bytes', + Balance2: 'u128', + VoteStage: { + _enum: ['PreVoting', 'Commit', 'Voting', 'Completed'], + }, + VoteType: { + _enum: ['Binary', 'MultiOption', 'RankedChoice'], + }, + TallyType: { + _enum: ['OnePerson', 'OneCoin'], + }, + VoteOutcome: '[u8; 32]', + VotingTally: 'Option>', + VoteData: { + initiator: 'AccountId', + stage: 'VoteStage', + vote_type: 'VoteType', + tally_type: 'TallyType', + is_commit_reveal: 'bool', + }, + Commitments: 'Vec<(AccountId, VoteOutcome)>', + Reveals: 'Vec<(AccountId, Vec)>', + VoteRecord: { + id: 'u64', + commitments: 'Commitments', + reveals: 'Reveals', + data: 'VoteData', + outcomes: 'Vec', + }, + 'voting::VoteType': 'VoteType', + 'voting::TallyType': 'TallyType', + 'voting::Tally': 'VotingTally', + RefCount: 'u32', + AccountInfo: 'AccountInfoWithRefCount', + Address: 'IndicesLookupSource', + LookupSource: 'IndicesLookupSource', + }, + }, + { + minmax: [42, 46], + types: { + Balance2: 'u128', + ChainId: 'u8', + DepositNonce: 'u64', + ResourceId: '[u8; 32]', + ProposalStatus: { + _enum: ['Initiated', 'Approved', 'Rejected'], + }, + ProposalVotes: { + votes_for: 'Vec', + votes_against: 'Vec', + staus: 'ProposalStatus', + expiry: 'BlockNumber', + }, + VoteStage: { + _enum: ['PreVoting', 'Commit', 'Voting', 'Completed'], + }, + VoteType: { + _enum: ['Binary', 'MultiOption', 'RankedChoice'], + }, + TallyType: { + _enum: ['OnePerson', 'OneCoin'], + }, + VoteOutcome: '[u8; 32]', + VotingTally: 'Option>', + VoteData: { + initiator: 'AccountId', + stage: 'VoteStage', + vote_type: 'VoteType', + tally_type: 'TallyType', + is_commit_reveal: 'bool', + }, + Commitments: 'Vec<(AccountId, VoteOutcome)>', + Reveals: 'Vec<(AccountId, Vec)>', + VoteRecord: { + id: 'u64', + commitments: 'Commitments', + reveals: 'Reveals', + data: 'VoteData', + outcomes: 'Vec', + }, + ProposalRecord: { + index: 'u32', + author: 'AccountId', + stage: 'VoteStage', + transition_time: 'u32', + title: 'Text', + contents: 'Text', + vote_id: 'u64', + }, + ProposalContents: 'Bytes', + ProposalTitle: 'Bytes', + AccountInfo: 'AccountInfoWithRefCount', + Address: 'MultiAddress', + LookupSource: 'MultiAddress', + }, + }, + { + minmax: [47, null], + types: { + Balance2: 'u128', + DepositNonce: 'u64', + ResourceId: '[u8; 32]', + ProposalStatus: { + _enum: ['Initiated', 'Approved', 'Rejected'], + }, + ProposalVotes: { + votes_for: 'Vec', + votes_against: 'Vec', + staus: 'ProposalStatus', + expiry: 'BlockNumber', + }, + VoteStage: { + _enum: ['PreVoting', 'Commit', 'Voting', 'Completed'], + }, + VoteType: { + _enum: ['Binary', 'MultiOption', 'RankedChoice'], + }, + TallyType: { + _enum: ['OnePerson', 'OneCoin'], + }, + VoteOutcome: '[u8; 32]', + VotingTally: 'Option>', + VoteData: { + initiator: 'AccountId', + stage: 'VoteStage', + vote_type: 'VoteType', + tally_type: 'TallyType', + is_commit_reveal: 'bool', + }, + Commitments: 'Vec<(AccountId, VoteOutcome)>', + Reveals: 'Vec<(AccountId, Vec)>', + VoteRecord: { + id: 'u64', + commitments: 'Commitments', + reveals: 'Reveals', + data: 'VoteData', + outcomes: 'Vec', + }, + ProposalRecord: { + index: 'u32', + author: 'AccountId', + stage: 'VoteStage', + transition_time: 'u32', + title: 'Text', + contents: 'Text', + vote_id: 'u64', + }, + ProposalContents: 'Bytes', + ProposalTitle: 'Bytes', + CID: 'Vec', + Properties: { + _set: { + Transferable: 1, + Burnable: 2, + }, + }, + ClassData: { + deposit: 'Balance', + properties: 'Properties', + }, + TokenData: { + deposit: 'Balance', + }, + ClassInfo: { + metadata: 'Vec', + total_issuance: 'TokenId', + owner: 'AccountId', + data: 'ClassData', + }, + ClassInfoOf: 'ClassInfo', + TokenInfo: { + metadata: 'Vec', + owner: 'AccountId', + data: 'TokenData', + }, + TokenInfoOf: 'TokenInfo', + TokenId: 'u64', + ClassIdOf: 'ClassId', + TokenIdOf: 'TokenId', + Amount: 'i128', + AmountOf: 'Amount', + Approval: { + amount: 'Balance', + deposit: 'Balance', + }, + ApprovalKey: { + owner: 'AccountId', + delegate: 'AccountId', + }, + Commitment: 'ScalarData', + CurrencyId: 'u64', + CurrencyIdOf: 'CurrencyId', + DustHandlerType: { + _enum: { + Burn: 'Null', + Transfer: 'AccountId', + }, + }, + HashFunction: { + _enum: [ + 'PoseidonDefault', + 'PoseidonExp3', + 'PoseidonExp5', + 'PoseidonExp17', + 'MiMC', + 'Blake2', + 'Sha256', + ], + }, + Manager: { + accountId: 'AccountId', + required: 'bool', + }, + MerkleTree: { + leaf_count: 'u32', + max_leaves: 'u32', + depth: 'u8', + root_hash: 'ScalarData', + edge_nodes: 'Vec', + hasher: 'HashFunction', + should_store_leaves: 'bool', + }, + MixerInfo: { + minimum_deposit_length_for_reward: 'BlockNumber', + fixed_deposit_size: 'Balance', + currency_id: 'CurrencyIdOf', + }, + Nullifier: 'ScalarData', + ScalarData: '[u8; 32]', + TokenDetails: { + owner: 'AccountId', + issuer: 'AccountId', + admin: 'AccountId', + freezer: 'AccountId', + supply: 'Balance', + deposit: 'Balance', + min_balance: 'Balance', + approvals: 'u32', + is_frozen: 'bool', + dust_type: 'DustHandlerType', + }, + TokenMetadata: { + deposit: 'Balance', + name: 'Vec', + symbol: 'Vec', + decimals: 'u8', + is_frozen: 'bool', + }, + TreeId: 'u32', + WithdrawProof: { + mixer_id: 'TreeId', + cached_block: 'BlockNumber', + cached_root: 'ScalarData', + comms: 'Vec', + nullifier_hash: 'ScalarData', + proof_bytes: 'Vec', + leaf_index_commitments: 'Vec', + proof_commitments: 'Vec', + recipient: 'Option', + relayer: 'Option', + }, + ETHBlock: { + inner: 'Block', + }, + ETHReceipts: { + inner: 'Vec', + }, + ETHTxStatuses: { + inner: 'Vec', + }, + AccountInfo: 'AccountInfoWithTripleRefCount', + Address: 'MultiAddress', + LookupSource: 'MultiAddress', + }, + }, + ], + }, + }, + }, +}; diff --git a/packages/chain-events/scripts/specs/hydraDX.ts b/packages/chain-events/scripts/specs/hydraDX.ts new file mode 100644 index 00000000000..08dbc564d94 --- /dev/null +++ b/packages/chain-events/scripts/specs/hydraDX.ts @@ -0,0 +1,50 @@ +export const HydraDXSpec = { + types: { + AssetPair: { + asset_in: 'AssetId', + asset_out: 'AssetId', + }, + Amount: 'i128', + AmountOf: 'Amount', + Address: 'AccountId', + OrmlAccountData: { + free: 'Balance', + frozen: 'Balance', + reserved: 'Balance', + }, + BalanceInfo: { + amount: 'Balance', + assetId: 'AssetId', + }, + Chain: { + genesisHash: 'Vec', + lastBlockHash: 'Vec', + }, + CurrencyId: 'AssetId', + CurrencyIdOf: 'AssetId', + Intention: { + who: 'AccountId', + asset_sell: 'AssetId', + asset_buy: 'AssetId', + amount: 'Balance', + discount: 'bool', + sell_or_buy: 'IntentionType', + }, + IntentionId: 'Hash', + IntentionType: { + _enum: ['SELL', 'BUY'], + }, + LookupSource: 'AccountId', + OrderedSet: 'Vec', + Price: 'Balance', + Fee: { + numerator: 'u32', + denominator: 'u32', + }, + }, + alias: { + tokens: { + AccountData: 'OrmlAccountData', + }, + }, +}; diff --git a/packages/chain-events/scripts/specs/kulupu.ts b/packages/chain-events/scripts/specs/kulupu.ts new file mode 100644 index 00000000000..2f539e6e24f --- /dev/null +++ b/packages/chain-events/scripts/specs/kulupu.ts @@ -0,0 +1,48 @@ +import type { RegisteredTypes } from '@polkadot/types/types'; + +export const KulupuSpec: RegisteredTypes = { + typesBundle: { + spec: { + kulupu: { + types: [ + { + // on all versions + minmax: [0, undefined], + types: { + CurvePoint: { + start: 'BlockNumber', + reward: 'Balance', + taxation: 'Perbill', + }, + Difficulty: 'U256', + DifficultyAndTimestamp: { + difficulty: 'Difficulty', + timestamp: 'Moment', + }, + Era: { + genesisBlockHash: 'H256', + finalBlockHash: 'H256', + finalStateRoot: 'H256', + }, + }, + }, + { + // swap to MultiAddress in runtime 13 + minmax: [13, undefined], + types: { + Address: 'MultiAddress', + LookupSource: 'MultiAddress', + }, + }, + { + // enable pallet-lockdrop in runtime 17 + minmax: [17, undefined], + types: { + CampaignIdentifier: '[u8; 4]', + }, + }, + ], + }, + }, + }, +}; diff --git a/packages/chain-events/scripts/specs/stafi.ts b/packages/chain-events/scripts/specs/stafi.ts new file mode 100644 index 00000000000..6a964959714 --- /dev/null +++ b/packages/chain-events/scripts/specs/stafi.ts @@ -0,0 +1,122 @@ +import type { RegisteredTypes } from '@polkadot/types/types'; + +export const StafiSpec: RegisteredTypes = { + typesBundle: { + spec: { + node: { + types: [ + { + // on all versions + minmax: [0, undefined], + types: { + RefCount: 'u32', + ChainId: 'u8', + ResourceId: '[u8; 32]', + DepositNonce: 'u64', + RateType: 'u64', + AccountRData: { + free: 'u128', + }, + RSymbol: { + _enum: ['RFIS', 'RDOT', 'RKSM', 'RATOM'], + }, + AccountXData: { + free: 'u128', + }, + XSymbol: { + _enum: ['WRA'], + }, + ProposalStatus: { + _enum: ['Active', 'Passed', 'Expired', 'Executed'], + }, + ProposalVotes: { + voted: 'Vec', + status: 'ProposalStatus', + expiry: 'BlockNumber', + }, + BondRecord: { + bonder: 'AccountId', + symbol: 'RSymbol', + pubkey: 'Vec', + pool: 'Vec', + blockhash: 'Vec', + txhash: 'Vec', + amount: 'u128', + }, + BondReason: { + _enum: [ + 'Pass', + 'BlockhashUnmatch', + 'TxhashUnmatch', + 'PubkeyUnmatch', + 'PoolUnmatch', + 'AmountUnmatch', + ], + }, + BondState: { + _enum: ['Dealing', 'Fail', 'Success'], + }, + SigVerifyResult: { + _enum: ['InvalidPubkey', 'Fail', 'Pass'], + }, + PoolBondState: { + _enum: [ + 'EraUpdated', + 'BondReported', + 'ActiveReported', + 'WithdrawSkipped', + 'WithdrawReported', + 'TransferReported', + ], + }, + BondSnapshot: { + symbol: 'RSymbol', + era: 'u32', + pool: 'Vec', + bond: 'u128', + unbond: 'u128', + active: 'u128', + last_voter: 'AccountId', + bond_state: 'PoolBondState', + }, + LinkChunk: { + bond: 'u128', + unbond: 'u128', + active: 'u128', + }, + OriginalTxType: { + _enum: [ + 'Transfer', + 'Bond', + 'Unbond', + 'WithdrawUnbond', + 'ClaimRewards', + ], + }, + Unbonding: { + who: 'AccountId', + value: 'u128', + recipient: 'Vec', + }, + UserUnlockChunk: { + pool: 'Vec', + unlock_era: 'u32', + value: 'u128', + recipient: 'Vec', + }, + RproposalStatus: { + _enum: ['Initiated', 'Approved', 'Rejected', 'Expired'], + }, + RproposalVotes: { + votes_for: 'Vec', + votes_against: 'Vec', + status: 'RproposalStatus', + expiry: 'BlockNumber', + }, + }, + }, + ], + }, + }, + }, +}; diff --git a/packages/chain-events/src/Listener.ts b/packages/chain-events/src/Listener.ts new file mode 100644 index 00000000000..69ba3d4b07e --- /dev/null +++ b/packages/chain-events/src/Listener.ts @@ -0,0 +1,124 @@ +import * as net from 'net'; + +import { + IEventHandler, + IChainEventKind, + IEventSubscriber, + IEventProcessor, + IChainEventData, + CWEvent, + IStorageFetcher, + IDisconnectedRange, + SupportedNetwork, +} from './interfaces'; +import { addPrefix, factory } from './logging'; + +let log; + +// TODO: processBlock + processMissedBlocks can both be generalized and override in edge case listeners +// TODO: subscribe method can be implemented here and override in edge case (or use super.subscribe() in edge cases) +export abstract class Listener< + Api, + StorageFetcher extends IStorageFetcher, + Processor extends IEventProcessor, + Subscriber extends IEventSubscriber, + EventKind extends IChainEventKind +> { + public eventHandlers: { + [key: string]: { + handler: IEventHandler; + excludedEvents: EventKind[]; + }; + }; + + // events to be excluded regardless of handler (overrides handler specific excluded events + public globalExcludedEvents: EventKind[]; + + public storageFetcher: StorageFetcher; + + public discoverReconnectRange: (chain: string) => Promise; + + protected _subscriber: Subscriber; + + protected _processor: Processor; + + protected _api: Api; + + protected _subscribed: boolean; + + protected _lastBlockNumber: number; + + protected readonly _chain: string; + + protected readonly _verbose: boolean; + + protected constructor( + network: SupportedNetwork, + chain: string, + verbose?: boolean + ) { + this._chain = chain; + this.eventHandlers = {}; + this._verbose = !!verbose; + this.globalExcludedEvents = []; + + log = factory.getLogger(addPrefix(__filename, [network, chain])); + } + + public abstract init(): Promise; + + public abstract subscribe(): Promise; + + public async unsubscribe(): Promise { + if (!this._subscriber) { + log.warn(`Subscriber isn't initialized. Please run init() first!`); + return; + } + + if (!this._subscribed) { + log.warn(`The listener is not subscribed`); + return; + } + + this._subscriber.unsubscribe(); + this._subscribed = false; + } + + protected async handleEvent(event: CWEvent): Promise { + let prevResult; + + event.chain = this._chain; + event.received = Date.now(); + + for (const key of Object.keys(this.eventHandlers)) { + const eventHandler = this.eventHandlers[key]; + if ( + !this.globalExcludedEvents.includes(event.data.kind as EventKind) && + !eventHandler.excludedEvents?.includes(event.data.kind as EventKind) + ) { + try { + prevResult = await eventHandler.handler.handle(event, prevResult); + } catch (err) { + log.error(`Event handle failure: ${err.message}`); + break; + } + } + } + } + + protected abstract processBlock(block: any): Promise; + + public get chain(): string { + return this._chain; + } + + public get subscribed(): boolean { + return this._subscribed; + } + + public abstract get options(): any; + + public get lastBlockNumber(): number { + return this._lastBlockNumber; + } +} diff --git a/packages/chain-events/src/chains/aave/Listener.ts b/packages/chain-events/src/chains/aave/Listener.ts new file mode 100644 index 00000000000..eb71b9b91f0 --- /dev/null +++ b/packages/chain-events/src/chains/aave/Listener.ts @@ -0,0 +1,162 @@ +import { Listener as BaseListener } from '../../Listener'; +import { + CWEvent, + IDisconnectedRange, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { + Api, + EventKind, + IEventData, + ListenerOptions as AaveListenerOptions, + RawEvent, +} from './types'; +import { createApi } from './subscribeFunc'; +import { Subscriber } from './subscriber'; +import { Processor } from './processor'; +import { StorageFetcher } from './storageFetcher'; + +export class Listener extends BaseListener< + Api, + StorageFetcher, + Processor, + Subscriber, + EventKind +> { + private readonly _options: AaveListenerOptions; + + protected readonly log; + + constructor( + chain: string, + govContractAddress: string, + url?: string, + skipCatchup?: boolean, + verbose?: boolean, + discoverReconnectRange?: (c: string) => Promise + ) { + super(SupportedNetwork.Aave, chain, verbose); + + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Aave, this._chain]) + ); + + this._options = { + url, + govContractAddress, + skipCatchup: !!skipCatchup, + }; + + this.discoverReconnectRange = discoverReconnectRange; + + this._subscribed = false; + } + + public async init(): Promise { + try { + this._api = await createApi( + this._options.url, + this._options.govContractAddress, + 10 * 1000, + this._chain + ); + } catch (error) { + this.log.error(`Fatal error occurred while starting the API`); + throw error; + } + + try { + this._processor = new Processor(this._api, this._chain); + this._subscriber = new Subscriber(this._api, this._chain, this._verbose); + this.storageFetcher = new StorageFetcher(this._api, this._chain); + } catch (error) { + this.log.error( + `Fatal error occurred while starting the Processor, StorageFetcher and Subscriber` + ); + throw error; + } + } + + public async subscribe(): Promise { + if (!this._subscriber) { + this.log.info( + `Subscriber for ${this._chain} isn't initialized. Please run init() first!` + ); + return; + } + + if (!this.options.skipCatchup) await this.processMissedBlocks(); + else this.log.info(`Skipping event catchup!`); + + try { + this.log.info( + `Subscribing to Aave contract: ${this._chain}, on url ${this._options.url}` + ); + await this._subscriber.subscribe(this.processBlock.bind(this)); + this._subscribed = true; + } catch (error) { + this.log.error(`Subscription error: ${error.message}`); + } + } + + public async updateAddress(): Promise { + // TODO + } + + private async processMissedBlocks(): Promise { + this.log.info(`Detected offline time, polling missed blocks...`); + + if (!this.discoverReconnectRange) { + this.log.info( + `Unable to determine offline range - No discoverReconnectRange function given` + ); + } + + let offlineRange: IDisconnectedRange; + try { + offlineRange = await this.discoverReconnectRange(this._chain); + if (!offlineRange) { + this.log.warn(`No offline range found, skipping event catchup.`); + return; + } + } catch (error) { + this.log.error( + `Could not discover offline range: ${error.message}. Skipping event catchup.` + ); + return; + } + + if (!offlineRange || !offlineRange.startBlock) { + this.log.warn(`Unable to determine offline time range.`); + return; + } + + try { + const cwEvents = await this.storageFetcher.fetch(offlineRange); + for (const event of cwEvents) { + await this.handleEvent(event); + } + } catch (error) { + this.log.error(`Unable to fetch events from storage: ${error.message}`); + } + } + + protected async processBlock(event: RawEvent): Promise { + const { blockNumber } = event; + if (!this._lastBlockNumber || blockNumber > this._lastBlockNumber) { + this._lastBlockNumber = blockNumber; + } + + const cwEvents: CWEvent[] = await this._processor.process(event); + + for (const evt of cwEvents) { + await this.handleEvent(evt as CWEvent); + } + } + + public get options(): AaveListenerOptions { + return this._options; + } +} diff --git a/packages/chain-events/src/chains/aave/filters/enricher.ts b/packages/chain-events/src/chains/aave/filters/enricher.ts new file mode 100644 index 00000000000..0d3b43e4e0c --- /dev/null +++ b/packages/chain-events/src/chains/aave/filters/enricher.ts @@ -0,0 +1,192 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { BigNumber } from 'ethers'; + +import { TypedEventFilter } from '../../../contractTypes/commons'; +import { AaveTokenV2, IAaveGovernanceV2 } from '../../../contractTypes'; +import { CWEvent, SupportedNetwork } from '../../../interfaces'; +import { EventKind, RawEvent, IEventData, Api } from '../types'; + +type GetEventArgs = T extends TypedEventFilter ? Y : never; +type GetArgType = GetEventArgs< + ReturnType +>; +type GetTokenArgType = GetEventArgs< + ReturnType +>; + +export async function Enrich( + api: Api, + blockNumber: number, + kind: EventKind, + rawData: RawEvent +): Promise> { + switch (kind) { + case EventKind.ProposalCanceled: { + const { id } = rawData.args as GetArgType<'ProposalCanceled'>; + return { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Aave, + data: { + kind, + id: +id, + }, + }; + } + case EventKind.ProposalCreated: { + const { + id, + creator, + executor, + targets, + signatures, + calldatas, + startBlock, + endBlock, + strategy, + ipfsHash, + } = rawData.args as GetArgType<'ProposalCreated'>; + + // values doesn't appear on the object version, hack around it by accessing the + // argument array instead + const values = rawData.args[4] as BigNumber[]; + + return { + blockNumber, + excludeAddresses: [creator], + network: SupportedNetwork.Aave, + data: { + kind, + id: +id, + proposer: creator, + executor, + targets, + values: values.map((v) => v.toString()), + signatures, + calldatas, + startBlock: +startBlock, + endBlock: +endBlock, + strategy, + ipfsHash, + }, + }; + } + case EventKind.ProposalExecuted: { + const { id } = rawData.args as GetArgType<'ProposalExecuted'>; + return { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Aave, + data: { + kind, + id: +id, + }, + }; + } + case EventKind.ProposalQueued: { + const { id, executionTime } = rawData.args as GetArgType< + 'ProposalQueued' + >; + return { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Aave, + data: { + kind, + id: +id, + executionTime: +executionTime, + }, + }; + } + case EventKind.VoteEmitted: { + const { voter, id, support, votingPower } = rawData.args as GetArgType< + 'VoteEmitted' + >; + return { + blockNumber, + excludeAddresses: [voter], + network: SupportedNetwork.Aave, + data: { + kind, + id: +id, + voter, + support, + votingPower: votingPower.toString(), + }, + }; + } + case EventKind.DelegateChanged: { + const { + delegator, + delegatee, + delegationType, + } = rawData.args as GetTokenArgType<'DelegateChanged'>; + return { + blockNumber, + excludeAddresses: [delegator], + network: SupportedNetwork.Aave, + data: { + kind, + tokenAddress: rawData.address, + delegator, + delegatee, + type: delegationType, + }, + }; + } + case EventKind.DelegatedPowerChanged: { + const { user, amount, delegationType } = rawData.args as GetTokenArgType< + 'DelegatedPowerChanged' + >; + return { + blockNumber, + excludeAddresses: [user], + network: SupportedNetwork.Aave, + data: { + kind, + tokenAddress: rawData.address, + who: user, + amount: amount.toString(), + type: delegationType, + }, + }; + } + case EventKind.Transfer: { + const { from, to, value } = rawData.args as GetTokenArgType<'Transfer'>; + return { + blockNumber, + excludeAddresses: [from], + network: SupportedNetwork.Aave, + data: { + kind, + tokenAddress: rawData.address, + from, + to, + amount: value.toString(), + }, + }; + } + case EventKind.Approval: { + const { owner, spender, value } = rawData.args as GetTokenArgType< + 'Approval' + >; + return { + blockNumber, + excludeAddresses: [owner], + network: SupportedNetwork.Aave, + data: { + kind, + tokenAddress: rawData.address, + owner, + spender, + amount: value.toString(), + }, + }; + } + default: { + throw new Error(`Unknown event kind: ${kind}`); + } + } + + return { blockNumber: null, network: SupportedNetwork.Aave, data: null }; +} diff --git a/packages/chain-events/src/chains/aave/filters/labeler.ts b/packages/chain-events/src/chains/aave/filters/labeler.ts new file mode 100644 index 00000000000..6a200ec0ec6 --- /dev/null +++ b/packages/chain-events/src/chains/aave/filters/labeler.ts @@ -0,0 +1,115 @@ +import moment from 'moment'; + +import { + LabelerFilter, + IEventLabel, + SupportedNetwork, +} from '../../../interfaces'; +import { IEventData, EventKind } from '../types'; + +function fmtAddr(addr: string) { + if (!addr) return ''; + if (addr.length < 16) return addr; + return `${addr.slice(0, 7)}…${addr.slice(addr.length - 3)}`; +} + +/** + * This a labeler function, which takes event data and describes it in "plain english", + * such that we can display a notification regarding its contents. + */ +export const Label: LabelerFilter = ( + blockNumber: number, + chainId: string, + data: IEventData, + chain?: string +): IEventLabel => { + switch (data.kind) { + case EventKind.ProposalCanceled: { + return { + heading: 'Proposal Canceled', + label: `Proposal ${data.id} was cancelled.`, + linkUrl: chainId + ? `/${chainId}/proposal/onchainproposal/${data.id}` + : null, + }; + } + case EventKind.ProposalCreated: { + return { + heading: 'Proposal Created', + label: `Proposal ${data.id} was created.`, + linkUrl: chainId + ? `/${chainId}/proposal/onchainproposal/${data.id}` + : null, + }; + } + case EventKind.ProposalExecuted: { + return { + heading: 'Proposal Executed', + label: `Proposal ${data.id} was executed.`, + linkUrl: chainId + ? `/${chainId}/proposal/onchainproposal/${data.id}` + : null, + }; + } + case EventKind.ProposalQueued: { + return { + heading: 'Proposal Queued', + label: `Proposal ${data.id} queued up. Execution time: ${moment + .unix(data.executionTime) + .format()}.`, + linkUrl: chainId + ? `/${chainId}/proposal/onchainproposal/${data.id}` + : null, + }; + } + case EventKind.VoteEmitted: { + return { + heading: 'Vote Emitted', + label: `Voter (${data.voter}) voted with weight ${data.votingPower} ${ + data.support ? 'against' : 'for' + } proposal ${data.id}.`, + linkUrl: chainId + ? `/${chainId}/proposal/onchainproposal/${data.id}` + : null, + }; + } + case EventKind.DelegateChanged: { + return { + heading: 'Delegate Changed', + label: `User ${fmtAddr(data.delegator)} delegated to ${fmtAddr( + data.delegatee + )}.`, + linkUrl: chainId ? `/${chainId}/account/${data.delegator}` : null, + }; + } + case EventKind.DelegatedPowerChanged: { + return { + heading: 'Delegated Power Changed', + label: `User ${fmtAddr(data.who)} updated their delegation power.`, + linkUrl: chainId ? `/${chainId}/account/${data.who}` : null, + }; + } + case EventKind.Transfer: { + return { + heading: 'Token Transfer', + label: `Transfer of ${data.amount} tokens from ${data.from} to ${data.to}.`, + }; + } + case EventKind.Approval: { + return { + heading: 'Approval', + label: `${data.spender} approved ${data.amount} to ${data.owner}.`, + }; + } + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = data; + throw new Error( + `[${SupportedNetwork.Aave}${ + chain ? `::${chain}` : '' + }]: Unknown event type!` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/aave/filters/titler.ts b/packages/chain-events/src/chains/aave/filters/titler.ts new file mode 100644 index 00000000000..50ee6b06c6f --- /dev/null +++ b/packages/chain-events/src/chains/aave/filters/titler.ts @@ -0,0 +1,83 @@ +import { + IEventTitle, + SupportedNetwork, + TitlerFilter, +} from '../../../interfaces'; +import { EventKind } from '../types'; + +/** + * This a titler function, not to be confused with the labeler -- it takes a particular + * kind of event, and returns a "plain english" description of that type. This is used + * on the client to present a list of subscriptions that a user might want to subscribe to. + */ +export const Title: TitlerFilter = ( + kind: EventKind, + chain?: string +): IEventTitle => { + switch (kind) { + case EventKind.ProposalCanceled: { + return { + title: 'Proposal cancelled', + description: 'A proposal has been cancelled.', + }; + } + case EventKind.ProposalCreated: { + return { + title: 'Proposal created', + description: 'A proposal has been created.', + }; + } + case EventKind.ProposalExecuted: { + return { + title: 'Proposal executed', + description: 'A proposal has been executed.', + }; + } + case EventKind.ProposalQueued: { + return { + title: 'Proposal queued', + description: 'A proposal has been added to the queue.', + }; + } + case EventKind.VoteEmitted: { + return { + title: 'Vote emitted', + description: 'A new vote has been emitted.', + }; + } + case EventKind.DelegateChanged: { + return { + title: 'Delegate changed', + description: "A user's delegate has been changed.", + }; + } + case EventKind.DelegatedPowerChanged: { + return { + title: 'Delegated power changed', + description: "A user's delegation power has been changed.", + }; + } + case EventKind.Transfer: { + return { + title: 'Token Transfer', + description: 'A user transfers tokens.', + }; + } + case EventKind.Approval: { + return { + title: 'Token Approval', + description: 'A user approves a token spend.', + }; + } + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = kind; + throw new Error( + `[${SupportedNetwork.Aave}${ + chain ? `::${chain}` : '' + }]: Unknown event type` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/aave/filters/type_parser.ts b/packages/chain-events/src/chains/aave/filters/type_parser.ts new file mode 100644 index 00000000000..9c428d6a901 --- /dev/null +++ b/packages/chain-events/src/chains/aave/filters/type_parser.ts @@ -0,0 +1,37 @@ +import { EventKind } from '../types'; +import { addPrefix, factory } from '../../../logging'; +import { SupportedNetwork } from '../../../interfaces'; + +/** + * This is the Type Parser function, which takes a raw Event + * and determines which of our local event kinds it belongs to. + */ +export function ParseType(name: string, chain?: string): EventKind | null { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Aave, chain]) + ); + switch (name) { + case 'ProposalExecuted': + return EventKind.ProposalExecuted; + case 'ProposalCreated': + return EventKind.ProposalCreated; + case 'ProposalCanceled': + return EventKind.ProposalCanceled; + case 'ProposalQueued': + return EventKind.ProposalQueued; + case 'VoteEmitted': + return EventKind.VoteEmitted; + case 'DelegateChanged': + return EventKind.DelegateChanged; + case 'DelegatedPowerChanged': + return EventKind.DelegatedPowerChanged; + case 'Transfer': + return EventKind.Transfer; + case 'Approval': + return EventKind.Approval; + default: { + log.warn(`Unknown event name: ${name}`); + return null; + } + } +} diff --git a/packages/chain-events/src/chains/aave/index.ts b/packages/chain-events/src/chains/aave/index.ts new file mode 100644 index 00000000000..0edfe6e4cdb --- /dev/null +++ b/packages/chain-events/src/chains/aave/index.ts @@ -0,0 +1,11 @@ +export * as Types from './types'; +export * from './subscribeFunc'; +export * from './subscriber'; +export * from './processor'; +export * from './storageFetcher'; +export * from './Listener'; + +export * from './filters/enricher'; +export * from './filters/labeler'; +export * from './filters/titler'; +export * from './filters/type_parser'; diff --git a/packages/chain-events/src/chains/aave/processor.ts b/packages/chain-events/src/chains/aave/processor.ts new file mode 100644 index 00000000000..0c9b533fb09 --- /dev/null +++ b/packages/chain-events/src/chains/aave/processor.ts @@ -0,0 +1,39 @@ +/** + * Processes Aave events. + */ +import { IEventProcessor, CWEvent, SupportedNetwork } from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { ParseType } from './filters/type_parser'; +import { Enrich } from './filters/enricher'; +import { IEventData, RawEvent, Api } from './types'; + +export class Processor extends IEventProcessor { + constructor(protected _api: Api, protected readonly chain?: string) { + super(_api); + } + + /** + * Parse events out of an ethereum block and standardizes their format + * for processing. + * + * @param event + * @returns an array of processed events + */ + public async process(event: RawEvent): Promise[]> { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Aave, this.chain]) + ); + const kind = ParseType(event.event, this.chain); + if (!kind) return []; + try { + const cwEvent = await Enrich(this._api, event.blockNumber, kind, event); + return [cwEvent]; + } catch (e) { + log.error( + `Failed to enrich event. Block number: ${event.blockNumber}, Name/Kind: ${event.event}, Error Message: ${e.message}` + ); + return []; + } + } +} diff --git a/packages/chain-events/src/chains/aave/storageFetcher.ts b/packages/chain-events/src/chains/aave/storageFetcher.ts new file mode 100644 index 00000000000..e528cbef87e --- /dev/null +++ b/packages/chain-events/src/chains/aave/storageFetcher.ts @@ -0,0 +1,233 @@ +import { + CWEvent, + IStorageFetcher, + IDisconnectedRange, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { Enrich } from './filters/enricher'; +import { + EventKind, + Api, + IProposalCreated, + IProposalCanceled, + IProposalQueued, + IProposalExecuted, + IVoteEmitted, +} from './types'; + +type IEntityEventData = + | IProposalCanceled + | IProposalCreated + | IProposalExecuted + | IProposalQueued + | IVoteEmitted; + +export class StorageFetcher extends IStorageFetcher { + protected readonly log; + + protected readonly chain; + + constructor(protected readonly _api: Api, chain?: string) { + super(_api); + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Aave, chain]) + ); + this.chain = chain; + } + + private _currentBlock: number; + + public async fetchOne(id: string): Promise[]> { + this._currentBlock = +(await this._api.governance.provider.getBlockNumber()); + this.log.info(`Current block: ${this._currentBlock}.`); + if (!this._currentBlock) { + this.log.error('Failed to fetch current block! Aborting fetch.'); + return []; + } + + // TODO: can we make this more efficient? + const allProposals = await this.fetch(); + return allProposals.filter((v) => v.data.id === +id); + } + + /** + * Fetches all CW events relating to ChainEntities from chain (or in this case contract), + * by quering available chain/contract storage and reconstructing events. + * + * NOTE: throws on error! Make sure to wrap in try/catch! + * + * @param range Determines the range of blocks to query events within. + */ + public async fetch( + range?: IDisconnectedRange + ): Promise[]> { + this._currentBlock = await this._api.governance.provider.getBlockNumber(); + this.log.info(`Current block: ${this._currentBlock}.`); + if (!this._currentBlock) { + this.log.error('Failed to fetch current block! Aborting fetch.'); + return []; + } + + // populate range fully if not given + if (!range) { + range = { startBlock: 0 }; + } else if (!range.startBlock) { + range.startBlock = 0; + } else if (range.startBlock >= this._currentBlock) { + this.log.error( + `Start block ${range.startBlock} greater than current block ${this._currentBlock}!` + ); + return []; + } + if (!range.endBlock) { + range.endBlock = this._currentBlock; + } + if (range.startBlock >= range.endBlock) { + this.log.error( + `Invalid fetch range: ${range.startBlock}-${range.endBlock}.` + ); + return []; + } + this.log.info( + `Fetching Aave entities for range: ${range.startBlock}-${range.endBlock}.` + ); + + const proposalCreatedEvents = await this._api.governance.queryFilter( + this._api.governance.filters.ProposalCreated( + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null, + null + ), + range.startBlock, + range.endBlock + ); + const createdCwEvents = await Promise.all( + proposalCreatedEvents.map((evt) => { + try { + return Enrich( + this._api, + evt.blockNumber, + EventKind.ProposalCreated, + evt + ) as Promise>; + } catch (e) { + this.log.error( + `Failed to enrich event. Block number: ${evt.blockNumber}, Name/Kind: ${EventKind.ProposalCreated}, Error Message: ${e.message}` + ); + // maintain previous functionality of throwing + throw new Error(e.message); + } + }) + ); + const voteEmittedEvents = await this._api.governance.queryFilter( + this._api.governance.filters.VoteEmitted(null, null, null, null), + range.startBlock, + range.endBlock + ); + const voteCwEvents = await Promise.all( + voteEmittedEvents.map((evt) => { + try { + return Enrich( + this._api, + evt.blockNumber, + EventKind.VoteEmitted, + evt + ) as Promise>; + } catch (e) { + this.log.error( + `Failed to enrich event. Block number: ${evt.blockNumber}, Name/Kind: ${EventKind.VoteEmitted}, Error Message: ${e.message}` + ); + // maintain previous functionality of throwing + throw new Error(e.message); + } + }) + ); + const proposalQueuedEvents = await this._api.governance.queryFilter( + this._api.governance.filters.ProposalQueued(null, null, null), + range.startBlock, + range.endBlock + ); + const queuedCwEvents = await Promise.all( + proposalQueuedEvents.map((evt) => { + try { + return Enrich( + this._api, + evt.blockNumber, + EventKind.ProposalQueued, + evt + ) as Promise>; + } catch (e) { + this.log.error( + `Failed to enrich event. Block number: ${evt.blockNumber}, Name/Kind: ${EventKind.ProposalQueued}, Error Message: ${e.message}` + ); + // maintain previous functionality of throwing + throw new Error(e.message); + } + }) + ); + const proposalCanceledEvents = await this._api.governance.queryFilter( + this._api.governance.filters.ProposalCanceled(null), + range.startBlock, + range.endBlock + ); + const cancelledCwEvents = await Promise.all( + proposalCanceledEvents.map((evt) => { + try { + return Enrich( + this._api, + evt.blockNumber, + EventKind.ProposalCanceled, + evt + ) as Promise>; + } catch (e) { + this.log.error( + `Failed to enrich event. Block number: ${evt.blockNumber}, Name/Kind: ${EventKind.ProposalCanceled}, Error Message: ${e.message}` + ); + // maintain previous functionality of throwing + throw new Error(e.message); + } + }) + ); + const proposalExecutedEvents = await this._api.governance.queryFilter( + this._api.governance.filters.ProposalExecuted(null, null), + range.startBlock, + range.endBlock + ); + const executedCwEvents = await Promise.all( + proposalExecutedEvents.map((evt) => { + try { + return Enrich( + this._api, + evt.blockNumber, + EventKind.ProposalExecuted, + evt + ) as Promise>; + } catch (e) { + this.log.error( + `Failed to enrich event. Block number: ${evt.blockNumber}, Name/Kind: ${EventKind.ProposalExecuted}, Error Message: ${e.message}` + ); + // maintain previous functionality of throwing + throw new Error(e.message); + } + }) + ); + return [ + ...createdCwEvents, + ...voteCwEvents, + ...queuedCwEvents, + ...cancelledCwEvents, + ...executedCwEvents, + ].sort((e1, e2) => e1.blockNumber - e2.blockNumber); + } +} diff --git a/packages/chain-events/src/chains/aave/subscribeFunc.ts b/packages/chain-events/src/chains/aave/subscribeFunc.ts new file mode 100644 index 00000000000..42731cf8ed5 --- /dev/null +++ b/packages/chain-events/src/chains/aave/subscribeFunc.ts @@ -0,0 +1,218 @@ +import sleep from 'sleep-promise'; + +import { createProvider } from '../../eth'; +import { + IDisconnectedRange, + CWEvent, + SubscribeFunc, + ISubscribeOptions, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; +import { + IAaveGovernanceV2__factory as IAaveGovernanceV2Factory, + GovernanceStrategy__factory as GovernanceStrategyFactory, + GovernancePowerDelegationERC20__factory as GovernancePowerDelegationERC20Factory, +} from '../../contractTypes'; + +import { Subscriber } from './subscriber'; +import { Processor } from './processor'; +import { StorageFetcher } from './storageFetcher'; +import { IEventData, RawEvent, Api } from './types'; + +/** + * Attempts to open an API connection, retrying if it cannot be opened. + * @param ethNetworkUrl + * @param governanceAddress + * @param retryTimeMs + * @param chain + * @returns a promise resolving to an ApiPromise once the connection has been established + */ +export async function createApi( + ethNetworkUrl: string, + governanceAddress: string, + retryTimeMs = 10 * 1000, + chain?: string +): Promise { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Aave, chain]) + ); + for (let i = 0; i < 3; ++i) { + try { + const provider = await createProvider( + ethNetworkUrl, + SupportedNetwork.Aave, + chain + ); + + // fetch governance contract + const governanceContract = IAaveGovernanceV2Factory.connect( + governanceAddress, + provider + ); + await governanceContract.deployed(); + + try { + // fetch strategy to get tokens + // TODO: ensure that all governance contracts have a valid strategy + // i.e. with these specific tokens -- we may want to take the token addresses + // directly rather than fetch from the contract. + const strategyAddress = await governanceContract.getGovernanceStrategy(); + const strategy = GovernanceStrategyFactory.connect( + strategyAddress, + provider + ); + await strategy.deployed(); + + // fetch tokens + const aaveTokenAddress = await strategy.AAVE(); + const stkAaveTokenAddress = await strategy.STK_AAVE(); + const aaveToken = GovernancePowerDelegationERC20Factory.connect( + aaveTokenAddress, + provider + ); + const stkAaveToken = GovernancePowerDelegationERC20Factory.connect( + stkAaveTokenAddress, + provider + ); + await aaveToken.deployed(); + await stkAaveToken.deployed(); + + // confirm we the token types are correct + await aaveToken.DELEGATE_TYPEHASH(); + await stkAaveToken.DELEGATE_TYPEHASH(); + + log.info('Connection successful!'); + return { + governance: governanceContract, + aaveToken, + stkAaveToken, + }; + } catch (err) { + log.warn( + 'Governance connection successful but token connections failed.' + ); + log.warn('Delegation events will not be emitted.'); + return { + governance: governanceContract, + }; + } + } catch (err) { + log.error( + `Aave ${governanceAddress} at ${ethNetworkUrl} failure: ${err.message}` + ); + await sleep(retryTimeMs); + log.error('Retrying connection...'); + } + } + + throw new Error( + `[${SupportedNetwork.Aave} ${ + chain ? `::${chain}` : '' + }]: Failed to start Aave listener for ${governanceAddress} at ${ethNetworkUrl}` + ); +} + +/** + * This is the main function for edgeware event handling. It constructs a connection + * to the chain, connects all event-related modules, and initializes event handling. + * @param options + * @returns An active block subscriber. + */ +export const subscribeEvents: SubscribeFunc< + Api, + RawEvent, + ISubscribeOptions +> = async (options) => { + const { + chain, + api, + handlers, + skipCatchup, + discoverReconnectRange, + verbose, + } = options; + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Aave, chain]) + ); + // helper function that sends an event through event handlers + const handleEventFn = async (event: CWEvent): Promise => { + let prevResult = null; + for (const handler of handlers) { + try { + // pass result of last handler into next one (chaining db events) + prevResult = await handler.handle(event, prevResult); + } catch (err) { + log.error(`Event handle failure: ${err.message}`); + break; + } + } + }; + + // helper function that sends a block through the event processor and + // into the event handlers + const processor = new Processor(api); + const processEventFn = async (event: RawEvent): Promise => { + // retrieve events from block + const cwEvents: CWEvent[] = await processor.process(event); + + // process events in sequence + for (const cwEvent of cwEvents) { + await handleEventFn(cwEvent); + } + }; + + const subscriber = new Subscriber(api, chain, verbose); + + // helper function that runs after we've been offline/the server's been down, + // and attempts to fetch skipped events + const pollMissedEventsFn = async (): Promise => { + if (!discoverReconnectRange) { + log.warn( + 'No function to discover offline time found, skipping event catchup.' + ); + return; + } + log.info(`Fetching missed events since last startup of ${chain}...`); + let offlineRange: IDisconnectedRange; + try { + offlineRange = await discoverReconnectRange(); + if (!offlineRange) { + log.warn('No offline range found, skipping event catchup.'); + return; + } + } catch (e) { + log.error( + `Could not discover offline range: ${e.message}. Skipping event catchup.` + ); + return; + } + + const fetcher = new StorageFetcher(api); + try { + const cwEvents = await fetcher.fetch(offlineRange); + + // process events in sequence + for (const cwEvent of cwEvents) { + await handleEventFn(cwEvent); + } + } catch (e) { + log.error(`Unable to fetch events from storage: ${e.message}`); + } + }; + + if (!skipCatchup) { + await pollMissedEventsFn(); + } else { + log.info('Skipping event catchup on startup!'); + } + + try { + log.info(`Subscribing to contracts ${chain}...`); + await subscriber.subscribe(processEventFn); + } catch (e) { + log.error(`Subscription error: ${e.message}`); + } + + return subscriber; +}; diff --git a/packages/chain-events/src/chains/aave/subscriber.ts b/packages/chain-events/src/chains/aave/subscriber.ts new file mode 100644 index 00000000000..e897d3b4140 --- /dev/null +++ b/packages/chain-events/src/chains/aave/subscriber.ts @@ -0,0 +1,53 @@ +/** + * Fetches events from Aave contract in real time. + */ +import { Listener } from '@ethersproject/providers'; + +import { IEventSubscriber, SupportedNetwork } from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { RawEvent, Api } from './types'; + +export class Subscriber extends IEventSubscriber { + private _name: string; + + private _listener: Listener | null; + + protected readonly log; + + constructor(api: Api, name: string, verbose = false) { + super(api, verbose); + this._name = name; + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Aave, this._name]) + ); + } + + /** + * Initializes subscription to chain and starts emitting events. + */ + public async subscribe(cb: (event: RawEvent) => void): Promise { + this._listener = (event: RawEvent): void => { + const logStr = `Received ${this._name} event: ${JSON.stringify( + event, + null, + 2 + )}.`; + // eslint-disable-next-line no-unused-expressions + this._verbose ? this.log.info(logStr) : this.log.trace(logStr); + cb(event); + }; + this._api.governance.on('*', this._listener); + this._api.aaveToken?.on('*', this._listener); + this._api.stkAaveToken?.on('*', this._listener); + } + + public unsubscribe(): void { + if (this._listener) { + this._api.governance.off('*', this._listener); + this._api.aaveToken?.off('*', this._listener); + this._api.stkAaveToken?.off('*', this._listener); + this._listener = null; + } + } +} diff --git a/packages/chain-events/src/chains/aave/types.ts b/packages/chain-events/src/chains/aave/types.ts new file mode 100644 index 00000000000..41a59ec83bc --- /dev/null +++ b/packages/chain-events/src/chains/aave/types.ts @@ -0,0 +1,164 @@ +import { TypedEvent } from '../../contractTypes/commons'; +import { + IAaveGovernanceV2, + IGovernancePowerDelegationToken, +} from '../../contractTypes'; + +// Used to unwrap promises returned by contract functions +type UnPromisify = T extends Promise ? U : T; +export type Proposal = UnPromisify< + ReturnType +>; + +// API is imported contracts classes +interface IAaveContracts { + governance: IAaveGovernanceV2; + + // optional token types for Delegation events + aaveToken?: IGovernancePowerDelegationToken; + stkAaveToken?: IGovernancePowerDelegationToken; +} + +export interface ListenerOptions { + url: string; + govContractAddress: string; + skipCatchup?: boolean; +} + +export type Api = IAaveContracts; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type RawEvent = TypedEvent; + +// eslint-disable-next-line no-shadow +export enum EntityKind { + // eslint-disable-next-line no-shadow + Proposal = 'proposal', +} + +// eslint-disable-next-line no-shadow +export enum EventKind { + // governance + ProposalCanceled = 'proposal-canceled', + ProposalCreated = 'proposal-created', + ProposalExecuted = 'proposal-executed', + ProposalQueued = 'proposal-queued', + VoteEmitted = 'vote-emitted', + + // tokens + DelegateChanged = 'delegate-changed', + DelegatedPowerChanged = 'delegated-power-changed', + Transfer = 'transfer', + Approval = 'approval', +} + +interface IEvent { + kind: EventKind; +} + +type Address = string; +type Balance = string; + +// eslint-disable-next-line no-shadow +export enum ProposalState { + PENDING = 0, + CANCELED = 1, + ACTIVE = 2, + FAILED = 3, + SUCCEEDED = 4, + QUEUED = 5, + EXPIRED = 6, + EXECUTED = 7, +} + +// eslint-disable-next-line no-shadow +export enum DelegationType { + VOTING_POWER = 0, + PROPOSITION_POWER = 1, +} + +// GovernorAlpha Event Interfaces +export interface IProposalCanceled extends IEvent { + kind: EventKind.ProposalCanceled; + id: number; +} + +export interface IProposalCreated extends IEvent { + kind: EventKind.ProposalCreated; + id: number; + proposer: Address; + executor: Address; + targets: Address[]; + values: Balance[]; + signatures: Address[]; + calldatas: string[]; + startBlock: number; + endBlock: number; + strategy: string; + ipfsHash: string; +} + +export interface IProposalExecuted extends IEvent { + kind: EventKind.ProposalExecuted; + id: number; +} + +export interface IProposalQueued extends IEvent { + kind: EventKind.ProposalQueued; + id: number; + executionTime: number; // timestamp +} + +export interface IVoteEmitted extends IEvent { + kind: EventKind.VoteEmitted; + id: number; + voter: Address; + support: boolean; + votingPower: Balance; +} + +export interface IDelegateChanged extends IEvent { + kind: EventKind.DelegateChanged; + tokenAddress: Address; + delegator: Address; + delegatee: Address; + type: DelegationType; +} + +export interface IDelegatedPowerChanged { + kind: EventKind.DelegatedPowerChanged; + tokenAddress: Address; + who: Address; + amount: Balance; + type: DelegationType; +} + +export interface ITransfer { + kind: EventKind.Transfer; + tokenAddress: Address; + from: Address; + to: Address; + amount: Balance; +} + +export interface IApproval { + kind: EventKind.Approval; + tokenAddress: Address; + owner: Address; + spender: Address; + amount: Balance; +} + +export type IEventData = + | IProposalCanceled + | IProposalCreated + | IProposalExecuted + | IProposalQueued + | IVoteEmitted + | IDelegateChanged + | IDelegatedPowerChanged + | ITransfer + | IApproval; +// eslint-disable-next-line semi-style + +export const EventKinds: EventKind[] = Object.values(EventKind); diff --git a/packages/chain-events/src/chains/commonwealth/Listener.ts b/packages/chain-events/src/chains/commonwealth/Listener.ts new file mode 100644 index 00000000000..85efd0b7f28 --- /dev/null +++ b/packages/chain-events/src/chains/commonwealth/Listener.ts @@ -0,0 +1,162 @@ +import { Listener as BaseListener } from '../../Listener'; +import { + CWEvent, + IDisconnectedRange, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { + Api, + EventKind, + IEventData, + ListenerOptions as CommonwealthListenerOptions, + RawEvent, +} from './types'; +import { createApi } from './subscribeFunc'; +import { Subscriber } from './subscriber'; +import { Processor } from './processor'; +import { StorageFetcher } from './storageFetcher'; + +export class Listener extends BaseListener< + Api, + StorageFetcher, + Processor, + Subscriber, + EventKind +> { + private readonly _options: CommonwealthListenerOptions; + + protected readonly log; + + constructor( + chain: string, + contractAddress: string, + url?: string, + skipCatchup?: boolean, + verbose?: boolean, + discoverReconnectRange?: (c: string) => Promise + ) { + super(SupportedNetwork.Commonwealth, chain, verbose); + + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Commonwealth, this._chain]) + ); + + this._options = { + url, + contractAddress, + skipCatchup: !!skipCatchup, + }; + + this.discoverReconnectRange = discoverReconnectRange; + + this._subscribed = false; + } + + public async init(): Promise { + try { + this._api = await createApi( + this._options.url, + this._options.contractAddress, + 10 * 1000, + this._chain + ); + } catch (error) { + this.log.error(`Fatal error occurred while starting the API`); + throw error; + } + + try { + this._processor = new Processor(this._api, this._chain); + this._subscriber = new Subscriber(this._api, this._chain, this._verbose); + this.storageFetcher = new StorageFetcher(this._api, this._chain); + } catch (error) { + this.log.error( + `Fatal error occurred while starting the Processor, StorageFetcher and Subscriber` + ); + throw error; + } + } + + public async subscribe(): Promise { + if (!this._subscriber) { + this.log.info( + `Subscriber for ${this._chain} isn't initialized. Please run init() first!` + ); + return; + } + + if (!this.options.skipCatchup) await this.processMissedBlocks(); + else this.log.info(`Skipping event catchup!`); + + try { + this.log.info( + `Subscribing to Commonwealth factory contract: ${this._chain}, on url ${this._options.url}` + ); + await this._subscriber.subscribe(this.processBlock.bind(this)); + this._subscribed = true; + } catch (error) { + this.log.error(`Subscription error: ${error.message}`); + } + } + + public async updateAddress(): Promise { + // TODO + } + + private async processMissedBlocks(): Promise { + this.log.info(`Detected offline time, polling missed blocks...`); + + if (!this.discoverReconnectRange) { + this.log.info( + `Unable to determine offline range - No discoverReconnectRange function given` + ); + } + + let offlineRange: IDisconnectedRange; + try { + offlineRange = await this.discoverReconnectRange(this._chain); + if (!offlineRange) { + this.log.warn(`No offline range found, skipping event catchup.`); + return; + } + } catch (error) { + this.log.error( + `Could not discover offline range: ${error.message}. Skipping event catchup.` + ); + return; + } + + if (!offlineRange || !offlineRange.startBlock) { + this.log.warn(`Unable to determine offline time range.`); + return; + } + + try { + const cwEvents = await this.storageFetcher.fetch(offlineRange); + for (const event of cwEvents) { + await this.handleEvent(event); + } + } catch (error) { + this.log.error(`Unable to fetch events from storage: ${error.message}`); + } + } + + protected async processBlock(event: RawEvent): Promise { + const { blockNumber } = event; + if (!this._lastBlockNumber || blockNumber > this._lastBlockNumber) { + this._lastBlockNumber = blockNumber; + } + + const cwEvents: CWEvent[] = await this._processor.process(event); + + for (const evt of cwEvents) { + await this.handleEvent(evt as CWEvent); + } + } + + public get options(): CommonwealthListenerOptions { + return this._options; + } +} diff --git a/packages/chain-events/src/chains/commonwealth/filters/enricher.ts b/packages/chain-events/src/chains/commonwealth/filters/enricher.ts new file mode 100644 index 00000000000..0d71a0c2907 --- /dev/null +++ b/packages/chain-events/src/chains/commonwealth/filters/enricher.ts @@ -0,0 +1,169 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { hexToAscii } from 'web3-utils'; + +import { TypedEventFilter } from '../../../contractTypes/commons'; +import { + ICuratedProjectFactory, + ICuratedProject, + // eslint-disable-next-line camelcase + ICuratedProject__factory, +} from '../../../contractTypes'; +import { CWEvent, SupportedNetwork } from '../../../interfaces'; +import { EventKind, RawEvent, IEventData, Api } from '../types'; + +type GetEventArgs = T extends TypedEventFilter ? Y : never; + +type GetArgType< + Name extends keyof ICuratedProjectFactory['filters'] +> = GetEventArgs>; + +type GetProjectArgType< + Name extends keyof ICuratedProject['filters'] +> = GetEventArgs>; + +export async function Enrich( + api: Api, + blockNumber: number, + kind: EventKind, + rawData: RawEvent +): Promise> { + switch (kind) { + case EventKind.ProjectCreated: { + const { projectIndex, projectAddress } = rawData.args as GetArgType< + 'ProjectCreated' + >; + const projectContract = ICuratedProject__factory.connect( + projectAddress, + api.factory.provider + ); + const { + id, + name, + ipfsHash, + url, + creator, + } = await projectContract.metaData(); + const { + threshold, + deadline, + beneficiary, + acceptedToken, + } = await projectContract.projectData(); + const curatorFee = await projectContract.curatorFee(); + const fundingAmount = await projectContract.totalFunding(); + return { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Commonwealth, + data: { + kind, + id: projectAddress, + index: projectIndex.toString(), + name: hexToAscii(name).replace(/\0/g, ''), + ipfsHash: hexToAscii(ipfsHash).replace(/\0/g, ''), + cwUrl: hexToAscii(url).replace(/\0/g, ''), + creator, + beneficiary, + acceptedToken, + curatorFee: curatorFee.toString(), + threshold: threshold.toString(), + deadline: +deadline, + fundingAmount: fundingAmount.toString(), + }, + }; + } + case EventKind.ProjectBacked: { + const { sender, token, amount } = rawData.args as GetProjectArgType< + 'Back' + >; + + return { + blockNumber, + excludeAddresses: [sender], + network: SupportedNetwork.Commonwealth, + data: { + kind, + id: rawData.address, + sender, + token, + amount: amount.toString(), + }, + }; + } + case EventKind.ProjectCurated: { + const { sender, token, amount } = rawData.args as GetProjectArgType< + 'Curate' + >; + return { + blockNumber, + excludeAddresses: [sender], + network: SupportedNetwork.Commonwealth, + data: { + kind, + id: rawData.address, + sender, + token, + amount: amount.toString(), + }, + }; + } + case EventKind.ProjectSucceeded: { + const { timestamp, amount } = rawData.args as GetProjectArgType< + 'Succeeded' + >; + return { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Commonwealth, + data: { + kind, + id: rawData.address, + timestamp: timestamp.toString(), + amount: amount.toString(), + }, + }; + } + case EventKind.ProjectFailed: { + // no arg data on failure + return { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Commonwealth, + data: { + kind, + id: rawData.address, + }, + }; + } + case EventKind.ProjectWithdraw: { + const { + sender, + token, + amount, + withdrawalType, + } = rawData.args as GetProjectArgType<'Withdraw'>; + return { + blockNumber, + excludeAddresses: [sender], + network: SupportedNetwork.Commonwealth, + data: { + kind, + id: rawData.address, + sender, + token, + amount: amount.toString(), + withdrawalType: hexToAscii(withdrawalType).replace(/\0/g, ''), + }, + }; + } + default: { + throw new Error(`Unknown event kind: ${kind}`); + } + } + + return { + blockNumber: null, + network: SupportedNetwork.Commonwealth, + data: null, + }; +} diff --git a/packages/chain-events/src/chains/commonwealth/filters/labeler.ts b/packages/chain-events/src/chains/commonwealth/filters/labeler.ts new file mode 100644 index 00000000000..fb6aacfcdaf --- /dev/null +++ b/packages/chain-events/src/chains/commonwealth/filters/labeler.ts @@ -0,0 +1,78 @@ +import moment from 'moment'; + +import { + LabelerFilter, + IEventLabel, + SupportedNetwork, +} from '../../../interfaces'; +import { IEventData, EventKind } from '../types'; + +function fmtAddr(addr: string) { + if (!addr) return ''; + if (addr.length < 16) return addr; + return `${addr.slice(0, 7)}…${addr.slice(addr.length - 3)}`; +} + +/** + * This a labeler function, which takes event data and describes it in "plain english", + * such that we can display a notification regarding its contents. + */ +export const Label: LabelerFilter = ( + blockNumber: number, + chainId: string, + data: IEventData, + chain?: string +): IEventLabel => { + switch (data.kind) { + // TODO: snag link URLs from Created + // TODO: improve these + case EventKind.ProjectCreated: { + return { + heading: 'Project Created', + label: `Project "${data.name}" was created.`, + }; + } + case EventKind.ProjectBacked: { + return { + heading: 'Project Backed', + label: `Project backed by ${fmtAddr(data.sender)}.`, + }; + } + case EventKind.ProjectCurated: { + return { + heading: 'Project Curated', + label: `Project curated by ${fmtAddr(data.sender)}.`, + }; + } + case EventKind.ProjectSucceeded: { + return { + heading: 'Project Succeeded', + label: `Project ${fmtAddr(data.id)} succeeded!.`, + }; + } + case EventKind.ProjectFailed: { + return { + heading: 'Project Failed', + label: `Project ${fmtAddr(data.id)} failed.`, + }; + } + case EventKind.ProjectWithdraw: { + return { + heading: 'Project Withdraw', + label: `Project withdrawal by ${fmtAddr(data.sender)}, for reason: "${ + data.withdrawalType + }"`, + }; + } + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = data; + throw new Error( + `[${SupportedNetwork.Commonwealth}${ + chain ? `::${chain}` : '' + }]: Unknown event type!` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/commonwealth/filters/titler.ts b/packages/chain-events/src/chains/commonwealth/filters/titler.ts new file mode 100644 index 00000000000..979b02039db --- /dev/null +++ b/packages/chain-events/src/chains/commonwealth/filters/titler.ts @@ -0,0 +1,65 @@ +import { + IEventTitle, + SupportedNetwork, + TitlerFilter, +} from '../../../interfaces'; +import { EventKind } from '../types'; + +/** + * This a titler function, not to be confused with the labeler -- it takes a particular + * kind of event, and returns a "plain english" description of that type. This is used + * on the client to present a list of subscriptions that a user might want to subscribe to. + */ +export const Title: TitlerFilter = ( + kind: EventKind, + chain?: string +): IEventTitle => { + switch (kind) { + case EventKind.ProjectCreated: { + return { + title: 'Project created', + description: 'A new project has been created.', + }; + } + case EventKind.ProjectBacked: { + return { + title: 'Project backed', + description: 'A project has been backed.', + }; + } + case EventKind.ProjectCurated: { + return { + title: 'Project curated', + description: 'A project has been curated.', + }; + } + case EventKind.ProjectSucceeded: { + return { + title: 'Project succeeded', + description: 'A project succeeds at meeting funding threshold.', + }; + } + case EventKind.ProjectFailed: { + return { + title: 'Project failed', + description: 'A project fails to meet funding threshold.', + }; + } + case EventKind.ProjectWithdraw: { + return { + title: 'Project withdraw', + description: 'A project has been withdrawn from.', + }; + } + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = kind; + throw new Error( + `[${SupportedNetwork.Commonwealth}${ + chain ? `::${chain}` : '' + }]: Unknown event type` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/commonwealth/filters/type_parser.ts b/packages/chain-events/src/chains/commonwealth/filters/type_parser.ts new file mode 100644 index 00000000000..503822a60d3 --- /dev/null +++ b/packages/chain-events/src/chains/commonwealth/filters/type_parser.ts @@ -0,0 +1,31 @@ +import { EventKind } from '../types'; +import { addPrefix, factory } from '../../../logging'; +import { SupportedNetwork } from '../../../interfaces'; + +/** + * This is the Type Parser function, which takes a raw Event + * and determines which of our local event kinds it belongs to. + */ +export function ParseType(name: string, chain?: string): EventKind | null { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Commonwealth, chain]) + ); + switch (name) { + case 'ProjectCreated': + return EventKind.ProjectCreated; + case 'Back': + return EventKind.ProjectBacked; + case 'Curate': + return EventKind.ProjectCurated; + case 'Succeeded': + return EventKind.ProjectSucceeded; + case 'Failed': + return EventKind.ProjectFailed; + case 'Withdraw': + return EventKind.ProjectWithdraw; + default: { + log.warn(`Unknown event name: ${name}`); + return null; + } + } +} diff --git a/packages/chain-events/src/chains/commonwealth/index.ts b/packages/chain-events/src/chains/commonwealth/index.ts new file mode 100644 index 00000000000..0edfe6e4cdb --- /dev/null +++ b/packages/chain-events/src/chains/commonwealth/index.ts @@ -0,0 +1,11 @@ +export * as Types from './types'; +export * from './subscribeFunc'; +export * from './subscriber'; +export * from './processor'; +export * from './storageFetcher'; +export * from './Listener'; + +export * from './filters/enricher'; +export * from './filters/labeler'; +export * from './filters/titler'; +export * from './filters/type_parser'; diff --git a/packages/chain-events/src/chains/commonwealth/processor.ts b/packages/chain-events/src/chains/commonwealth/processor.ts new file mode 100644 index 00000000000..9abbd4f2fd6 --- /dev/null +++ b/packages/chain-events/src/chains/commonwealth/processor.ts @@ -0,0 +1,39 @@ +/** + * Processes Commonwealth events. + */ +import { IEventProcessor, CWEvent, SupportedNetwork } from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { ParseType } from './filters/type_parser'; +import { Enrich } from './filters/enricher'; +import { IEventData, RawEvent, Api } from './types'; + +export class Processor extends IEventProcessor { + constructor(protected _api: Api, protected readonly chain?: string) { + super(_api); + } + + /** + * Parse events out of an ethereum block and standardizes their format + * for processing. + * + * @param event + * @returns an array of processed events + */ + public async process(event: RawEvent): Promise[]> { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Commonwealth, this.chain]) + ); + const kind = ParseType(event.event, this.chain); + if (!kind) return []; + try { + const cwEvent = await Enrich(this._api, event.blockNumber, kind, event); + return [cwEvent]; + } catch (e) { + log.error( + `Failed to enrich event. Block number: ${event.blockNumber}, Name/Kind: ${event.event}, Error Message: ${e.message}` + ); + return []; + } + } +} diff --git a/packages/chain-events/src/chains/commonwealth/storageFetcher.ts b/packages/chain-events/src/chains/commonwealth/storageFetcher.ts new file mode 100644 index 00000000000..d144d4c7250 --- /dev/null +++ b/packages/chain-events/src/chains/commonwealth/storageFetcher.ts @@ -0,0 +1,185 @@ +import { + CWEvent, + IStorageFetcher, + IDisconnectedRange, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { Enrich } from './filters/enricher'; +import { + EventKind, + Api, + IProjectCreated, + IProjectCurated, + IProjectBacked, + IProjectFailed, + IProjectSucceeded, + IProjectWithdraw, + RawEvent, +} from './types'; + +type IEntityEventData = + | IProjectCreated + | IProjectCurated + | IProjectBacked + | IProjectFailed + | IProjectSucceeded + | IProjectWithdraw; + +export class StorageFetcher extends IStorageFetcher { + protected readonly log; + + protected readonly chain; + + constructor(protected readonly _api: Api, chain?: string) { + super(_api); + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Commonwealth, chain]) + ); + this.chain = chain; + } + + private _currentBlock: number; + + public async fetchOne(id: string): Promise[]> { + this._currentBlock = +(await this._api.factory.provider.getBlockNumber()); + this.log.info(`Current block: ${this._currentBlock}.`); + if (!this._currentBlock) { + this.log.error('Failed to fetch current block! Aborting fetch.'); + return []; + } + + // TODO: can we make this more efficient? + const allProposals = await this.fetch(); + return allProposals.filter((v) => v.data.id === id); + } + + /** + * Fetches all CW events relating to ChainEntities from chain (or in this case contract), + * by quering available chain/contract storage and reconstructing events. + * + * NOTE: throws on error! Make sure to wrap in try/catch! + * + * @param range Determines the range of blocks to query events within. + */ + public async fetch( + range?: IDisconnectedRange + ): Promise[]> { + this._currentBlock = await this._api.factory.provider.getBlockNumber(); + this.log.info(`Current block: ${this._currentBlock}.`); + if (!this._currentBlock) { + this.log.error('Failed to fetch current block! Aborting fetch.'); + return []; + } + + // populate range fully if not given + if (!range) { + range = { startBlock: 0 }; + } else if (!range.startBlock) { + range.startBlock = 0; + } else if (range.startBlock >= this._currentBlock) { + this.log.error( + `Start block ${range.startBlock} greater than current block ${this._currentBlock}!` + ); + return []; + } + if (!range.endBlock) { + range.endBlock = this._currentBlock; + } + if (range.startBlock >= range.endBlock) { + this.log.error( + `Invalid fetch range: ${range.startBlock}-${range.endBlock}.` + ); + return []; + } + this.log.info( + `Fetching Commonwealth entities for range: ${range.startBlock}-${range.endBlock}.` + ); + + const fetchEvents = async ( + filterCall: () => Promise, + eventKind: EventKind + ): Promise[]> => { + const events = await filterCall(); + return Promise.all( + events.map((evt) => { + try { + return Enrich( + this._api, + evt.blockNumber, + eventKind, + evt + ) as Promise>; + } catch (e) { + this.log.error( + `Failed to enrich event. Block number: ${evt.blockNumber}, Name/Kind: ${eventKind}, Error Message: ${e.message}` + ); + // maintain previous functionality of throwing + throw new Error(e.message); + } + }) + ); + }; + + // fetch factory events + const projectCreatedEvents = await fetchEvents(() => { + return this._api.factory.queryFilter( + this._api.factory.filters.ProjectCreated(null, null), + range.startBlock, + range.endBlock + ); + }, EventKind.ProjectCreated); + + // fetch events on individual projects + const projectEvents = []; + for (const project of this._api.projects) { + const backedEvents = await fetchEvents(() => { + return project.project.queryFilter( + project.project.filters.Back(null, null, null), + range.startBlock, + range.endBlock + ); + }, EventKind.ProjectBacked); + const curateEvents = await fetchEvents(() => { + return project.project.queryFilter( + project.project.filters.Curate(null, null, null), + range.startBlock, + range.endBlock + ); + }, EventKind.ProjectCurated); + const successEvents = await fetchEvents(() => { + return project.project.queryFilter( + project.project.filters.Succeeded(null, null), + range.startBlock, + range.endBlock + ); + }, EventKind.ProjectSucceeded); + const failureEvents = await fetchEvents(() => { + return project.project.queryFilter( + project.project.filters.Failed(), + range.startBlock, + range.endBlock + ); + }, EventKind.ProjectFailed); + const withdrawEvents = await fetchEvents(() => { + return project.project.queryFilter( + project.project.filters.Withdraw(null, null, null, null), + range.startBlock, + range.endBlock + ); + }, EventKind.ProjectWithdraw); + projectEvents.push( + ...backedEvents, + ...curateEvents, + ...successEvents, + ...failureEvents, + ...withdrawEvents + ); + } + + return [...projectCreatedEvents, ...projectEvents].sort( + (e1, e2) => e1.blockNumber - e2.blockNumber + ); + } +} diff --git a/packages/chain-events/src/chains/commonwealth/subscribeFunc.ts b/packages/chain-events/src/chains/commonwealth/subscribeFunc.ts new file mode 100644 index 00000000000..d3969db8914 --- /dev/null +++ b/packages/chain-events/src/chains/commonwealth/subscribeFunc.ts @@ -0,0 +1,193 @@ +import sleep from 'sleep-promise'; + +import { createProvider } from '../../eth'; +import { + IDisconnectedRange, + CWEvent, + SubscribeFunc, + ISubscribeOptions, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; +import { IProjectBaseFactory__factory as IProjectBaseFactoryFactory } from '../../contractTypes'; + +import { Subscriber, constructProjectApi } from './subscriber'; +import { Processor } from './processor'; +import { StorageFetcher } from './storageFetcher'; +import { IEventData, RawEvent, Api } from './types'; + +/** + * Attempts to open an API connection, retrying if it cannot be opened. + * @param ethNetworkUrl + * @param governanceAddress + * @param retryTimeMs + * @param chain + * @returns a promise resolving to an ApiPromise once the connection has been established + */ +export async function createApi( + ethNetworkUrl: string, + factoryAddress: string, + retryTimeMs = 10 * 1000, + chain?: string +): Promise { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Commonwealth, chain]) + ); + const api: Api = { factory: null, projects: [] }; + for (let i = 0; i < 3; ++i) { + try { + const provider = await createProvider( + ethNetworkUrl, + SupportedNetwork.Commonwealth, + chain + ); + + api.factory = IProjectBaseFactoryFactory.connect( + factoryAddress, + provider + ); + await api.factory.deployed(); + + // create subscriptions for all existing projects + const nProjects = await api.factory.numProjects(); + for (let projectN = 1; projectN <= nProjects; projectN++) { + const projectAddress = await api.factory.projects(projectN); + const project = await constructProjectApi(api.factory, projectAddress); + api.projects.push(project); + /* + Do not subscribe to tokens for time being + + project.bToken.on( + '*', + this._listener.bind(this, project.bToken.address, ContractType.bToken) + ); + if (project.cToken && project.isCurated) { + project.cToken.on( + '*', + this._listener.bind(this, project.cToken.address, ContractType.cToken) + ); + } + */ + } + + log.info('Connection successful!'); + return api; + } catch (err) { + log.error( + `Commonwealth ${factoryAddress} at ${ethNetworkUrl} failure: ${err.message}` + ); + await sleep(retryTimeMs); + log.error('Retrying connection...'); + } + } + + throw new Error( + `[${SupportedNetwork.Commonwealth} ${ + chain ? `::${chain}` : '' + }]: Failed to start Commonwealth listener for ${factoryAddress} at ${ethNetworkUrl}` + ); +} + +/** + * This is the main function for edgeware event handling. It constructs a connection + * to the chain, connects all event-related modules, and initializes event handling. + * @param options + * @returns An active block subscriber. + */ +export const subscribeEvents: SubscribeFunc< + Api, + RawEvent, + ISubscribeOptions +> = async (options) => { + const { + chain, + api, + handlers, + skipCatchup, + discoverReconnectRange, + verbose, + } = options; + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Commonwealth, chain]) + ); + // helper function that sends an event through event handlers + const handleEventFn = async (event: CWEvent): Promise => { + let prevResult = null; + for (const handler of handlers) { + try { + // pass result of last handler into next one (chaining db events) + prevResult = await handler.handle(event, prevResult); + } catch (err) { + log.error(`Event handle failure: ${err.message}`); + break; + } + } + }; + + // helper function that sends a block through the event processor and + // into the event handlers + const processor = new Processor(api); + const processEventFn = async (event: RawEvent): Promise => { + // retrieve events from block + const cwEvents: CWEvent[] = await processor.process(event); + + // process events in sequence + for (const cwEvent of cwEvents) { + await handleEventFn(cwEvent); + } + }; + + const subscriber = new Subscriber(api, chain, verbose); + + // helper function that runs after we've been offline/the server's been down, + // and attempts to fetch skipped events + const pollMissedEventsFn = async (): Promise => { + if (!discoverReconnectRange) { + log.warn( + 'No function to discover offline time found, skipping event catchup.' + ); + return; + } + log.info(`Fetching missed events since last startup of ${chain}...`); + let offlineRange: IDisconnectedRange; + try { + offlineRange = await discoverReconnectRange(); + if (!offlineRange) { + log.warn('No offline range found, skipping event catchup.'); + return; + } + } catch (e) { + log.error( + `Could not discover offline range: ${e.message}. Skipping event catchup.` + ); + return; + } + + const fetcher = new StorageFetcher(api); + try { + const cwEvents = await fetcher.fetch(offlineRange); + + // process events in sequence + for (const cwEvent of cwEvents) { + await handleEventFn(cwEvent); + } + } catch (e) { + log.error(`Unable to fetch events from storage: ${e.message}`); + } + }; + + if (!skipCatchup) { + await pollMissedEventsFn(); + } else { + log.info('Skipping event catchup on startup!'); + } + + try { + log.info(`Subscribing to contracts ${chain}...`); + await subscriber.subscribe(processEventFn); + } catch (e) { + log.error(`Subscription error: ${e.message}`); + } + + return subscriber; +}; diff --git a/packages/chain-events/src/chains/commonwealth/subscriber.ts b/packages/chain-events/src/chains/commonwealth/subscriber.ts new file mode 100644 index 00000000000..eb37b2be014 --- /dev/null +++ b/packages/chain-events/src/chains/commonwealth/subscriber.ts @@ -0,0 +1,159 @@ +/* eslint-disable camelcase */ +/** + * Fetches events from ERC20 contract in real time. + */ +import { Listener } from '@ethersproject/providers'; + +import { + ICuratedProject__factory, + // IERC20__factory, + IProjectBaseFactory, +} from '../../contractTypes'; +import { IEventSubscriber, SupportedNetwork } from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { RawEvent, Api, ProjectApi, ContractType } from './types'; + +export async function constructProjectApi( + projectFactory: IProjectBaseFactory, + address: string +): Promise { + const api: ProjectApi = { + project: ICuratedProject__factory.connect(address, projectFactory.provider), + bToken: null, // TODO: populate + cToken: null, + isCurated: null, + }; + await api.project.deployed(); + + /* + Do not subscribe to tokens, for the time being + + // construct bToken (always available) + const bTokenAddress = await api.project.bToken(); + api.bToken = IERC20__factory.connect( + bTokenAddress, + projectFactory.provider + ); + + // discover curation status + try { + const cTokenAddress = await api.project.cToken(); + api.cToken = IERC20__factory.connect( + cTokenAddress, + projectFactory.provider + ); + api.isCurated = true; + } catch (e) { + api.isCurated = false; + } + */ + return api; +} + +export class Subscriber extends IEventSubscriber { + private _name: string; + + private _listener: Listener | null; + + constructor(api: Api, name: string, verbose = false) { + super(api, verbose); + this._name = name; + } + + /** + * Initializes subscription to chain and starts emitting events. + */ + public async subscribe( + cb: (event: RawEvent, contractAddress?: string) => void + ): Promise { + this._listener = ( + contractAddress: string, + contractType: ContractType, + event: RawEvent + ): void => { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Commonwealth, contractAddress]) + ); + const logStr = `Received ${this._name} event: ${JSON.stringify( + event, + null, + 2 + )}.`; + // eslint-disable-next-line no-unused-expressions + this._verbose ? log.info(logStr) : log.trace(logStr); + + if ( + contractType === ContractType.Factory && + event.event === 'ProjectCreated' + ) { + // factories only emit create events, which require us to produce a new subscription + const newProjectAddress: string = event.args[1]; + constructProjectApi(this._api.factory, newProjectAddress).then( + (project) => { + this._api.projects.push(project); + project.project.on( + '*', + this._listener.bind( + this, + project.project.address, + ContractType.Project + ) + ); + + /* + Do not subscribe to tokens, for time being + + project.bToken.on( + '*', + this._listener.bind( + this, + project.bToken.address, + ContractType.bToken + ) + ); + if (project.cToken && project.isCurated) { + project.cToken.on( + '*', + this._listener.bind( + this, + project.cToken.address, + ContractType.cToken + ) + ); + } + */ + } + ); + } + cb(event, contractAddress); + }; + + // create subscription for factory + this._api.factory.on('*', (args) => + this._listener(this._api.factory.address, ContractType.Factory, args) + ); + + // create subscriptions for all projects + for (const project of this._api.projects) { + project.project.on('*', (args) => + this._listener(project.project.address, ContractType.Project, args) + ); + } + } + + public unsubscribe(): void { + if (this._listener) { + this._api.projects.forEach( + ({ project /* , cToken, bToken, isCurated */ }) => { + project.removeAllListeners(); + // bToken.removeAllListeners(); + // if (cToken && isCurated) cToken.removeAllListeners(); + } + ); + this._api.projects = []; + this._api.factory.removeAllListeners(); + this._listener = null; + } + } +} diff --git a/packages/chain-events/src/chains/commonwealth/types.ts b/packages/chain-events/src/chains/commonwealth/types.ts new file mode 100644 index 00000000000..9bf0f4d57a4 --- /dev/null +++ b/packages/chain-events/src/chains/commonwealth/types.ts @@ -0,0 +1,125 @@ +/* eslint-disable no-shadow */ +import { + IProjectBaseFactory, + ICuratedProject, + IERC20, +} from '../../contractTypes'; +import { TypedEvent } from '../../contractTypes/commons'; + +// options for the listener class +export interface ListenerOptions { + url: string; + skipCatchup: boolean; + contractAddress: string; +} + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type RawEvent = TypedEvent; + +export enum ContractType { + Factory, + Project, + cToken, + bToken, +} + +export type ProjectApi = { + project: ICuratedProject; + isCurated: boolean; + bToken: IERC20; + cToken?: IERC20; +}; + +export type Api = { + factory: IProjectBaseFactory; + projects: ProjectApi[]; +}; + +// eslint-disable-next-line no-shadow +export enum EntityKind { + // eslint-disable-next-line no-shadow + Project = 'project', +} + +export enum EventKind { + ProjectCreated = 'project-created', + ProjectBacked = 'project-backed', + ProjectCurated = 'project-curated', + ProjectSucceeded = 'project-succeeded', + ProjectFailed = 'project-failed', + ProjectWithdraw = 'project-withdraw', +} + +interface IEvent { + kind: EventKind; +} + +type Address = string; +type Balance = string; // queried as BigNumber + +export interface IProjectCreated extends IEvent { + kind: EventKind.ProjectCreated; + id: Address; + index: string; // BN + + // metadata + name: string; + ipfsHash: string; + cwUrl: string; + creator: Address; + + // contract init info + beneficiary: Address; + acceptedToken: Address; + curatorFee: Balance; + threshold: Balance; + deadline: number; + fundingAmount: Balance; +} + +export interface IProjectBacked extends IEvent { + kind: EventKind.ProjectBacked; + id: Address; + sender: Address; + token: Address; + amount: Balance; +} + +export interface IProjectCurated extends IEvent { + kind: EventKind.ProjectCurated; + id: Address; + sender: Address; + token: Address; + amount: Balance; +} + +export interface IProjectSucceeded extends IEvent { + kind: EventKind.ProjectSucceeded; + id: Address; + timestamp: string; // BN + amount: Balance; +} + +export interface IProjectFailed extends IEvent { + kind: EventKind.ProjectFailed; + id: Address; +} + +export interface IProjectWithdraw extends IEvent { + kind: EventKind.ProjectWithdraw; + id: Address; + sender: Address; + token: Address; + amount: Balance; + withdrawalType: string; // plaintext +} + +export type IEventData = + | IProjectCreated + | IProjectBacked + | IProjectCurated + | IProjectSucceeded + | IProjectFailed + | IProjectWithdraw; + +export const EventKinds: EventKind[] = Object.values(EventKind); diff --git a/packages/chain-events/src/chains/compound/Listener.ts b/packages/chain-events/src/chains/compound/Listener.ts new file mode 100644 index 00000000000..836a54a8a82 --- /dev/null +++ b/packages/chain-events/src/chains/compound/Listener.ts @@ -0,0 +1,198 @@ +import { + CWEvent, + IDisconnectedRange, + SupportedNetwork, +} from '../../interfaces'; +import { Listener as BaseListener } from '../../Listener'; +import { addPrefix, factory } from '../../logging'; + +import { + Api, + EventKind, + IEventData, + ListenerOptions as CompoundListenerOptions, + RawEvent, +} from './types'; +import { createApi } from './subscribeFunc'; +import { Processor } from './processor'; +import { StorageFetcher } from './storageFetcher'; +import { Subscriber } from './subscriber'; + +export class Listener extends BaseListener< + Api, + StorageFetcher, + Processor, + Subscriber, + EventKind +> { + private readonly _options: CompoundListenerOptions; + + protected readonly log; + + constructor( + chain: string, + contractAddress: string, + url?: string, + skipCatchup?: boolean, + verbose?: boolean, + discoverReconnectRange?: (c: string) => Promise + ) { + super(SupportedNetwork.Compound, chain, verbose); + + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Compound, this._chain]) + ); + + this._options = { + url, + skipCatchup: !!skipCatchup, + contractAddress, + }; + + this._subscribed = false; + this.discoverReconnectRange = discoverReconnectRange; + } + + public async init(): Promise { + try { + this._api = await createApi( + this._options.url, + this._options.contractAddress, + 10 * 1000, + this._chain + ); + } catch (error) { + this.log.error(`Fatal error occurred while starting the API`); + throw error; + } + + try { + this._processor = new Processor(this._api, this._chain); + this._subscriber = await new Subscriber( + this._api, + this._chain, + this._verbose + ); + } catch (error) { + this.log.error( + `Fatal error occurred while starting the Processor, and Subscriber` + ); + throw error; + } + + try { + this.storageFetcher = new StorageFetcher(this._api, this._chain); + } catch (error) { + this.log.error( + `Fatal error occurred while starting the Ethereum dater and storage fetcher` + ); + throw error; + } + } + + public async subscribe(): Promise { + if (!this._subscriber) { + this.log.info( + `Subscriber for ${this._chain} isn't initialized. Please run init() first!` + ); + return; + } + + // processed blocks missed during downtime + if (!this._options.skipCatchup) await this.processMissedBlocks(); + else this.log.info(`Skipping event catchup on startup!`); + + try { + this.log.info( + `Subscribing to Compound contract: ${this._chain}, on url ${this._options.url}` + ); + await this._subscriber.subscribe(this.processBlock.bind(this)); + this._subscribed = true; + } catch (error) { + this.log.error(`Subscription error: ${error.message}`); + } + } + + public async updateContractAddress(address: string): Promise { + if (address === this._options.contractAddress) { + this.log.warn(`The contract address is already set to ${address}`); + return; + } + this._options.contractAddress = address; + + await this.init(); + if (this._subscribed === true) await this.subscribe(); + } + + protected async processBlock(event: RawEvent): Promise { + const { blockNumber } = event; + if (!this._lastBlockNumber || blockNumber > this._lastBlockNumber) { + this._lastBlockNumber = blockNumber; + } + + const cwEvents: CWEvent[] = await this._processor.process(event); + + // process events in sequence + for (const evt of cwEvents) + await this.handleEvent(evt as CWEvent); + } + + private async processMissedBlocks(): Promise { + this.log.info(`Detected offline time, polling missed blocks...`); + + if (!this.discoverReconnectRange) { + this.log.info( + `Unable to determine offline range - No discoverReconnectRange function given` + ); + return; + } + + let offlineRange: IDisconnectedRange; + try { + // fetch the block of the last server event from database + offlineRange = await this.discoverReconnectRange(this._chain); + if (!offlineRange) { + this.log.warn('No offline range found, skipping event catchup.'); + return; + } + } catch (error) { + this.log.error( + `Could not discover offline range: ${error.message}. Skipping event catchup.` + ); + return; + } + + // compare with default range algorithm: take last cached block in processor + // if it exists, and is more recent than the provided algorithm + // (note that on first run, we wont have a cached block/this wont do anything) + if ( + this._lastBlockNumber && + (!offlineRange || + !offlineRange.startBlock || + offlineRange.startBlock < this._lastBlockNumber) + ) { + offlineRange = { startBlock: this._lastBlockNumber }; + } + + // if we can't figure out when the last block we saw was, + // do nothing + // (i.e. don't try and fetch all events from block 0 onward) + if (!offlineRange || !offlineRange.startBlock) { + this.log.warn(`Unable to determine offline time range.`); + return; + } + + try { + const cwEvents = await this.storageFetcher.fetch(offlineRange); + for (const event of cwEvents) { + await this.handleEvent(event as CWEvent); + } + } catch (error) { + this.log.error(`Unable to fetch events from storage: ${error.message}`); + } + } + + public get options(): CompoundListenerOptions { + return this._options; + } +} diff --git a/packages/chain-events/src/chains/compound/filters/enricher.ts b/packages/chain-events/src/chains/compound/filters/enricher.ts new file mode 100644 index 00000000000..a2527dcce61 --- /dev/null +++ b/packages/chain-events/src/chains/compound/filters/enricher.ts @@ -0,0 +1,147 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { Contract, utils } from 'ethers'; + +import { GovernorCompatibilityBravo } from '../../../contractTypes'; +import { TypedEventFilter } from '../../../contractTypes/commons'; +import { CWEvent, SupportedNetwork } from '../../../interfaces'; +import { EventKind, RawEvent, IEventData, Api } from '../types'; + +type GetEventArgs = T extends TypedEventFilter ? Y : never; +type GetArgType< + C extends Contract, + Name extends keyof C['filters'] +> = GetEventArgs>; + +export async function Enrich( + api: Api, + blockNumber: number, + kind: EventKind, + rawData: RawEvent +): Promise> { + switch (kind) { + case EventKind.ProposalCanceled: { + const [id] = rawData.args as GetArgType< + GovernorCompatibilityBravo, + 'ProposalCanceled' + >; + return { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Compound, + data: { + kind, + id: id.toHexString(), + }, + }; + } + case EventKind.ProposalCreated: { + // workaround to switch description decoding to "bytes" in order to + // avoid unicode decoding errors involving invalid codepoints + // to reproduce: try the uniswap governor alpha + // also works around the "results" field being unqueryable using the TypedEvent + const result = utils.defaultAbiCoder.decode( + [ + 'uint', + 'address', + 'address[]', + 'uint[]', + 'string[]', + 'bytes[]', + 'uint', + 'uint', + 'bytes', + ], + rawData.data + ); + const [ + id, + proposer, + targets, + values, + signatures, + calldatas, + startBlock, + endBlock, + descriptionBytes, + ] = result; + const description = utils.toUtf8String( + descriptionBytes, + utils.Utf8ErrorFuncs.ignore + ); + + return { + blockNumber, + excludeAddresses: [proposer], + network: SupportedNetwork.Compound, + data: { + kind, + id: id.toHexString(), + proposer, + targets, + values: values.map((v) => v.toString()), + signatures, + calldatas: calldatas.map((c) => utils.hexlify(c)), + startBlock: +startBlock, + endBlock: +endBlock, + description, + }, + }; + } + case EventKind.ProposalExecuted: { + const [id] = rawData.args as GetArgType< + GovernorCompatibilityBravo, + 'ProposalExecuted' + >; + return { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Compound, + data: { + kind, + id: id.toHexString(), + }, + }; + } + case EventKind.ProposalQueued: { + const [id, eta] = rawData.args as GetArgType< + GovernorCompatibilityBravo, + 'ProposalQueued' + >; + return { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Compound, + data: { + kind, + id: id.toHexString(), + eta: +eta, + }, + }; + } + case EventKind.VoteCast: { + const [ + voter, + proposalId, + support, + votes, + reason, // should be undefined in GovAlpha version + ] = rawData.args as GetArgType; + return { + blockNumber, + excludeAddresses: [voter], + network: SupportedNetwork.Compound, + data: { + kind, + voter, + id: proposalId.toHexString(), + support: +support, + votes: votes.toString(), + reason, + }, + }; + } + default: { + throw new Error(`Unknown event kind: ${kind}`); + } + } +} diff --git a/packages/chain-events/src/chains/compound/filters/labeler.ts b/packages/chain-events/src/chains/compound/filters/labeler.ts new file mode 100644 index 00000000000..97d258e052a --- /dev/null +++ b/packages/chain-events/src/chains/compound/filters/labeler.ts @@ -0,0 +1,77 @@ +import { + LabelerFilter, + IEventLabel, + SupportedNetwork, +} from '../../../interfaces'; +import { IEventData, EventKind } from '../types'; + +/** + * This a labeler function, which takes event data and describes it in "plain english", + * such that we can display a notification regarding its contents. + */ +export const Label: LabelerFilter = ( + blockNumber: number, + chainId: string, + data: IEventData, + chain?: string +): IEventLabel => { + switch (data.kind) { + case EventKind.ProposalCanceled: { + return { + heading: 'Proposal Canceled', + label: `Proposal ${data.id} was cancelled.`, + linkUrl: chainId + ? `/${chainId}/proposal/compoundproposal/${data.id}` + : null, + }; + } + case EventKind.ProposalCreated: { + return { + heading: 'Proposal Created', + label: `Proposal ${data.id} was created.`, + linkUrl: chainId + ? `/${chainId}/proposal/compoundproposal/${data.id}` + : null, + }; + } + case EventKind.ProposalExecuted: { + return { + heading: 'Proposal Executed', + label: `Proposal ${data.id} was executed.`, + linkUrl: chainId + ? `/${chainId}/proposal/compoundproposal/${data.id}` + : null, + }; + } + case EventKind.ProposalQueued: { + return { + heading: 'Proposal Queued', + label: `Proposal ${data.id} queued up. ETA: Block ${data.eta}.`, + linkUrl: chainId + ? `/${chainId}/proposal/compoundproposal/${data.id}` + : null, + }; + } + case EventKind.VoteCast: { + return { + heading: 'Vote Cast', + label: `Voter (${data.voter}) cast ${data.votes} votes ${ + data.support ? 'not' : null + } in support of proposal ${data.id}.`, + linkUrl: chainId + ? `/${chainId}/proposal/compoundproposal/${data.id}` + : null, + }; + } + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = data; + throw new Error( + `[${SupportedNetwork.Compound}${ + chain ? `::${chain}` : '' + }]: Unknown event type` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/compound/filters/titler.ts b/packages/chain-events/src/chains/compound/filters/titler.ts new file mode 100644 index 00000000000..23994f02f19 --- /dev/null +++ b/packages/chain-events/src/chains/compound/filters/titler.ts @@ -0,0 +1,59 @@ +import { + IEventTitle, + SupportedNetwork, + TitlerFilter, +} from '../../../interfaces'; +import { EventKind } from '../types'; + +/** + * This a titler function, not to be confused with the labeler -- it takes a particular + * kind of event, and returns a "plain english" description of that type. This is used + * on the client to present a list of subscriptions that a user might want to subscribe to. + */ +export const Title: TitlerFilter = ( + kind: EventKind, + chain?: string +): IEventTitle => { + switch (kind) { + case EventKind.ProposalCanceled: { + return { + title: 'Proposal cancelled', + description: 'A proposal has been cancelled.', + }; + } + case EventKind.ProposalCreated: { + return { + title: 'Proposal created', + description: 'A proposal has been created.', + }; + } + case EventKind.ProposalExecuted: { + return { + title: 'Proposal executed', + description: 'A proposal has been executed.', + }; + } + case EventKind.ProposalQueued: { + return { + title: 'Proposal queued', + description: 'A proposal has been added to the queue.', + }; + } + case EventKind.VoteCast: { + return { + title: 'Vote cast', + description: 'A new vote has been cast.', + }; + } + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = kind; + throw new Error( + `[${SupportedNetwork.Compound}${ + chain ? `::${chain}` : '' + }]: Unknown event type` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/compound/filters/type_parser.ts b/packages/chain-events/src/chains/compound/filters/type_parser.ts new file mode 100644 index 00000000000..e2895f7850b --- /dev/null +++ b/packages/chain-events/src/chains/compound/filters/type_parser.ts @@ -0,0 +1,29 @@ +import { EventKind } from '../types'; +import { addPrefix, factory } from '../../../logging'; +import { SupportedNetwork } from '../../../interfaces'; + +/** + * This is the Type Parser function, which takes a raw Event + * and determines which of our local event kinds it belongs to. + */ +export function ParseType(name: string, chain?: string): EventKind | null { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Compound, chain]) + ); + switch (name) { + case 'ProposalExecuted': + return EventKind.ProposalExecuted; + case 'ProposalCreated': + return EventKind.ProposalCreated; + case 'ProposalCanceled': + return EventKind.ProposalCanceled; + case 'ProposalQueued': + return EventKind.ProposalQueued; + case 'VoteCast': + return EventKind.VoteCast; + default: { + log.warn(`Unknown event name: ${name}!`); + return null; + } + } +} diff --git a/packages/chain-events/src/chains/compound/index.ts b/packages/chain-events/src/chains/compound/index.ts new file mode 100644 index 00000000000..0edfe6e4cdb --- /dev/null +++ b/packages/chain-events/src/chains/compound/index.ts @@ -0,0 +1,11 @@ +export * as Types from './types'; +export * from './subscribeFunc'; +export * from './subscriber'; +export * from './processor'; +export * from './storageFetcher'; +export * from './Listener'; + +export * from './filters/enricher'; +export * from './filters/labeler'; +export * from './filters/titler'; +export * from './filters/type_parser'; diff --git a/packages/chain-events/src/chains/compound/processor.ts b/packages/chain-events/src/chains/compound/processor.ts new file mode 100644 index 00000000000..7fcdf80fa6e --- /dev/null +++ b/packages/chain-events/src/chains/compound/processor.ts @@ -0,0 +1,39 @@ +/** + * Processes Compound events. + */ +import { IEventProcessor, CWEvent, SupportedNetwork } from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { ParseType } from './filters/type_parser'; +import { Enrich } from './filters/enricher'; +import { IEventData, RawEvent, Api } from './types'; + +export class Processor extends IEventProcessor { + constructor(protected _api: Api, protected readonly chain?: string) { + super(_api); + } + + /** + * Parse events out of an ethereum block and standardizes their format + * for processing. + * + * @param event + * @returns an array of processed events + */ + public async process(event: RawEvent): Promise[]> { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Compound, this.chain]) + ); + const kind = ParseType(event.event, this.chain); + if (!kind) return []; + try { + const cwEvent = await Enrich(this._api, event.blockNumber, kind, event); + return [cwEvent]; + } catch (e) { + log.error( + `Failed to enrich event. Block number: ${event.blockNumber}, Name/Kind: ${event.event}, Error Message: ${e.message}` + ); + return []; + } + } +} diff --git a/packages/chain-events/src/chains/compound/storageFetcher.ts b/packages/chain-events/src/chains/compound/storageFetcher.ts new file mode 100644 index 00000000000..6930dfeafad --- /dev/null +++ b/packages/chain-events/src/chains/compound/storageFetcher.ts @@ -0,0 +1,196 @@ +import { + CWEvent, + IStorageFetcher, + IDisconnectedRange, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { Enrich } from './filters/enricher'; +import { + IEventData, + EventKind, + Api, + IVoteCast, + IProposalCreated, + IProposalCanceled, + IProposalQueued, + IProposalExecuted, + isGovernorAlpha, +} from './types'; + +export class StorageFetcher extends IStorageFetcher { + private readonly log; + + constructor(protected readonly _api: Api, chain?: string) { + super(_api); + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Compound, chain]) + ); + } + + private _currentBlock: number; + + public async fetchOne(id: string): Promise[]> { + this._currentBlock = +(await this._api.provider.getBlockNumber()); + this.log.info(`Current block: ${this._currentBlock}.`); + if (!this._currentBlock) { + this.log.error('Failed to fetch current block! Aborting fetch.'); + return []; + } + + // TODO: can we make this more efficient? + const allProposals = await this.fetch(); + return allProposals.filter((v) => v.data.id === id); + } + + /** + * Fetches all CW events relating to ChainEntities from chain (or in this case contract), + * by quering available chain/contract storage and reconstructing events. + * + * NOTE: throws on error! Make sure to wrap in try/catch! + * + * @param range Determines the range of blocks to query events within. + * @param fetchAllCompleted + */ + public async fetch( + range?: IDisconnectedRange + ): Promise[]> { + this._currentBlock = await this._api.provider.getBlockNumber(); + this.log.info(`Current block: ${this._currentBlock}.`); + if (!this._currentBlock) { + this.log.error(`Failed to fetch current block! Aborting fetch.`); + return []; + } + + // populate range fully if not given + if (!range) { + range = { startBlock: 0 }; + } else if (!range.startBlock) { + range.startBlock = 0; + } else if (range.startBlock >= this._currentBlock) { + this.log.error( + `Start block ${range.startBlock} greater than current block ${this._currentBlock}!` + ); + return []; + } + if (!range.endBlock) { + range.endBlock = this._currentBlock; + } + if (range.startBlock >= range.endBlock) { + this.log.error( + `Invalid fetch range: ${range.startBlock}-${range.endBlock}.` + ); + return []; + } + this.log.info( + `Fetching Compound entities for range: ${range.startBlock}-${range.endBlock}.` + ); + + const proposalCreatedEvents = await this._api.queryFilter( + this._api.filters.ProposalCreated( + null, + null, + null, + null, + null, + null, + null, + null, + null + ), + range.startBlock, + range.endBlock + ); + const createdCwEvents = await Promise.all( + proposalCreatedEvents.map( + (evt) => + Enrich( + this._api, + evt.blockNumber, + EventKind.ProposalCreated, + evt + ) as Promise> + ) + ); + const voteCastEvents = await this._api.queryFilter( + isGovernorAlpha(this._api) + ? this._api.filters.VoteCast(null, null, null, null) + : this._api.filters.VoteCast(null, null, null, null, null), + range.startBlock, + range.endBlock + ); + const voteCwEvents = await Promise.all( + voteCastEvents.map( + (evt) => + Enrich( + this._api, + evt.blockNumber, + EventKind.VoteCast, + evt + ) as Promise> + ) + ); + + let queuedCwEvents = []; + try { + const proposalQueuedEvents = await this._api.queryFilter( + this._api.filters.ProposalQueued(null, null), + range.startBlock, + range.endBlock + ); + queuedCwEvents = await Promise.all( + proposalQueuedEvents.map( + (evt) => + Enrich( + this._api, + evt.blockNumber, + EventKind.ProposalQueued, + evt + ) as Promise> + ) + ); + } catch (e) { + this.log.warn('Could not fetched queued events.'); + } + const proposalCanceledEvents = await this._api.queryFilter( + this._api.filters.ProposalCanceled(null), + range.startBlock, + range.endBlock + ); + const cancelledCwEvents = await Promise.all( + proposalCanceledEvents.map( + (evt) => + Enrich( + this._api, + evt.blockNumber, + EventKind.ProposalCanceled, + evt + ) as Promise> + ) + ); + const proposalExecutedEvents = await this._api.queryFilter( + this._api.filters.ProposalExecuted(null), + range.startBlock, + range.endBlock + ); + const executedCwEvents = await Promise.all( + proposalExecutedEvents.map( + (evt) => + Enrich( + this._api, + evt.blockNumber, + EventKind.ProposalExecuted, + evt + ) as Promise> + ) + ); + return [ + ...createdCwEvents, + ...voteCwEvents, + ...queuedCwEvents, + ...cancelledCwEvents, + ...executedCwEvents, + ].sort((e1, e2) => e1.blockNumber - e2.blockNumber); + } +} diff --git a/packages/chain-events/src/chains/compound/subscribeFunc.ts b/packages/chain-events/src/chains/compound/subscribeFunc.ts new file mode 100644 index 00000000000..493e06208ab --- /dev/null +++ b/packages/chain-events/src/chains/compound/subscribeFunc.ts @@ -0,0 +1,199 @@ +import { providers } from 'ethers'; +import sleep from 'sleep-promise'; + +import { createProvider } from '../../eth'; +import { + IDisconnectedRange, + CWEvent, + SubscribeFunc, + ISubscribeOptions, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; +import { + GovernorAlpha__factory as GovernorAlphaFactory, + GovernorCompatibilityBravo__factory as GovernorCompatibilityBravoFactory, +} from '../../contractTypes'; + +import { Subscriber } from './subscriber'; +import { Processor } from './processor'; +import { StorageFetcher } from './storageFetcher'; +import { IEventData, RawEvent, Api } from './types'; + +/** + * Attempts to open an API connection, retrying if it cannot be opened. + * @returns a promise resolving to an ApiPromise once the connection has been established + * @param ethNetworkUrlOrProvider + * @param governorAddress + * @param retryTimeMs + * @param chain + */ +export async function createApi( + ethNetworkUrlOrProvider: string | providers.JsonRpcProvider, + governorAddress: string, + retryTimeMs = 10 * 1000, + chain?: string +): Promise { + const ethNetworkUrl = + typeof ethNetworkUrlOrProvider === 'string' + ? ethNetworkUrlOrProvider + : ethNetworkUrlOrProvider.connection.url; + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Compound, chain]) + ); + + for (let i = 0; i < 3; ++i) { + try { + const provider = + typeof ethNetworkUrlOrProvider === 'string' + ? await createProvider( + ethNetworkUrlOrProvider, + SupportedNetwork.Compound, + chain + ) + : ethNetworkUrlOrProvider; + + let contract: Api; + try { + contract = GovernorAlphaFactory.connect(governorAddress, provider); + await contract.deployed(); + await contract.guardian(); + log.info(`Found GovAlpha contract at ${contract.address}`); + } catch (e) { + contract = GovernorCompatibilityBravoFactory.connect( + governorAddress, + provider + ); + await contract.deployed(); + log.info( + `Found non-GovAlpha Compound contract at ${contract.address}, using GovernorCompatibilityBravo` + ); + } + + log.info(`Connection successful!`); + return contract; + } catch (err) { + log.error( + `Compound contract: ${governorAddress} at url: ${ethNetworkUrl} failure: ${err.message}` + ); + await sleep(retryTimeMs); + log.error(`Retrying connection...`); + } + } + + throw new Error( + `[${SupportedNetwork.Compound}${ + chain ? `::${chain}` : '' + }]: Failed to start Compound listener for ${governorAddress} at ${ethNetworkUrl}` + ); +} + +/** + * This is the main function for edgeware event handling. It constructs a connection + * to the chain, connects all event-related modules, and initializes event handling. + * + * @param url The edgeware chain endpoint to connect to. + * @param handler An event handler object for processing received events. + * @param skipCatchup If true, skip all fetching of "historical" chain data that may have been + * emitted during downtime. + * @param discoverReconnectRange A function to determine how long we were offline upon reconnection. + * @returns An active block subscriber. + */ +export const subscribeEvents: SubscribeFunc< + Api, + RawEvent, + ISubscribeOptions +> = async (options) => { + const { + chain, + api, + handlers, + skipCatchup, + discoverReconnectRange, + verbose, + } = options; + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Compound, chain]) + ); + // helper function that sends an event through event handlers + const handleEventFn = async (event: CWEvent): Promise => { + let prevResult = null; + for (const handler of handlers) { + try { + // pass result of last handler into next one (chaining db events) + prevResult = await handler.handle(event, prevResult); + } catch (err) { + log.error(`Event handle failure: ${err.message}`); + break; + } + } + }; + + // helper function that sends a block through the event processor and + // into the event handlers + const processor = new Processor(api); + const processEventFn = async (event: RawEvent): Promise => { + // retrieve events from block + const cwEvents: CWEvent[] = await processor.process(event); + + // process events in sequence + for (const cwEvent of cwEvents) { + await handleEventFn(cwEvent); + } + }; + + const subscriber = new Subscriber(api, chain, verbose); + + // helper function that runs after we've been offline/the server's been down, + // and attempts to fetch skipped events + const pollMissedEventsFn = async (): Promise => { + if (!discoverReconnectRange) { + log.warn( + 'No function to discover offline time found, skipping event catchup.' + ); + return; + } + log.info(`Fetching missed events since last startup of ${chain}...`); + let offlineRange: IDisconnectedRange; + try { + offlineRange = await discoverReconnectRange(); + if (!offlineRange) { + log.warn('No offline range found, skipping event catchup.'); + return; + } + } catch (e) { + log.error( + `Could not discover offline range: ${e.message}. Skipping event catchup.` + ); + return; + } + + // defaulting to the governorAlpha contract provider, though could be any of the contracts + const fetcher = new StorageFetcher(api); + try { + const cwEvents = await fetcher.fetch(offlineRange); + + // process events in sequence + for (const cwEvent of cwEvents) { + await handleEventFn(cwEvent); + } + } catch (e) { + log.error(`Unable to fetch events from storage: ${e.message}`); + } + }; + + if (!skipCatchup) { + await pollMissedEventsFn(); + } else { + log.info('Skipping event catchup on startup!'); + } + + try { + log.info(`Subscribing to Compound contracts ${chain}...`); + await subscriber.subscribe(processEventFn); + } catch (e) { + log.error(`Subscription error: ${e.message}`); + } + + return subscriber; +}; diff --git a/packages/chain-events/src/chains/compound/subscriber.ts b/packages/chain-events/src/chains/compound/subscriber.ts new file mode 100644 index 00000000000..ee2c4597ac9 --- /dev/null +++ b/packages/chain-events/src/chains/compound/subscriber.ts @@ -0,0 +1,50 @@ +/** + * Fetches events from Compound contract in real time. + */ +import { Listener } from '@ethersproject/providers'; + +import { IEventSubscriber, SupportedNetwork } from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { RawEvent, Api } from './types'; + +export class Subscriber extends IEventSubscriber { + private _name: string; + + private _listener: Listener | null; + + protected readonly log; + + constructor(api: Api, name: string, verbose = false) { + super(api, verbose); + this._name = name; + + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Compound, this._name]) + ); + } + + /** + * Initializes subscription to chain and starts emitting events. + */ + public async subscribe(cb: (event: RawEvent) => void): Promise { + this._listener = (event: RawEvent): void => { + const logStr = `Received ${this._name} event: ${JSON.stringify( + event, + null, + 2 + )}.`; + // eslint-disable-next-line no-unused-expressions + this._verbose ? this.log.info(logStr) : this.log.trace(logStr); + cb(event); + }; + this._api.on('*', this._listener); + } + + public unsubscribe(): void { + if (this._listener) { + this._api.removeListener('*', this._listener); + this._listener = null; + } + } +} diff --git a/packages/chain-events/src/chains/compound/types.ts b/packages/chain-events/src/chains/compound/types.ts new file mode 100644 index 00000000000..d60a720db64 --- /dev/null +++ b/packages/chain-events/src/chains/compound/types.ts @@ -0,0 +1,103 @@ +/* eslint-disable no-shadow */ +import { TypedEvent } from '../../contractTypes/commons'; +import { GovernorAlpha, GovernorCompatibilityBravo } from '../../contractTypes'; + +export enum ProposalState { + Pending = 0, + Active = 1, + Canceled = 2, + Defeated = 3, + Succeeded = 4, + Queued = 5, + Expired = 6, + Executed = 7, +} + +export enum BravoSupport { + Against = 0, + For = 1, + Abstain = 2, +} + +export type Api = GovernorAlpha | GovernorCompatibilityBravo; +export function isGovernorAlpha(a: Api): a is GovernorAlpha { + return !!a.interface.functions['guardian()']; +} + +// options for the listener class +export interface ListenerOptions { + url: string; + skipCatchup: boolean; + contractAddress: string; +} + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type RawEvent = TypedEvent; + +// eslint-disable-next-line no-shadow +export enum EntityKind { + // eslint-disable-next-line no-shadow + Proposal = 'proposal', +} + +export enum EventKind { + ProposalExecuted = 'proposal-executed', + ProposalCreated = 'proposal-created', + ProposalCanceled = 'proposal-canceled', + ProposalQueued = 'proposal-queued', + VoteCast = 'vote-cast', +} + +interface IEvent { + kind: EventKind; +} + +type Address = string; +type Balance = string; // queried as BigNumber + +export interface IProposalCanceled extends IEvent { + kind: EventKind.ProposalCanceled; + id: string; +} + +export interface IProposalCreated extends IEvent { + kind: EventKind.ProposalCreated; + id: string; + proposer: Address; + targets: Address[]; + values: Balance[]; + signatures: string[]; + calldatas: string[]; + startBlock: number; + endBlock: number; + description: string; +} + +export interface IProposalExecuted extends IEvent { + kind: EventKind.ProposalExecuted; + id: string; +} + +export interface IProposalQueued extends IEvent { + kind: EventKind.ProposalQueued; + id: string; + eta: number; +} + +export interface IVoteCast extends IEvent { + kind: EventKind.VoteCast; + voter: Address; + id: string; + support: number; // handle alpha and bravo support types + votes: Balance; + reason?: string; +} + +export type IEventData = + | IProposalCanceled + | IProposalCreated + | IProposalExecuted + | IProposalQueued + | IVoteCast; + +export const EventKinds: EventKind[] = Object.values(EventKind); diff --git a/packages/chain-events/src/chains/erc20/Listener.ts b/packages/chain-events/src/chains/erc20/Listener.ts new file mode 100644 index 00000000000..ba05473d1bf --- /dev/null +++ b/packages/chain-events/src/chains/erc20/Listener.ts @@ -0,0 +1,134 @@ +import { CWEvent, SupportedNetwork } from '../../interfaces'; +import { Listener as BaseListener } from '../../Listener'; +import { addPrefix, factory } from '../../logging'; + +import { + EventKind, + IErc20Contracts, + ListenerOptions as Erc20ListenerOptions, + RawEvent, +} from './types'; +import { createApi } from './subscribeFunc'; +import { Processor } from './processor'; +import { Subscriber } from './subscriber'; +import { EnricherConfig } from './filters/enricher'; + +export class Listener extends BaseListener< + IErc20Contracts, + never, + Processor, + Subscriber, + EventKind +> { + private readonly _options: Erc20ListenerOptions; + + protected readonly log; + + constructor( + chain: string, + tokenAddresses: string[], + url?: string, + tokenNames?: string[], + enricherConfig?: EnricherConfig, + verbose?: boolean + ) { + super(SupportedNetwork.ERC20, chain, verbose); + + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC20]) + ); + + this._options = { + url, + tokenAddresses, + tokenNames, + enricherConfig: enricherConfig || {}, + }; + + this._subscribed = false; + } + + public async init(): Promise { + try { + this._api = await createApi( + this._options.url, + this._options.tokenAddresses, + this._options.tokenNames, + 10000 + ); + } catch (error) { + this.log.error('Fatal error occurred while starting the API'); + throw error; + } + + try { + this._processor = new Processor(this._api, this._options.enricherConfig); + this._subscriber = new Subscriber(this._api, this._chain, this._verbose); + } catch (error) { + this.log.error( + 'Fatal error occurred while starting the Processor and Subscriber' + ); + throw error; + } + } + + public async subscribe(): Promise { + if (!this._subscriber) { + this.log.info("Subscriber isn't initialized. Please run init() first!"); + return; + } + + try { + this.log.info( + `Subscribing to the following token(s): ${ + this.options.tokenNames || '[token names not given!]' + }, on url ${this._options.url}` + ); + await this._subscriber.subscribe(this.processBlock.bind(this)); + this._subscribed = true; + } catch (error) { + this.log.error(`Subscription error: ${error.message}`); + } + } + + // override handleEvent to stop the chain from being added to event data + // since the chain/token name is added to event data in the subscriber.ts + // (since there are multiple tokens) + protected async handleEvent(event: CWEvent): Promise { + let prevResult; + + // eslint-disable-next-line guard-for-in + for (const key in this.eventHandlers) { + const eventHandler = this.eventHandlers[key]; + if ( + this.globalExcludedEvents.includes(event.data.kind as EventKind) || + eventHandler.excludedEvents?.includes(event.data.kind as EventKind) + ) + // eslint-disable-next-line no-continue + continue; + + try { + prevResult = await eventHandler.handler.handle(event, prevResult); + } catch (err) { + this.log.error(`Event handle failure: ${err.message}`); + break; + } + } + } + + protected async processBlock( + event: RawEvent, + tokenName?: string + ): Promise { + const cwEvents: CWEvent[] = await this._processor.process(event, tokenName); + + // process events in sequence + for (const e of cwEvents) { + await this.handleEvent(e as CWEvent); + } + } + + public get options(): Erc20ListenerOptions { + return this._options; + } +} diff --git a/packages/chain-events/src/chains/erc20/filters/enricher.ts b/packages/chain-events/src/chains/erc20/filters/enricher.ts new file mode 100644 index 00000000000..51f0b3ec586 --- /dev/null +++ b/packages/chain-events/src/chains/erc20/filters/enricher.ts @@ -0,0 +1,115 @@ +import BN from 'bn.js'; + +import { CWEvent, SupportedNetwork } from '../../../interfaces'; +import { TypedEventFilter } from '../../../contractTypes/commons'; +import { ERC20 } from '../../../contractTypes'; +import { EventKind, RawEvent, IEventData, IErc20Contracts } from '../types'; + +/** + * This is an "enricher" function, whose goal is to augment the initial event data + * received from the "system.events" query with additional useful information, as + * described in the event's interface in our "types.ts" file. + * + * Once fetched, the function marshalls the event data and the additional information + * into the interface, and returns a fully-formed event, ready for database storage. + */ +export interface EnricherConfig { + // if a balance transfer > (totalIssuance * balanceTransferThresholdPermill / 1_000_000) + // then emit an event, otherwise do not emit for balance transfer. + // Set to 0 or undefined to emit for all balance transfers. + balanceTransferThresholdPermill?: number; +} + +type GetEventArgs = T extends TypedEventFilter ? Y : never; +type GetArgType = GetEventArgs< + ReturnType +>; + +export async function Enrich( + api: IErc20Contracts, + blockNumber: number, + kind: EventKind, + rawData: RawEvent, + config: EnricherConfig = {} +): Promise> { + const { totalSupply, tokenName } = api.tokens.find( + ({ contract }) => + contract.address.toLowerCase() === rawData.address.toLowerCase() + ); + switch (kind) { + case EventKind.Approval: { + const { + owner, + spender, + value: valueBigNumber, + } = rawData.args as GetArgType<'Approval'>; + const contractAddress = rawData.address; + const value = new BN(valueBigNumber.toString()); + + // only emit to everyone if approval value is 0 or above the configuration threshold + const shouldEmitToAll = + !config.balanceTransferThresholdPermill || + value + .muln(1_000_000) + .divn(config.balanceTransferThresholdPermill) + .gte(totalSupply); + + // skip this event if the approval value isn't above the threshold + if (!shouldEmitToAll) return null; + + // should not notify sender or recipient + const excludeAddresses = [owner.toString(), spender.toString()]; + + return { + blockNumber, + excludeAddresses, + network: SupportedNetwork.ERC20, + data: { + kind, + owner, + spender, + value: value.toString(), + contractAddress, + }, + }; + } + case EventKind.Transfer: { + const { from, to, value: valueBigNumber } = rawData.args as GetArgType< + 'Transfer' + >; + const contractAddress = rawData.address; + const value = new BN(valueBigNumber.toString()); + + // only emit to everyone if transfer is 0 or above the configuration threshold + const shouldEmitToAll = + !config.balanceTransferThresholdPermill || + value + .muln(1_000_000) + .divn(config.balanceTransferThresholdPermill) + .gte(totalSupply); + + // skip this event if the transfer value isn't above the threshold + if (!shouldEmitToAll) return null; + + // should not notify sender or recipient + const excludeAddresses = [from.toString(), to.toString()]; + + return { + blockNumber, + excludeAddresses, + network: SupportedNetwork.ERC20, + data: { + kind, + from, + to, + value: value.toString(), + contractAddress, + }, + }; + } + + default: { + throw new Error(`Unknown event kind: ${kind}`); + } + } +} diff --git a/packages/chain-events/src/chains/erc20/filters/labeler.ts b/packages/chain-events/src/chains/erc20/filters/labeler.ts new file mode 100644 index 00000000000..905c97bc401 --- /dev/null +++ b/packages/chain-events/src/chains/erc20/filters/labeler.ts @@ -0,0 +1,46 @@ +import { + LabelerFilter, + IEventLabel, + SupportedNetwork, +} from '../../../interfaces'; +import { IEventData, EventKind } from '../types'; + +function fmtAddr(addr: string) { + if (!addr) return ''; + if (addr.length < 16) return addr; + return `${addr.slice(0, 7)}…${addr.slice(addr.length - 3)}`; +} + +/** + * This a labeler function, which takes event data and describes it in "plain english", + * such that we can display a notification regarding its contents. + */ +export const Label: LabelerFilter = ( + blockNumber: number, + chainId: string, + data: IEventData +): IEventLabel => { + switch (data.kind) { + case EventKind.Approval: + return { + heading: 'Approval', + label: `Owner ${fmtAddr(data.owner)} approved spender ${fmtAddr( + data.spender + )} + to spend ${data.value}.`, + }; + case EventKind.Transfer: + return { + heading: 'Transfer', + label: `Transfer of ${data.value} on ${chainId} from ${data.from} to ${data.to}.`, + }; + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = data; + throw new Error( + `[${SupportedNetwork.ERC20}::${chainId}]: Unknown event type` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/erc20/filters/titler.ts b/packages/chain-events/src/chains/erc20/filters/titler.ts new file mode 100644 index 00000000000..4cc5d6dbed5 --- /dev/null +++ b/packages/chain-events/src/chains/erc20/filters/titler.ts @@ -0,0 +1,34 @@ +import { + IEventTitle, + SupportedNetwork, + TitlerFilter, +} from '../../../interfaces'; +import { EventKind } from '../types'; + +/** + * This a titler function, not to be confused with the labeler -- it takes a particular + * kind of event, and returns a "plain english" description of that type. This is used + * on the client to present a list of subscriptions that a user might want to subscribe to. + */ +export const Title: TitlerFilter = (kind: EventKind): IEventTitle => { + switch (kind) { + case EventKind.Approval: + return { + title: 'Delegation Approved', + description: 'One account delegated tokens to another.', + }; + case EventKind.Transfer: + return { + title: 'Tokens Transferred', + description: 'Tokens have been transferred.', + }; + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = kind; + throw new Error( + `[${SupportedNetwork.ERC20}]: Unknown event type: ${kind}` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/erc20/filters/type_parser.ts b/packages/chain-events/src/chains/erc20/filters/type_parser.ts new file mode 100644 index 00000000000..7fd88c4ed5b --- /dev/null +++ b/packages/chain-events/src/chains/erc20/filters/type_parser.ts @@ -0,0 +1,24 @@ +import { EventKind } from '../types'; +import { addPrefix, factory } from '../../../logging'; +import { SupportedNetwork } from '../../../interfaces'; + +/** + * This is the Type Parser function, which takes a raw Event + * and determines which of our local event kinds it belongs to. + */ +export function ParseType(name: string, tokenName?: string): EventKind | null { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC20, tokenName]) + ); + switch (name) { + // ERC20 Events + case 'Approval': + return EventKind.Approval; + case 'Transfer': + return EventKind.Transfer; + default: { + log.info(`Unknown event name: ${name}!`); + return null; + } + } +} diff --git a/packages/chain-events/src/chains/erc20/index.ts b/packages/chain-events/src/chains/erc20/index.ts new file mode 100644 index 00000000000..6252f3a44af --- /dev/null +++ b/packages/chain-events/src/chains/erc20/index.ts @@ -0,0 +1,10 @@ +export * as Types from './types'; +export * from './subscribeFunc'; +export * from './subscriber'; +export * from './processor'; +export * from './Listener'; + +export * from './filters/enricher'; +export * from './filters/labeler'; +export * from './filters/titler'; +export * from './filters/type_parser'; diff --git a/packages/chain-events/src/chains/erc20/processor.ts b/packages/chain-events/src/chains/erc20/processor.ts new file mode 100644 index 00000000000..7225a838709 --- /dev/null +++ b/packages/chain-events/src/chains/erc20/processor.ts @@ -0,0 +1,52 @@ +/** + * Processes ERC20 events. + */ +import { IEventProcessor, CWEvent, SupportedNetwork } from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { ParseType } from './filters/type_parser'; +import { Enrich, EnricherConfig } from './filters/enricher'; +import { IEventData, RawEvent, IErc20Contracts } from './types'; + +export class Processor extends IEventProcessor { + constructor( + protected _api: IErc20Contracts, + private _enricherConfig: EnricherConfig = {} + ) { + super(_api); + } + + /** + * Parse events out of an ethereum block and standardizes their format + * for processing. + * @param event + * @param tokenName + * @returns an array of processed events + */ + public async process( + event: RawEvent, + tokenName?: string + ): Promise[]> { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC20, tokenName]) + ); + const kind = ParseType(event.event); + if (!kind) return []; + try { + const cwEvent = await Enrich( + this._api, + event.blockNumber, + kind, + event, + this._enricherConfig + ); + cwEvent.chain = tokenName; + return cwEvent ? [cwEvent] : []; + } catch (e) { + log.error( + `Failed to enrich event. Block number: ${event.blockNumber}, Name/Kind: ${event.event}, Error Message: ${e.message}` + ); + return []; + } + } +} diff --git a/packages/chain-events/src/chains/erc20/subscribeFunc.ts b/packages/chain-events/src/chains/erc20/subscribeFunc.ts new file mode 100644 index 00000000000..7c57bc1f9ee --- /dev/null +++ b/packages/chain-events/src/chains/erc20/subscribeFunc.ts @@ -0,0 +1,150 @@ +import sleep from 'sleep-promise'; +import _ from 'underscore'; +import BN from 'bn.js'; + +import { createProvider } from '../../eth'; +import { + CWEvent, + SubscribeFunc, + ISubscribeOptions, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; +import { ERC20__factory as ERC20Factory, ERC20 } from '../../contractTypes'; + +import { Subscriber } from './subscriber'; +import { Processor } from './processor'; +import { IEventData, RawEvent, IErc20Contracts } from './types'; +import { EnricherConfig } from './filters/enricher'; + +export interface IErc20SubscribeOptions + extends ISubscribeOptions { + enricherConfig?: EnricherConfig; +} + +/** + * Attempts to open an API connection, retrying if it cannot be opened. + * @param ethNetworkUrl + * @param tokenAddresses + * @param tokenNames + * @param retryTimeMs + * @returns a promise resolving to an ApiPromise once the connection has been established + + */ +export async function createApi( + ethNetworkUrl: string, + tokenAddresses: string[], + tokenNames?: string[], + retryTimeMs = 10 * 1000 +): Promise { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC20]) + ); + + for (let i = 0; i < 3; ++i) { + try { + const provider = await createProvider( + ethNetworkUrl, + SupportedNetwork.ERC20 + ); + log.info(`Connection to ${ethNetworkUrl} successful!`); + + const tokenContracts = tokenAddresses.map((o) => + ERC20Factory.connect(o, provider) + ); + const deployResults: IErc20Contracts = { provider, tokens: [] }; + for (const [contract, tokenName] of _.zip(tokenContracts, tokenNames) as [ + ERC20, + string | undefined + ][]) { + try { + await contract.deployed(); + const totalSupply = new BN((await contract.totalSupply()).toString()); + deployResults.tokens.push({ + contract, + totalSupply, + tokenName, + }); + } catch (err) { + log.error( + `Error loading token ${contract.address} (${tokenName}): ${err.message}` + ); + } + } + return deployResults; + } catch (err) { + log.error(`Erc20 at ${ethNetworkUrl} failure: ${err.message}`); + await sleep(retryTimeMs); + log.error('Retrying connection...'); + } + } + + throw new Error( + `[${SupportedNetwork.ERC20}]: Failed to start the ERC20 listener for ${tokenAddresses} at ${ethNetworkUrl}` + ); +} + +/** + * This is the main function for edgeware event handling. It constructs a connection + * to the chain, connects all event-related modules, and initializes event handling. + * @param options + * @returns An active block subscriber. + */ +export const subscribeEvents: SubscribeFunc< + IErc20Contracts, + RawEvent, + IErc20SubscribeOptions +> = async (options) => { + const { chain, api, handlers, verbose, enricherConfig } = options; + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC20]) + ); + // helper function that sends an event through event handlers + const handleEventFn = async ( + event: CWEvent, + tokenName?: string + ): Promise => { + event.chain = (tokenName as never) || chain; + event.received = Date.now(); + let prevResult = null; + for (const handler of handlers) { + try { + // pass result of last handler into next one (chaining db events) + prevResult = await handler.handle(event, prevResult); + } catch (err) { + log.error(`Event handle failure: ${err.message}`); + break; + } + } + }; + + // helper function that sends a block through the event processor and + // into the event handlers + const processor = new Processor(api, enricherConfig || {}); + const processEventFn = async ( + event: RawEvent, + tokenName?: string + ): Promise => { + // retrieve events from block + const cwEvents: CWEvent[] = await processor.process(event); + + // process events in sequence + for (const cwEvent of cwEvents) { + await handleEventFn(cwEvent, tokenName); + } + }; + + const subscriber = new Subscriber(api, chain, verbose); + + // helper function that runs after we've been offline/the server's been down, + // and attempts to fetch skipped events + + try { + log.info(`Subscribing to ERC20 contracts ${chain}...`); + await subscriber.subscribe(processEventFn); + } catch (e) { + log.error(`Subscription error: ${e.message}`); + } + + return subscriber; +}; diff --git a/packages/chain-events/src/chains/erc20/subscriber.ts b/packages/chain-events/src/chains/erc20/subscriber.ts new file mode 100644 index 00000000000..0eed3fa0ef6 --- /dev/null +++ b/packages/chain-events/src/chains/erc20/subscriber.ts @@ -0,0 +1,85 @@ +/** + * Fetches events from ERC20 contract in real time. + */ +import { Listener } from '@ethersproject/providers'; +import sleep from 'sleep-promise'; +import BN from 'bn.js'; + +import { IEventSubscriber, SupportedNetwork } from '../../interfaces'; +import { ERC20__factory as ERC20Factory } from '../../contractTypes'; +import { addPrefix, factory } from '../../logging'; + +import { RawEvent, IErc20Contracts } from './types'; + +export class Subscriber extends IEventSubscriber { + private _name: string; + + private _listener: Listener | null; + + constructor(api: IErc20Contracts, name: string, verbose = false) { + super(api, verbose); + this._name = name; + } + + /** + * Initializes subscription to chain and starts emitting events. + */ + public async subscribe( + cb: (event: RawEvent, tokenName?: string) => void + ): Promise { + this._listener = (tokenName: string, event: RawEvent): void => { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC20, tokenName]) + ); + const logStr = `Received ${this._name} event: ${JSON.stringify( + event, + null, + 2 + )}.`; + // eslint-disable-next-line no-unused-expressions + this._verbose ? log.info(logStr) : log.trace(logStr); + cb(event, tokenName); + }; + this._api.tokens.forEach(({ contract, tokenName }) => + contract.on('*', this._listener.bind(this, tokenName)) + ); + } + + public unsubscribe(): void { + if (this._listener) { + this._api.tokens.forEach(({ contract }) => contract.removeAllListeners()); + this._listener = null; + } + } + + public async addNewToken( + tokenAddress: string, + tokenName?: string, + retryTimeMs = 10 * 1000, + retries = 5 + ): Promise { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC20, tokenName]) + ); + const existingToken = this.api.tokens.find(({ contract }) => { + return contract.address === tokenAddress; + }); + if (existingToken) { + log.info('Token is already being monitored'); + return; + } + try { + const contract = ERC20Factory.connect(tokenAddress, this.api.provider); + await contract.deployed(); + const totalSupply = new BN((await contract.totalSupply()).toString()); + this.api.tokens.push({ contract, totalSupply, tokenName }); + contract.on('*', this._listener.bind(this, tokenName)); + } catch (e) { + await sleep(retryTimeMs); + if (retries > 0) { + log.error('Retrying connection...'); + this.addNewToken(tokenAddress, tokenName, retryTimeMs, retries - 1); + } + } + } +} diff --git a/packages/chain-events/src/chains/erc20/types.ts b/packages/chain-events/src/chains/erc20/types.ts new file mode 100644 index 00000000000..f6af8d1879c --- /dev/null +++ b/packages/chain-events/src/chains/erc20/types.ts @@ -0,0 +1,63 @@ +import { Web3Provider } from '@ethersproject/providers'; +import BN from 'bn.js'; + +import { TypedEvent } from '../../contractTypes/commons'; +import { ERC20 } from '../../contractTypes'; + +import { EnricherConfig } from './filters/enricher'; + +interface IErc20Contract { + contract: ERC20; + totalSupply: BN; + tokenName?: string; +} + +export interface IErc20Contracts { + tokens: IErc20Contract[]; + provider: Web3Provider; +} + +export interface ListenerOptions { + url: string; + tokenAddresses: string[]; + tokenNames?: string[]; + enricherConfig: EnricherConfig; +} + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type RawEvent = TypedEvent; + +// eslint-disable-next-line no-shadow +export enum EventKind { + // Erc20 Events + Approval = 'approval', + Transfer = 'transfer', +} + +interface IEvent { + kind: EventKind; +} + +type Address = string; +type Balance = string; + +// Erc20 Event Interfaces +export interface IApproval extends IEvent { + kind: EventKind.Approval; + owner: Address; + spender: Address; + value: Balance; + contractAddress: Address; +} + +export interface ITransfer extends IEvent { + kind: EventKind.Transfer; + from: Address; + to: Address; + value: Balance; + contractAddress: Address; +} + +export type IEventData = IApproval | ITransfer; + +export const EventKinds: EventKind[] = Object.values(EventKind); diff --git a/packages/chain-events/src/chains/erc721/Listener.ts b/packages/chain-events/src/chains/erc721/Listener.ts new file mode 100644 index 00000000000..2d6da2e83ab --- /dev/null +++ b/packages/chain-events/src/chains/erc721/Listener.ts @@ -0,0 +1,131 @@ +import { CWEvent, SupportedNetwork } from '../../interfaces'; +import { Listener as BaseListener } from '../../Listener'; +import { addPrefix, factory } from '../../logging'; + +import { + EventKind, + IErc721Contracts, + ListenerOptions as Erc721ListenerOptions, + RawEvent, +} from './types'; +import { createApi } from './subscribeFunc'; +import { Processor } from './processor'; +import { Subscriber } from './subscriber'; + +export class Listener extends BaseListener< + IErc721Contracts, + never, + Processor, + Subscriber, + EventKind +> { + private readonly _options: Erc721ListenerOptions; + + protected readonly log; + + constructor( + chain: string, + tokenAddresses: string[], + url?: string, + tokenNames?: string[], + verbose?: boolean + ) { + super(SupportedNetwork.ERC721, chain, verbose); + + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC721]) + ); + + this._options = { + url, + tokenAddresses, + tokenNames, + }; + + this._subscribed = false; + } + + public async init(): Promise { + try { + this._api = await createApi( + this._options.url, + this._options.tokenAddresses, + this._options.tokenNames, + 10000 + ); + } catch (error) { + this.log.error('Fatal error occurred while starting the API'); + throw error; + } + + try { + this._processor = new Processor(this._api); + this._subscriber = new Subscriber(this._api, this._chain, this._verbose); + } catch (error) { + this.log.error( + 'Fatal error occurred while starting the Processor and Subscriber' + ); + throw error; + } + } + + public async subscribe(): Promise { + if (!this._subscriber) { + this.log.info("Subscriber isn't initialized. Please run init() first!"); + return; + } + + try { + this.log.info( + `Subscribing to the following token(s): ${ + this.options.tokenNames || '[token names not given!]' + }, on url ${this._options.url}` + ); + await this._subscriber.subscribe(this.processBlock.bind(this)); + this._subscribed = true; + } catch (error) { + this.log.error(`Subscription error: ${error.message}`); + } + } + + // override handleEvent to stop the chain from being added to event data + // since the chain/token name is added to event data in the subscriber.ts + // (since there are multiple tokens) + protected async handleEvent(event: CWEvent): Promise { + let prevResult; + + // eslint-disable-next-line guard-for-in + for (const key in this.eventHandlers) { + const eventHandler = this.eventHandlers[key]; + if ( + this.globalExcludedEvents.includes(event.data.kind as EventKind) || + eventHandler.excludedEvents?.includes(event.data.kind as EventKind) + ) + // eslint-disable-next-line no-continue + continue; + + try { + prevResult = await eventHandler.handler.handle(event, prevResult); + } catch (err) { + this.log.error(`Event handle failure: ${err.message}`); + break; + } + } + } + + protected async processBlock( + event: RawEvent, + tokenName?: string + ): Promise { + const cwEvents: CWEvent[] = await this._processor.process(event, tokenName); + + // process events in sequence + for (const e of cwEvents) { + await this.handleEvent(e as CWEvent); + } + } + + public get options(): Erc721ListenerOptions { + return this._options; + } +} diff --git a/packages/chain-events/src/chains/erc721/filters/enricher.ts b/packages/chain-events/src/chains/erc721/filters/enricher.ts new file mode 100644 index 00000000000..5c780a416b4 --- /dev/null +++ b/packages/chain-events/src/chains/erc721/filters/enricher.ts @@ -0,0 +1,101 @@ +import BN from 'bn.js'; + +import { CWEvent, SupportedNetwork } from '../../../interfaces'; +import { TypedEventFilter } from '../../../contractTypes/commons'; +import { ERC721 } from '../../../contractTypes'; +import { EventKind, RawEvent, IEventData, IErc721Contracts } from '../types'; + +/** + * This is an "enricher" function, whose goal is to augment the initial event data + * received from the "system.events" query with additional useful information, as + * described in the event's interface in our "types.ts" file. + * + * Once fetched, the function marshalls the event data and the additional information + * into the interface, and returns a fully-formed event, ready for database storage. + */ + +type GetEventArgs = T extends TypedEventFilter ? Y : never; +type GetArgType = GetEventArgs< + ReturnType +>; + +export async function Enrich( + api: IErc721Contracts, + blockNumber: number, + kind: EventKind, + rawData: RawEvent +): Promise> { + switch (kind) { + case EventKind.Approval: { + const { owner, approved, tokenId } = rawData.args as GetArgType< + 'Approval' + >; + const contractAddress = rawData.address; + + // should not notify sender or recipient + const excludeAddresses = [owner.toString(), approved.toString()]; + + return { + blockNumber, + excludeAddresses, + network: SupportedNetwork.ERC721, + data: { + kind, + owner, + approved, + tokenId: tokenId.toString(), + contractAddress, + }, + }; + } + case EventKind.ApprovalForAll: { + const { owner, operator, approved } = rawData.args as GetArgType< + 'ApprovalForAll' + >; + const contractAddress = rawData.address; + + // should not notify sender or recipient + const excludeAddresses = [owner.toString(), operator.toString()]; + + return { + blockNumber, + excludeAddresses, + network: SupportedNetwork.ERC721, + data: { + kind, + owner, + operator, + approved, + contractAddress, + }, + }; + } + case EventKind.Transfer: { + const { from, to, tokenId } = rawData.args as GetArgType<'Transfer'>; + const contractAddress = rawData.address; + + // no need to explicitly filter transfers of zero tokens, as + // this would just throw with ERC721. + + // should not notify sender or recipient + const excludeAddresses = [from.toString(), to.toString()]; + + return { + blockNumber, + excludeAddresses, + network: SupportedNetwork.ERC721, + data: { + kind, + from, + to, + tokenId: tokenId.toString(), + contractAddress, + }, + }; + } + + default: { + throw new Error(`Unknown event kind: ${kind}`); + } + } +} diff --git a/packages/chain-events/src/chains/erc721/filters/labeler.ts b/packages/chain-events/src/chains/erc721/filters/labeler.ts new file mode 100644 index 00000000000..bc67e09f510 --- /dev/null +++ b/packages/chain-events/src/chains/erc721/filters/labeler.ts @@ -0,0 +1,74 @@ +import { BigNumber } from 'ethers'; + +import { + LabelerFilter, + IEventLabel, + SupportedNetwork, +} from '../../../interfaces'; +import { IEventData, EventKind } from '../types'; + +function fmtAddr(addr: string) { + if (!addr) return ''; + if (addr.length < 16) return addr; + return `${addr.slice(0, 7)}…${addr.slice(addr.length - 3)}`; +} + +/** + * This a labeler function, which takes event data and describes it in "plain english", + * such that we can display a notification regarding its contents. + */ +export const Label: LabelerFilter = ( + blockNumber: number, + chainId: string, + data: IEventData +): IEventLabel => { + switch (data.kind) { + case EventKind.Approval: { + // check to see if owner disapproves all addresses + let label = ''; + if (!BigNumber.from(data.approved).isZero()) { + label = `Owner ${fmtAddr(data.owner)} approved ${fmtAddr(data.approved)} + to transfer token ${data.tokenId}.`; + } else { + label = `Owner ${fmtAddr(data.owner)} disapproved any address + previously able to transfer token ${data.tokenId}.`; + } + return { + heading: 'Approval', + label, + }; + } + case EventKind.ApprovalForAll: { + // check to see if owner disapproves all addresses + let label = ''; + if (data.approved) { + label = `Owner ${fmtAddr(data.owner)} approved operator ${fmtAddr( + data.operator + )} + to transfer all of their tokens.`; + } else { + label = `Owner ${fmtAddr(data.owner)} has disapproved ${fmtAddr( + data.operator + )} + from transferring any of their tokens.`; + } + return { + heading: 'Approval For All', + label, + }; + } + case EventKind.Transfer: + return { + heading: 'Transfer', + label: `Transfer of ${data.tokenId} on ${chainId} from ${data.from} to ${data.to}.`, + }; + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = data; + throw new Error( + `[${SupportedNetwork.ERC721}::${chainId}]: Unknown event type` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/erc721/filters/titler.ts b/packages/chain-events/src/chains/erc721/filters/titler.ts new file mode 100644 index 00000000000..4eabfe81f73 --- /dev/null +++ b/packages/chain-events/src/chains/erc721/filters/titler.ts @@ -0,0 +1,39 @@ +import { + IEventTitle, + SupportedNetwork, + TitlerFilter, +} from '../../../interfaces'; +import { EventKind } from '../types'; + +/** + * This a titler function, not to be confused with the labeler -- it takes a particular + * kind of event, and returns a "plain english" description of that type. This is used + * on the client to present a list of subscriptions that a user might want to subscribe to. + */ +export const Title: TitlerFilter = (kind: EventKind): IEventTitle => { + switch (kind) { + case EventKind.Approval: + return { + title: 'Delegation Approved', + description: 'One account delegated a token to another.', + }; + case EventKind.ApprovalForAll: + return { + title: 'Full Delegation Approved', + description: 'One account delegated all of its tokens to another.', + }; + case EventKind.Transfer: + return { + title: 'Tokens Transferred', + description: 'Tokens have been transferred.', + }; + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = kind; + throw new Error( + `[${SupportedNetwork.ERC721}]: Unknown event type: ${kind}` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/erc721/filters/type_parser.ts b/packages/chain-events/src/chains/erc721/filters/type_parser.ts new file mode 100644 index 00000000000..ce6be57aedb --- /dev/null +++ b/packages/chain-events/src/chains/erc721/filters/type_parser.ts @@ -0,0 +1,26 @@ +import { EventKind } from '../types'; +import { addPrefix, factory } from '../../../logging'; +import { SupportedNetwork } from '../../../interfaces'; + +/** + * This is the Type Parser function, which takes a raw Event + * and determines which of our local event kinds it belongs to. + */ +export function ParseType(name: string, tokenName?: string): EventKind | null { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC721, tokenName]) + ); + switch (name) { + // ERC721 Events + case 'Approval': + return EventKind.Approval; + case 'ApprovalForAll': + return EventKind.ApprovalForAll; + case 'Transfer': + return EventKind.Transfer; + default: { + log.info(`Unknown event name: ${name}!`); + return null; + } + } +} diff --git a/packages/chain-events/src/chains/erc721/index.ts b/packages/chain-events/src/chains/erc721/index.ts new file mode 100644 index 00000000000..6252f3a44af --- /dev/null +++ b/packages/chain-events/src/chains/erc721/index.ts @@ -0,0 +1,10 @@ +export * as Types from './types'; +export * from './subscribeFunc'; +export * from './subscriber'; +export * from './processor'; +export * from './Listener'; + +export * from './filters/enricher'; +export * from './filters/labeler'; +export * from './filters/titler'; +export * from './filters/type_parser'; diff --git a/packages/chain-events/src/chains/erc721/processor.ts b/packages/chain-events/src/chains/erc721/processor.ts new file mode 100644 index 00000000000..3bf246d5153 --- /dev/null +++ b/packages/chain-events/src/chains/erc721/processor.ts @@ -0,0 +1,43 @@ +/** + * Processes ERC721 events. + */ +import { IEventProcessor, CWEvent, SupportedNetwork } from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { ParseType } from './filters/type_parser'; +import { Enrich } from './filters/enricher'; +import { IEventData, RawEvent, IErc721Contracts } from './types'; + +export class Processor extends IEventProcessor { + constructor(protected _api: IErc721Contracts) { + super(_api); + } + + /** + * Parse events out of an ethereum block and standardizes their format + * for processing. + * @param event + * @param tokenName + * @returns an array of processed events + */ + public async process( + event: RawEvent, + tokenName?: string + ): Promise[]> { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC721, tokenName]) + ); + const kind = ParseType(event.event); + if (!kind) return []; + try { + const cwEvent = await Enrich(this._api, event.blockNumber, kind, event); + cwEvent.chain = tokenName; + return cwEvent ? [cwEvent] : []; + } catch (e) { + log.error( + `Failed to enrich event. Block number: ${event.blockNumber}, Name/Kind: ${event.event}, Error Message: ${e.message}` + ); + return []; + } + } +} diff --git a/packages/chain-events/src/chains/erc721/subscribeFunc.ts b/packages/chain-events/src/chains/erc721/subscribeFunc.ts new file mode 100644 index 00000000000..4bf7fb811cb --- /dev/null +++ b/packages/chain-events/src/chains/erc721/subscribeFunc.ts @@ -0,0 +1,146 @@ +import sleep from 'sleep-promise'; +import _ from 'underscore'; + +import { createProvider } from '../../eth'; +import { + CWEvent, + SubscribeFunc, + ISubscribeOptions, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; +import { ERC721__factory as ERC721Factory, ERC721 } from '../../contractTypes'; + +import { Subscriber } from './subscriber'; +import { Processor } from './processor'; +import { IEventData, RawEvent, IErc721Contracts } from './types'; + +export interface IErc721SubscribeOptions + extends ISubscribeOptions { + enricherConfig?; +} + +/** + * Attempts to open an API connection, retrying if it cannot be opened. + * @param ethNetworkUrl + * @param tokenAddresses + * @param tokenNames + * @param retryTimeMs + * @returns a promise resolving to an ApiPromise once the connection has been established + + */ +export async function createApi( + ethNetworkUrl: string, + tokenAddresses: string[], + tokenNames?: string[], + retryTimeMs = 10 * 1000 +): Promise { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC721]) + ); + + for (let i = 0; i < 3; ++i) { + try { + const provider = await createProvider( + ethNetworkUrl, + SupportedNetwork.ERC721 + ); + log.info(`Connection to ${ethNetworkUrl} successful!`); + + const tokenContracts = tokenAddresses.map((o) => + ERC721Factory.connect(o, provider) + ); + const deployResults: IErc721Contracts = { provider, tokens: [] }; + for (const [contract, tokenName] of _.zip(tokenContracts, tokenNames) as [ + ERC721, + string | undefined + ][]) { + try { + await contract.deployed(); + deployResults.tokens.push({ + contract, + tokenName, + }); + } catch (err) { + log.error( + `Error loading token ${contract.address} (${tokenName}): ${err.message}` + ); + } + } + return deployResults; + } catch (err) { + log.error(`Erc721 at ${ethNetworkUrl} failure: ${err.message}`); + await sleep(retryTimeMs); + log.error('Retrying connection...'); + } + } + + throw new Error( + `[${SupportedNetwork.ERC721}]: Failed to start the ERC721 listener for ${tokenAddresses} at ${ethNetworkUrl}` + ); +} + +/** + * This is the main function for edgeware event handling. It constructs a connection + * to the chain, connects all event-related modules, and initializes event handling. + * @param options + * @returns An active block subscriber. + */ +export const subscribeEvents: SubscribeFunc< + IErc721Contracts, + RawEvent, + IErc721SubscribeOptions +> = async (options) => { + const { chain, api, handlers, verbose } = options; + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC721]) + ); + // helper function that sends an event through event handlers + const handleEventFn = async ( + event: CWEvent, + tokenName?: string + ): Promise => { + event.chain = (tokenName as never) || chain; + event.received = Date.now(); + let prevResult = null; + for (const handler of handlers) { + try { + // pass result of last handler into next one (chaining db events) + prevResult = await handler.handle(event, prevResult); + } catch (err) { + log.error(`Event handle failure: ${err.message}`); + break; + } + } + }; + + // helper function that sends a block through the event processor and + // into the event handlers + const processor = new Processor(api); + const processEventFn = async ( + event: RawEvent, + tokenName?: string + ): Promise => { + // retrieve events from block + const cwEvents: CWEvent[] = await processor.process(event); + + // process events in sequence + for (const cwEvent of cwEvents) { + await handleEventFn(cwEvent, tokenName); + } + }; + + const subscriber = new Subscriber(api, chain, verbose); + + // helper function that runs after we've been offline/the server's been down, + // and attempts to fetch skipped events + + try { + log.info(`Subscribing to ERC721 contracts ${chain}...`); + await subscriber.subscribe(processEventFn); + } catch (e) { + log.error(`Subscription error: ${e.message}`); + } + + return subscriber; +}; diff --git a/packages/chain-events/src/chains/erc721/subscriber.ts b/packages/chain-events/src/chains/erc721/subscriber.ts new file mode 100644 index 00000000000..3b638f8615c --- /dev/null +++ b/packages/chain-events/src/chains/erc721/subscriber.ts @@ -0,0 +1,83 @@ +/** + * Fetches events from ERC721 contract in real time. + */ +import { Listener } from '@ethersproject/providers'; +import sleep from 'sleep-promise'; + +import { IEventSubscriber, SupportedNetwork } from '../../interfaces'; +import { ERC721__factory as ERC721Factory } from '../../contractTypes'; +import { addPrefix, factory } from '../../logging'; + +import { RawEvent, IErc721Contracts } from './types'; + +export class Subscriber extends IEventSubscriber { + private _name: string; + + private _listener: Listener | null; + + constructor(api: IErc721Contracts, name: string, verbose = false) { + super(api, verbose); + this._name = name; + } + + /** + * Initializes subscription to chain and starts emitting events. + */ + public async subscribe( + cb: (event: RawEvent, tokenName?: string) => void + ): Promise { + this._listener = (tokenName: string, event: RawEvent): void => { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC721, tokenName]) + ); + const logStr = `Received ${this._name} event: ${JSON.stringify( + event, + null, + 2 + )}.`; + // eslint-disable-next-line no-unused-expressions + this._verbose ? log.info(logStr) : log.trace(logStr); + cb(event, tokenName); + }; + this._api.tokens.forEach(({ contract, tokenName }) => + contract.on('*', this._listener.bind(this, tokenName)) + ); + } + + public unsubscribe(): void { + if (this._listener) { + this._api.tokens.forEach(({ contract }) => contract.removeAllListeners()); + this._listener = null; + } + } + + public async addNewToken( + tokenAddress: string, + tokenName?: string, + retryTimeMs = 10 * 1000, + retries = 5 + ): Promise { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.ERC721, tokenName]) + ); + const existingToken = this.api.tokens.find(({ contract }) => { + return contract.address === tokenAddress; + }); + if (existingToken) { + log.info('Token is already being monitored'); + return; + } + try { + const contract = ERC721Factory.connect(tokenAddress, this.api.provider); + await contract.deployed(); + this.api.tokens.push({ contract, tokenName }); + contract.on('*', this._listener.bind(this, tokenName)); + } catch (e) { + await sleep(retryTimeMs); + if (retries > 0) { + log.error('Retrying connection...'); + this.addNewToken(tokenAddress, tokenName, retryTimeMs, retries - 1); + } + } + } +} diff --git a/packages/chain-events/src/chains/erc721/types.ts b/packages/chain-events/src/chains/erc721/types.ts new file mode 100644 index 00000000000..248f3b61646 --- /dev/null +++ b/packages/chain-events/src/chains/erc721/types.ts @@ -0,0 +1,67 @@ +import { Web3Provider } from '@ethersproject/providers'; + +import { TypedEvent } from '../../contractTypes/commons'; +import { ERC721 } from '../../contractTypes'; + +interface IErc721Contract { + contract: ERC721; + tokenName?: string; +} + +export interface IErc721Contracts { + tokens: IErc721Contract[]; + provider: Web3Provider; +} + +export interface ListenerOptions { + url: string; + tokenAddresses: string[]; + tokenNames?: string[]; +} + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type RawEvent = TypedEvent; + +// eslint-disable-next-line no-shadow +export enum EventKind { + // Erc721 Events + Approval = 'approval', + ApprovalForAll = 'approval for all', + Transfer = 'transfer', +} + +interface IEvent { + kind: EventKind; +} + +type Address = string; +type TokenID = string; + +// Erc721 Event Interfaces +export interface IApproval extends IEvent { + kind: EventKind.Approval; + owner: Address; + approved: Address; + tokenId: TokenID; + contractAddress: Address; +} + +export interface IApprovalForAll extends IEvent { + kind: EventKind.ApprovalForAll; + owner: Address; + operator: Address; + approved: boolean; + contractAddress: Address; +} + +export interface ITransfer extends IEvent { + kind: EventKind.Transfer; + from: Address; + to: Address; + tokenId: TokenID; + contractAddress: Address; +} + +export type IEventData = IApproval | IApprovalForAll | ITransfer; + +export const EventKinds: EventKind[] = Object.values(EventKind); diff --git a/packages/chain-events/src/chains/moloch/Listener.ts b/packages/chain-events/src/chains/moloch/Listener.ts new file mode 100644 index 00000000000..b567547ae6c --- /dev/null +++ b/packages/chain-events/src/chains/moloch/Listener.ts @@ -0,0 +1,223 @@ +import EthDater from 'ethereum-block-by-date'; + +import { + CWEvent, + IDisconnectedRange, + SupportedNetwork, +} from '../../interfaces'; +import { Listener as BaseListener } from '../../Listener'; +import { addPrefix, factory } from '../../logging'; + +import { + Api, + EventKind, + IEventData, + ListenerOptions as MolochListenerOptions, + RawEvent, +} from './types'; + +import { createApi, Processor, StorageFetcher, Subscriber } from '.'; + +export class Listener extends BaseListener< + Api, + StorageFetcher, + Processor, + Subscriber, + EventKind +> { + private readonly _options: MolochListenerOptions; + + protected readonly log; + + constructor( + chain: string, + contractVersion?: 1 | 2, + contractAddress?: string, + url?: string, + skipCatchup?: boolean, + verbose?: boolean, + discoverReconnectRange?: (c: string) => Promise + ) { + super(SupportedNetwork.ERC20, chain, verbose); + + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Moloch, this._chain]) + ); + + this._options = { + url, + skipCatchup: !!skipCatchup, + contractAddress, + contractVersion: contractVersion || 1, + }; + + this.discoverReconnectRange = discoverReconnectRange; + this._subscribed = false; + } + + public async init(): Promise { + try { + this._api = await createApi( + this._options.url, + this._options.contractVersion, + this._options.contractAddress, + 10 * 1000, + this._chain + ); + } catch (error) { + this.log.error('Fatal error occurred while starting the API'); + throw error; + } + + try { + this._processor = new Processor( + this._api, + this._options.contractVersion, + this._chain + ); + this._subscriber = await new Subscriber( + this._api, + this._chain, + this._verbose + ); + } catch (error) { + this.log.error( + 'Fatal error occurred while starting the Processor, and Subscriber' + ); + throw error; + } + try { + const dater = new EthDater(this._api.provider); + this.storageFetcher = new StorageFetcher( + this._api, + this._options.contractVersion, + dater, + this._chain + ); + } catch (error) { + this.log.error( + 'Fatal error occurred while starting the Ethereum dater and storage fetcher' + ); + throw error; + } + } + + public async subscribe(): Promise { + if (!this._subscriber) { + this.log.info( + `Subscriber for ${this._chain} isn't initialized. Please run init() first!` + ); + return; + } + + // processed blocks missed during downtime + if (!this._options.skipCatchup) await this.processMissedBlocks(); + else this.log.info('Skipping event catchup on startup!'); + + try { + this.log.info( + `Subscribing Moloch contract: ${this._chain}, on url ${this._options.url}` + ); + await this._subscriber.subscribe(this.processBlock.bind(this)); + this._subscribed = true; + } catch (error) { + this.log.error(`Subscription error: ${error.message}`); + } + } + + protected async processBlock(event: RawEvent): Promise { + const { blockNumber } = event; + if (!this._lastBlockNumber || blockNumber > this._lastBlockNumber) { + this._lastBlockNumber = blockNumber; + } + + const cwEvents: CWEvent[] = await this._processor.process(event); + + // process events in sequence + for (const cwEvent of cwEvents) await this.handleEvent(cwEvent); + } + + private async processMissedBlocks(): Promise { + this.log.info(`Detected offline time, polling missed blocks...`); + + if (!this.discoverReconnectRange) { + this.log.info( + `Unable to determine offline range - No discoverReconnectRange function given` + ); + return; + } + + let offlineRange: IDisconnectedRange; + try { + // fetch the block of the last server event from database + offlineRange = await this.discoverReconnectRange(this._chain); + if (!offlineRange) { + this.log.warn(`No offline range found, skipping event catchup.`); + return; + } + } catch (error) { + this.log.error( + `Could not discover offline range: ${error.message}. Skipping event catchup.` + ); + return; + } + + // compare with default range algorithm: take last cached block in processor + // if it exists, and is more recent than the provided algorithm + // (note that on first run, we wont have a cached block/this wont do anything) + if ( + this._lastBlockNumber && + (!offlineRange || + !offlineRange.startBlock || + offlineRange.startBlock < this._lastBlockNumber) + ) { + offlineRange = { startBlock: this._lastBlockNumber }; + } + + // if we can't figure out when the last block we saw was, + // do nothing + // (i.e. don't try and fetch all events from block 0 onward) + if (!offlineRange || !offlineRange.startBlock) { + this.log.warn(`Unable to determine offline time range.`); + return; + } + + try { + const cwEvents = await this.storageFetcher.fetch(offlineRange); + + // process events in sequence + for (const event of cwEvents) { + await this.handleEvent(event as CWEvent); + } + } catch (e) { + this.log.error(`Unable to fetch events from storage: ${e.message}`); + } + } + + public async updateContractVersion(version: 1 | 2): Promise { + if (version === this._options.contractVersion) { + this.log.warn(`The contract version is already set to ${version}`); + return; + } + + this._options.contractVersion = version; + await this.init(); + // only subscribe if the listener was already subscribed before the version change + if (this._subscribed === true) await this.subscribe(); + } + + public async updateContractAddress(address: string): Promise { + if (address === this._options.contractAddress) { + this.log.warn(`The contract address is already set to ${address}`); + return; + } + + this._options.contractAddress = address; + await this.init(); + if (this._subscribed === true) await this.subscribe(); + } + + public get options(): MolochListenerOptions { + return this._options; + } +} diff --git a/packages/chain-events/src/chains/moloch/filters/enricher.ts b/packages/chain-events/src/chains/moloch/filters/enricher.ts new file mode 100644 index 00000000000..ad1c2f92347 --- /dev/null +++ b/packages/chain-events/src/chains/moloch/filters/enricher.ts @@ -0,0 +1,192 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import { Contract } from 'ethers'; +import { hexToNumberString, hexToNumber as web3HexToNumber } from 'web3-utils'; + +import { TypedEventFilter } from '../../../contractTypes/commons'; +import { Moloch1 } from '../../../contractTypes'; +import { CWEvent, SupportedNetwork } from '../../../interfaces'; +import { EventKind, RawEvent, IEventData, Api } from '../types'; + +type GetEventArgs = T extends TypedEventFilter ? Y : never; +type GetArgType< + C extends Contract, + Name extends keyof C['filters'] +> = GetEventArgs>; + +// these functions unwrap the uint type received from chain, +// which is an object like { _hex: }, into a string/number +function hexToString({ _hex: n }: { _hex: string }): string { + return hexToNumberString(n); +} + +function hexToNumber({ _hex: n }: { _hex: string }): number { + return web3HexToNumber(n); +} + +/** + * This is an "enricher" function, whose goal is to augment the initial event data + * received from the "system.events" query with additional useful information, as + * described in the event's interface in our "types.ts" file. + * + * Once fetched, the function marshalls the event data and the additional information + * into the interface, and returns a fully-formed event, ready for database storage. + */ +export async function Enrich( + version: 1 | 2, + api: Api, + blockNumber: number, + kind: EventKind, + rawData: RawEvent +): Promise> { + switch (kind) { + case EventKind.SubmitProposal: { + const { + proposalIndex, + delegateKey, + memberAddress, + applicant, + tokenTribute, + sharesRequested, + } = rawData.args as GetArgType; + // TODO: pull these out into class, perhaps + const proposal = await (api as Moloch1).proposalQueue(proposalIndex); + const startingPeriod = +proposal.startingPeriod; + const { details } = proposal; + const periodDuration = +(await api.periodDuration()); + const summoningTime = +(await api.summoningTime()); + return { + blockNumber, + excludeAddresses: [memberAddress], + network: SupportedNetwork.Moloch, + data: { + kind, + proposalIndex: hexToNumber(proposalIndex), + delegateKey, + member: memberAddress, + applicant, + tokenTribute: hexToString(tokenTribute), + sharesRequested: hexToString(sharesRequested), + details, + startTime: summoningTime + startingPeriod * periodDuration, + }, + }; + } + case EventKind.SubmitVote: { + const { + proposalIndex, + delegateKey, + memberAddress, + uintVote, + } = rawData.args as GetArgType; + const member = await (api as Moloch1).members(memberAddress); + return { + blockNumber, + excludeAddresses: [memberAddress], + network: SupportedNetwork.Moloch, + data: { + kind, + proposalIndex: hexToNumber(proposalIndex), + delegateKey, + member: memberAddress, + vote: uintVote, + shares: member.shares.toString(), + highestIndexYesVote: +member.highestIndexYesVote, + }, + }; + } + case EventKind.ProcessProposal: { + const { + proposalIndex, + applicant, + memberAddress, + tokenTribute, + sharesRequested, + didPass, + } = rawData.args as GetArgType; + const proposal = await (api as Moloch1).proposalQueue(proposalIndex); + return { + blockNumber, + network: SupportedNetwork.Moloch, + data: { + kind, + proposalIndex: hexToNumber(proposalIndex), + applicant, + member: memberAddress, + tokenTribute: hexToString(tokenTribute), + sharesRequested: hexToString(sharesRequested), + didPass, + yesVotes: proposal.yesVotes.toString(), + noVotes: proposal.noVotes.toString(), + }, + }; + } + case EventKind.Ragequit: { + const { memberAddress, sharesToBurn } = rawData.args as GetArgType< + Moloch1, + 'Ragequit' + >; + return { + blockNumber, + excludeAddresses: [memberAddress], + network: SupportedNetwork.Moloch, + data: { + kind, + member: memberAddress, + sharesToBurn: hexToString(sharesToBurn), + }, + }; + } + case EventKind.Abort: { + const { proposalIndex, applicantAddress } = rawData.args as GetArgType< + Moloch1, + 'Abort' + >; + return { + blockNumber, + excludeAddresses: [applicantAddress], + network: SupportedNetwork.Moloch, + data: { + kind, + proposalIndex: hexToNumber(proposalIndex), + applicant: applicantAddress, + }, + }; + } + case EventKind.UpdateDelegateKey: { + const { memberAddress, newDelegateKey } = rawData.args as GetArgType< + Moloch1, + 'UpdateDelegateKey' + >; + return { + blockNumber, + // TODO: we only alert the new delegate that the key was changed + // ...is this correct? + includeAddresses: [newDelegateKey], + network: SupportedNetwork.Moloch, + data: { + kind, + member: memberAddress, + newDelegateKey, + }, + }; + } + case EventKind.SummonComplete: { + const { summoner, shares } = rawData.args as GetArgType< + Moloch1, + 'SummonComplete' + >; + return { + blockNumber, + network: SupportedNetwork.Moloch, + data: { + kind, + summoner, + shares: hexToString(shares), + }, + }; + } + default: { + throw new Error(`Unknown event kind: ${kind}`); + } + } +} diff --git a/packages/chain-events/src/chains/moloch/filters/labeler.ts b/packages/chain-events/src/chains/moloch/filters/labeler.ts new file mode 100644 index 00000000000..8bd6c201470 --- /dev/null +++ b/packages/chain-events/src/chains/moloch/filters/labeler.ts @@ -0,0 +1,94 @@ +import { + LabelerFilter, + IEventLabel, + SupportedNetwork, +} from '../../../interfaces'; +import { IEventData, EventKind } from '../types'; + +function fmtAddr(addr: string) { + if (!addr) return ''; + if (addr.length < 16) return addr; + return `${addr.slice(0, 7)}…${addr.slice(addr.length - 3)}`; +} + +/** + * This a labeler function, which takes event data and describes it in "plain english", + * such that we can display a notification regarding its contents. + */ +export const Label: LabelerFilter = ( + blockNumber: number, + chainId: string, + data: IEventData +): IEventLabel => { + switch (data.kind) { + case EventKind.SubmitProposal: + return { + heading: 'Proposal Submitted', + label: `Member ${fmtAddr(data.member)} submitted proposal with index ${ + data.proposalIndex + }.`, + linkUrl: chainId + ? `/${chainId}/proposal/molochproposal/${data.proposalIndex}` + : null, + }; + case EventKind.SubmitVote: + return { + heading: 'Vote Submitted', + label: `A vote was received on proposal ${data.proposalIndex}.`, + linkUrl: chainId + ? `/${chainId}/proposal/molochproposal/${data.proposalIndex}` + : null, + }; + case EventKind.ProcessProposal: + return { + heading: 'Proposal Processed', + label: `Proposal ${data.proposalIndex} was processed.`, + linkUrl: chainId + ? `/${chainId}/proposal/molochproposal/${data.proposalIndex}` + : null, + }; + case EventKind.Ragequit: + return { + heading: 'Member Ragequit', + label: `Member ${fmtAddr(data.member)} ragequit and burned ${ + data.sharesToBurn + } shares.`, + linkUrl: chainId ? `/${chainId}/account/${data.member}` : null, + }; + case EventKind.Abort: + return { + heading: 'Proposal Aborted', + label: `Proposal ${ + data.proposalIndex + } was aborted by applicant ${fmtAddr(data.applicant)}.`, + linkUrl: chainId + ? `/${chainId}/proposal/molochproposal/${data.proposalIndex}` + : null, + }; + case EventKind.UpdateDelegateKey: + return { + heading: 'Delegate Key Updated', + label: `Member ${fmtAddr( + data.member + )} updated their delegate to ${fmtAddr(data.newDelegateKey)}.`, + linkUrl: chainId ? `/${chainId}/account/${data.member}` : null, + }; + // this event should never appear + case EventKind.SummonComplete: + return { + heading: 'Summon Complete', + label: `Moloch is summoned, by user ${fmtAddr(data.summoner)} with ${ + data.shares + }!`, + linkUrl: chainId ? `/${chainId}/account/${data.summoner}` : null, + }; + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = data; + throw new Error( + `[${SupportedNetwork.Moloch}::${chainId}]: Unknown event type` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/moloch/filters/titler.ts b/packages/chain-events/src/chains/moloch/filters/titler.ts new file mode 100644 index 00000000000..ff6ed2d12d8 --- /dev/null +++ b/packages/chain-events/src/chains/moloch/filters/titler.ts @@ -0,0 +1,64 @@ +import { + IEventTitle, + SupportedNetwork, + TitlerFilter, +} from '../../../interfaces'; +import { EventKind } from '../types'; + +/** + * This a titler function, not to be confused with the labeler -- it takes a particular + * kind of event, and returns a "plain english" description of that type. This is used + * on the client to present a list of subscriptions that a user might want to subscribe to. + */ +export const Title: TitlerFilter = ( + kind: EventKind, + chain?: string +): IEventTitle => { + switch (kind) { + case EventKind.SubmitProposal: + return { + title: 'Proposal Submitted', + description: 'A new proposal is submitted.', + }; + case EventKind.SubmitVote: + return { + title: 'Vote Submitted', + description: 'A proposal is voted on.', + }; + case EventKind.ProcessProposal: + return { + title: 'Proposal Processed', + description: 'A proposal is completed and processed.', + }; + case EventKind.Ragequit: + return { + title: 'Member Ragequit', + description: 'A member ragequits.', + }; + case EventKind.Abort: + return { + title: 'Proposal Aborted', + description: 'A proposal is aborted by its applicant.', + }; + case EventKind.UpdateDelegateKey: + return { + title: 'Delegate Key Updated', + description: 'A member updates their delegate key.', + }; + case EventKind.SummonComplete: + return { + title: 'Summon Complete', + description: 'The contract is summoned (never emitted).', + }; + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = kind; + throw new Error( + `[${SupportedNetwork.Moloch}${ + chain ? `::${chain}` : '' + }]: Unknown event type` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/moloch/filters/type_parser.ts b/packages/chain-events/src/chains/moloch/filters/type_parser.ts new file mode 100644 index 00000000000..3a19e0eb577 --- /dev/null +++ b/packages/chain-events/src/chains/moloch/filters/type_parser.ts @@ -0,0 +1,37 @@ +import { EventKind } from '../types'; +import { addPrefix, factory } from '../../../logging'; +import { SupportedNetwork } from '../../../interfaces'; + +/** + * This is the Type Parser function, which takes a raw Event + * and determines which of our local event kinds it belongs to. + */ +export function ParseType( + version: 1 | 2, + name: string, + chain?: string +): EventKind | null { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Moloch, chain]) + ); + switch (name) { + case 'SubmitProposal': + return EventKind.SubmitProposal; + case 'SubmitVote': + return EventKind.SubmitVote; + case 'ProcessProposal': + return EventKind.ProcessProposal; + case 'Ragequit': + return EventKind.Ragequit; + case 'Abort': + return EventKind.Abort; + case 'UpdateDelegateKey': + return EventKind.UpdateDelegateKey; + case 'SummonComplete': + return EventKind.SummonComplete; + default: { + log.warn(`Unknown event name: ${name}!`); + return null; + } + } +} diff --git a/packages/chain-events/src/chains/moloch/index.ts b/packages/chain-events/src/chains/moloch/index.ts new file mode 100644 index 00000000000..0edfe6e4cdb --- /dev/null +++ b/packages/chain-events/src/chains/moloch/index.ts @@ -0,0 +1,11 @@ +export * as Types from './types'; +export * from './subscribeFunc'; +export * from './subscriber'; +export * from './processor'; +export * from './storageFetcher'; +export * from './Listener'; + +export * from './filters/enricher'; +export * from './filters/labeler'; +export * from './filters/titler'; +export * from './filters/type_parser'; diff --git a/packages/chain-events/src/chains/moloch/processor.ts b/packages/chain-events/src/chains/moloch/processor.ts new file mode 100644 index 00000000000..609850db444 --- /dev/null +++ b/packages/chain-events/src/chains/moloch/processor.ts @@ -0,0 +1,51 @@ +/** + * Processes Moloch events. + */ +import { IEventProcessor, CWEvent, SupportedNetwork } from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { ParseType } from './filters/type_parser'; +import { Enrich } from './filters/enricher'; +import { IEventData, RawEvent, Api } from './types'; + +export class Processor extends IEventProcessor { + private readonly _version: 1 | 2; + + constructor( + api: Api, + contractVersion: 1 | 2, + protected readonly chain?: string + ) { + super(api); + this._version = contractVersion; + } + + /** + * Parse events out of an edgeware block and standardizes their format + * for processing. + * @param event + * @returns an array of processed events + */ + public async process(event: RawEvent): Promise[]> { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Moloch, this.chain]) + ); + const kind = ParseType(this._version, event.event, this.chain); + if (!kind) return []; + try { + const cwEvent = await Enrich( + this._version, + this._api, + event.blockNumber, + kind, + event + ); + return [cwEvent]; + } catch (e) { + log.error( + `Failed to enrich event. Block number: ${event.blockNumber}, Name/Kind: ${event.event}, Error Message: ${e.message}` + ); + return []; + } + } +} diff --git a/packages/chain-events/src/chains/moloch/storageFetcher.ts b/packages/chain-events/src/chains/moloch/storageFetcher.ts new file mode 100644 index 00000000000..13e69c84c9e --- /dev/null +++ b/packages/chain-events/src/chains/moloch/storageFetcher.ts @@ -0,0 +1,347 @@ +import EthDater from 'ethereum-block-by-date'; + +import { + CWEvent, + IStorageFetcher, + IDisconnectedRange, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; +import { Moloch1, Moloch2 } from '../../contractTypes'; + +import { IEventData, EventKind, Api, ProposalV1, ProposalV2 } from './types'; + +export class StorageFetcher extends IStorageFetcher { + constructor( + protected readonly _api: Api, + private readonly _version: 1 | 2, + private readonly _dater: EthDater, + chain?: string + ) { + super(_api); + + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Moloch, chain]) + ); + } + + private _periodDuration: number; // 1 period in seconds + + private _summoningTime: number; // starting time of contract + + private _abortPeriod: number; + + private _votingPeriod: number; + + private _gracePeriod: number; + + private _currentBlock: number; + + private _currentTimestamp: number; + + private readonly log; + + // eslint-disable-next-line @typescript-eslint/no-unused-vars + private _isProposalV1(m: ProposalV1 | ProposalV2): m is ProposalV1 { + return this._version === 1; + } + + private async _eventsFromProposal( + index: number, + proposal: ProposalV1 | ProposalV2, + startTime: number, + startBlock: number + ): Promise[]> { + const events: CWEvent[] = []; + if (this._isProposalV1(proposal)) { + const proposedEvent: CWEvent = { + blockNumber: startBlock, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.SubmitProposal, + proposalIndex: index, + member: proposal.proposer, + applicant: proposal.applicant, + tokenTribute: proposal.tokenTribute.toString(), + sharesRequested: proposal.sharesRequested.toString(), + details: proposal.details, + startTime, + }, + }; + events.push(proposedEvent); + if (proposal.aborted) { + // derive block # from abort time + const maximalAbortTime = Math.min( + this._currentTimestamp, + (startTime + this._abortPeriod * this._periodDuration) * 1000 + ); + let blockNumber; + if (maximalAbortTime === this._currentTimestamp) { + this.log.info('Still in abort window, using current timestamp.'); + blockNumber = this._currentBlock; + } else { + this.log.info( + `Passed abort window, fetching timestamp ${maximalAbortTime}` + ); + try { + const abortBlock = await this._dater.getDate(maximalAbortTime); + blockNumber = abortBlock.block; + } catch (e) { + // fake it if we can't fetch it + this.log.error( + `Unable to fetch abort block from timestamp ${maximalAbortTime}: ${e.message}.` + ); + blockNumber = startBlock + 1; + } + } + + const abortedEvent: CWEvent = { + blockNumber, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.Abort, + proposalIndex: index, + applicant: proposal.applicant, + }, + }; + events.push(abortedEvent); + } else if (proposal.processed) { + // derive block # from process time + const minimalProcessTime = + startTime + + (this._votingPeriod + this._gracePeriod) * this._periodDuration; + this.log.info( + `Fetching minimum processed block at time ${minimalProcessTime}.` + ); + let blockNumber; + try { + const processedBlock = await this._dater.getDate( + minimalProcessTime * 1000 + ); + blockNumber = processedBlock.block; + } catch (e) { + // fake it if we can't fetch it + this.log.error( + `Unable to fetch processed block from timestamp ${minimalProcessTime}: ${e.message}.` + ); + blockNumber = startBlock + 2; + } + + const processedEvent: CWEvent = { + blockNumber, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.ProcessProposal, + proposalIndex: index, + applicant: proposal.applicant, + member: proposal.proposer, + tokenTribute: proposal.tokenTribute.toString(), + sharesRequested: proposal.sharesRequested.toString(), + didPass: proposal.didPass, + yesVotes: proposal.yesVotes.toString(), + noVotes: proposal.noVotes.toString(), + }, + }; + events.push(processedEvent); + } + } else { + // TODO: Moloch2 + return []; + } + return events; + } + + private async _initConstants() { + // we need to fetch a few constants to convert voting periods into blocks + this._periodDuration = +(await this._api.periodDuration()); + this._summoningTime = +(await this._api.summoningTime()); + this._votingPeriod = +(await this._api.votingPeriodLength()); + this._gracePeriod = +(await this._api.gracePeriodLength()); + if (this._version === 1) { + this._abortPeriod = +(await (this._api as Moloch1).abortWindow()); + } + this._currentBlock = +(await this._api.provider.getBlockNumber()); + this.log.info(`Current block: ${this._currentBlock}.`); + this._currentTimestamp = ( + await this._api.provider.getBlock(this._currentBlock) + ).timestamp; + this.log.info(`Current timestamp: ${this._currentTimestamp}.`); + } + + public async fetchOne(id: string): Promise[]> { + await this._initConstants(); + if (!this._currentBlock) { + this.log.error('Failed to fetch current block! Aborting fetch.'); + return []; + } + + // fetch actual proposal + let proposal: ProposalV1 | ProposalV2; + try { + proposal = + this._version === 1 + ? await (this._api as Moloch1).proposalQueue(id) + : await (this._api as Moloch2).proposals(id); + } catch (e) { + this.log.error(`Moloch proposal ${id} not found.`); + return []; + } + this.log.debug(`Fetched Moloch proposal ${id} from storage.`); + + // compute starting time and derive closest block number + const startingPeriod = +proposal.startingPeriod; + const proposalStartingTime = + startingPeriod * this._periodDuration + this._summoningTime; + this.log.debug(`Fetching block for timestamp ${proposalStartingTime}.`); + let proposalStartBlock: number; + try { + const block = await this._dater.getDate(proposalStartingTime * 1000); + proposalStartBlock = block.block; + this.log.debug( + `For timestamp ${block.date}, fetched ETH block #${block.block}.` + ); + } catch (e) { + this.log.error( + `Unable to fetch closest block to timestamp ${proposalStartingTime}: ${e.message}` + ); + this.log.error('Skipping proposal event fetch.'); + // eslint-disable-next-line no-continue + return []; + } + + const events = await this._eventsFromProposal( + +id, + proposal, + proposalStartingTime, + proposalStartBlock + ); + return events; + } + + /** + * Fetches all CW events relating to ChainEntities from chain (or in this case contract), + * by quering available chain/contract storage and reconstructing events. + * + * NOTE: throws on error! Make sure to wrap in try/catch! + * + * @param range Determines the range of blocks to query events within. + * @param fetchAllCompleted + */ + public async fetch( + range?: IDisconnectedRange, + fetchAllCompleted = false + ): Promise[]> { + await this._initConstants(); + if (!this._currentBlock) { + this.log.error('Failed to fetch current block! Aborting fetch.'); + return []; + } + + // populate range fully if not given + if (!range) { + range = { startBlock: 0, endBlock: this._currentBlock }; + } else if (!range.startBlock) { + range.startBlock = 0; + } else if (range.startBlock >= this._currentBlock) { + this.log.error( + `Start block ${range.startBlock} greater than current block ${this._currentBlock}!` + ); + return []; + } + if (range.endBlock && range.startBlock >= range.endBlock) { + this.log.error( + `Invalid fetch range: ${range.startBlock}-${range.endBlock}.` + ); + return []; + } + if (!range.endBlock) { + range.endBlock = this._currentBlock; + } + this.log.info( + `Fetching Moloch entities for range: ${range.startBlock}-${range.endBlock}.` + ); + + const queueLength = +(await this._api.getProposalQueueLength()); + const results: CWEvent[] = []; + + let nFetched = 0; + for (let i = 0; i < queueLength; i++) { + // work backwards through the queue, starting with the most recent + const queuePosition = queueLength - i - 1; + const proposalIndex = + this._version === 1 + ? queuePosition + : +(await (this._api as Moloch2).proposalQueue(queuePosition)); + + // fetch actual proposal + const proposal: ProposalV1 | ProposalV2 = + this._version === 1 + ? await (this._api as Moloch1).proposalQueue(proposalIndex) + : await (this._api as Moloch2).proposals(proposalIndex); + this.log.debug(`Fetched Moloch proposal ${proposalIndex} from storage.`); + + // compute starting time and derive closest block number + const startingPeriod = +proposal.startingPeriod; + const proposalStartingTime = + startingPeriod * this._periodDuration + this._summoningTime; + this.log.debug(`Fetching block for timestamp ${proposalStartingTime}.`); + let proposalStartBlock: number; + try { + const block = await this._dater.getDate(proposalStartingTime * 1000); + proposalStartBlock = block.block; + this.log.debug( + `For timestamp ${block.date}, fetched ETH block #${block.block}.` + ); + } catch (e) { + this.log.error( + `Unable to fetch closest block to timestamp ${proposalStartingTime}: ${e.message}` + ); + this.log.error('Skipping proposal event fetch.'); + // eslint-disable-next-line no-continue + continue; + } + + if ( + proposalStartBlock >= range.startBlock && + proposalStartBlock <= range.endBlock + ) { + const events = await this._eventsFromProposal( + proposalIndex, + proposal, + proposalStartingTime, + proposalStartBlock + ); + results.push(...events); + nFetched += 1; + + // halt fetch once we find a completed proposal in order to save data + // we may want to run once without this, in order to fetch backlog, or else develop a pagination + // strategy, but for now our API usage is limited. + if ( + !fetchAllCompleted && + events.find((p) => p.data.kind === EventKind.ProcessProposal) + ) { + this.log.debug( + `Proposal ${proposalIndex} is marked processed, halting fetch.` + ); + break; + } + if (range.maxResults && nFetched >= range.maxResults) { + this.log.debug(`Fetched ${nFetched} proposals, halting fetch.`); + break; + } + } else if (proposalStartBlock < range.startBlock) { + this.log.debug( + `Moloch proposal start block (${proposalStartBlock}) is before ${range.startBlock}, ending fetch.` + ); + break; + } else if (proposalStartBlock > range.endBlock) { + // keep walking backwards until within range + this.log.debug( + `Moloch proposal start block (${proposalStartBlock}) is after ${range.endBlock}, ending fetch.` + ); + } + } + return results; + } +} diff --git a/packages/chain-events/src/chains/moloch/subscribeFunc.ts b/packages/chain-events/src/chains/moloch/subscribeFunc.ts new file mode 100644 index 00000000000..b6c87dd3ced --- /dev/null +++ b/packages/chain-events/src/chains/moloch/subscribeFunc.ts @@ -0,0 +1,183 @@ +import EthDater from 'ethereum-block-by-date'; +import sleep from 'sleep-promise'; + +import { createProvider } from '../../eth'; +import { + Moloch1__factory as Moloch1Factory, + Moloch2__factory as Moloch2Factory, +} from '../../contractTypes'; +import { + IDisconnectedRange, + CWEvent, + SubscribeFunc, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { Subscriber } from './subscriber'; +import { Processor } from './processor'; +import { StorageFetcher } from './storageFetcher'; +import { IEventData, RawEvent, Api, SubscribeOptions } from './types'; + +/** + * Attempts to open an API connection, retrying if it cannot be opened. + * @returns a promise resolving to an ApiPromise once the connection has been established + * @param ethNetworkUrl + * @param contractVersion + * @param contractAddress + * @param retryTimeMs + * @param chain + */ +export async function createApi( + ethNetworkUrl: string, + contractVersion: 1 | 2, + contractAddress: string, + retryTimeMs = 10 * 1000, + chain?: string +): Promise { + // eslint-disable-next-line no-shadow + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Moloch, chain]) + ); + + for (let i = 0; i < 3; ++i) { + try { + const provider = await createProvider( + ethNetworkUrl, + SupportedNetwork.Moloch, + chain + ); + const contract = + contractVersion === 1 + ? Moloch1Factory.connect(contractAddress, provider) + : Moloch2Factory.connect(contractAddress, provider); + await contract.deployed(); + + // fetch summoning time to guarantee connected + await contract.summoningTime(); + log.info('Connection successful!'); + return contract; + } catch (err) { + log.error( + `Moloch ${contractAddress} at ${ethNetworkUrl} failure: ${err.message}` + ); + await sleep(retryTimeMs); + log.error('Retrying connection...'); + } + } + + throw new Error( + `[${SupportedNetwork.Moloch}${ + chain ? `::${chain}` : '' + }]: Failed to start Moloch listener for ${contractAddress} at ${ethNetworkUrl}` + ); +} + +/** + * This is the main function for edgeware event handling. It constructs a connection + * to the chain, connects all event-related modules, and initializes event handling. + * @param options + * @returns An active block subscriber. + */ +export const subscribeEvents: SubscribeFunc< + Api, + RawEvent, + SubscribeOptions +> = async (options) => { + const { + chain, + api, + handlers, + skipCatchup, + discoverReconnectRange, + contractVersion, + verbose, + } = options; + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Moloch, chain]) + ); + // helper function that sends an event through event handlers + const handleEventFn = async (event: CWEvent): Promise => { + let prevResult = null; + for (const handler of handlers) { + try { + event.chain = chain; + event.received = Date.now(); + // pass result of last handler into next one (chaining db events) + prevResult = await handler.handle(event, prevResult); + } catch (err) { + log.error(`Event handle failure: ${err.message}`); + break; + } + } + }; + + // helper function that sends a block through the event processor and + // into the event handlers + const processor = new Processor(api, contractVersion); + const processEventFn = async (event: RawEvent): Promise => { + // retrieve events from block + const cwEvents: CWEvent[] = await processor.process(event); + + // process events in sequence + for (const cwEvent of cwEvents) { + await handleEventFn(cwEvent); + } + }; + + const subscriber = new Subscriber(api, chain, verbose); + + // helper function that runs after we've been offline/the server's been down, + // and attempts to fetch skipped events + const pollMissedEventsFn = async (): Promise => { + if (!discoverReconnectRange) { + log.warn( + 'No function to discover offline time found, skipping event catchup.' + ); + return; + } + log.info(`Fetching missed events since last startup of ${chain}...`); + let offlineRange: IDisconnectedRange; + try { + offlineRange = await discoverReconnectRange(); + if (!offlineRange) { + log.warn('No offline range found, skipping event catchup.'); + return; + } + } catch (e) { + log.error( + `Could not discover offline range: ${e.message}. Skipping event catchup.` + ); + return; + } + + // reuse provider interface for dater function + const dater = new EthDater(api.provider); + const fetcher = new StorageFetcher(api, contractVersion, dater); + try { + const cwEvents = await fetcher.fetch(offlineRange); + + // process events in sequence + for (const cwEvent of cwEvents) { + await handleEventFn(cwEvent); + } + } catch (e) { + log.error(`Unable to fetch events from storage: ${e.message}`); + } + }; + + if (!skipCatchup) { + await pollMissedEventsFn(); + } else { + log.info('Skipping event catchup on startup!'); + } + + try { + log.info(`Subscribing to Moloch contract ${chain}...`); + await subscriber.subscribe(processEventFn); + } catch (e) { + log.error(`Subscription error: ${e.message}`); + } + + return subscriber; +}; diff --git a/packages/chain-events/src/chains/moloch/subscriber.ts b/packages/chain-events/src/chains/moloch/subscriber.ts new file mode 100644 index 00000000000..9687a4bb4cc --- /dev/null +++ b/packages/chain-events/src/chains/moloch/subscriber.ts @@ -0,0 +1,50 @@ +/** + * Fetches events from a Moloch contract in real time. + */ +import { Listener } from '@ethersproject/providers'; + +import { IEventSubscriber, SupportedNetwork } from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { RawEvent, Api } from './types'; + +export class Subscriber extends IEventSubscriber { + private _name: string; + + private _listener: Listener | null; + + private log; + + constructor(api: Api, name: string, verbose = false) { + super(api, verbose); + this._name = name; + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Moloch, this._name]) + ); + } + + /** + * Initializes subscription to chain and starts emitting events. + */ + public async subscribe(cb: (event: RawEvent) => void): Promise { + this._listener = (event: RawEvent): void => { + const logStr = `Received ${this._name} event: ${JSON.stringify( + event, + null, + 2 + )}.`; + // eslint-disable-next-line no-unused-expressions + this._verbose ? this.log.info(logStr) : this.log.trace(logStr); + cb(event); + }; + this._api.on('*', this._listener); + } + + public unsubscribe(): void { + if (this._listener) { + this.log.info(`Unsubscribing from ${this._name}`); + this._api.removeListener('*', this._listener); + this._listener = null; + } + } +} diff --git a/packages/chain-events/src/chains/moloch/types.ts b/packages/chain-events/src/chains/moloch/types.ts new file mode 100644 index 00000000000..09ed837ebc3 --- /dev/null +++ b/packages/chain-events/src/chains/moloch/types.ts @@ -0,0 +1,122 @@ +import { ISubscribeOptions } from '../../interfaces'; +import { TypedEvent } from '../../contractTypes/commons'; +import { Moloch1, Moloch2 } from '../../contractTypes'; + +type UnPromisify = T extends Promise ? U : T; +export type ProposalV1 = UnPromisify< + ReturnType +>; +export type ProposalV2 = UnPromisify< + ReturnType +>; + +export type Api = Moloch1 | Moloch2; + +// eslint-disable-next-line @typescript-eslint/no-explicit-any +export type RawEvent = TypedEvent; + +export interface SubscribeOptions extends ISubscribeOptions { + contractVersion: 1 | 2; +} + +export interface ListenerOptions { + url: string; + skipCatchup: boolean; + contractVersion: 1 | 2; + contractAddress: string; +} + +// eslint-disable-next-line no-shadow +export enum EntityKind { + Proposal = 'proposal', +} + +// eslint-disable-next-line no-shadow +export enum EventKind { + SubmitProposal = 'submit-proposal', + SubmitVote = 'submit-vote', + ProcessProposal = 'process-proposal', + Ragequit = 'ragequit', + Abort = 'abort', + UpdateDelegateKey = 'update-delegate-key', + SummonComplete = 'summon-complete', + // TODO: add V2s as needed +} + +interface IEvent { + kind: EventKind; +} + +type Address = string; +type Balance = string; + +// TODO: populate these with data members +export interface ISubmitProposal extends IEvent { + kind: EventKind.SubmitProposal; + proposalIndex: number; + delegateKey?: Address; + member: Address; + applicant: Address; + tokenTribute: Balance; + sharesRequested: Balance; + details: string; + startTime: number; +} + +export interface ISubmitVote extends IEvent { + kind: EventKind.SubmitVote; + proposalIndex: number; + delegateKey: Address; + member: Address; + vote: number; + shares: string; + highestIndexYesVote: number; +} + +export interface IProcessProposal extends IEvent { + kind: EventKind.ProcessProposal; + proposalIndex: number; + applicant: Address; + member: Address; + tokenTribute: Balance; + sharesRequested: Balance; + didPass: boolean; + yesVotes: string; + noVotes: string; +} + +export interface IRagequit extends IEvent { + kind: EventKind.Ragequit; + member: Address; + sharesToBurn: Balance; +} + +export interface IAbort extends IEvent { + kind: EventKind.Abort; + proposalIndex: number; + applicant: Address; +} + +export interface IUpdateDelegateKey extends IEvent { + kind: EventKind.UpdateDelegateKey; + member: Address; + newDelegateKey: Address; +} + +export interface ISummonComplete extends IEvent { + kind: EventKind.SummonComplete; + summoner: Address; + shares: Balance; +} + +export type IEventData = + | ISubmitProposal + | ISubmitVote + | IProcessProposal + | IRagequit + | IAbort + | IUpdateDelegateKey + | ISummonComplete; +// eslint-disable-next-line semi-style + +export const EventKinds: EventKind[] = Object.values(EventKind); diff --git a/packages/chain-events/src/chains/substrate/Listener.ts b/packages/chain-events/src/chains/substrate/Listener.ts new file mode 100644 index 00000000000..8fddac5d972 --- /dev/null +++ b/packages/chain-events/src/chains/substrate/Listener.ts @@ -0,0 +1,224 @@ +import { ApiPromise } from '@polkadot/api'; +import { RegisteredTypes } from '@polkadot/types/types'; + +import { + CWEvent, + IDisconnectedRange, + IEventPoller, + SupportedNetwork, +} from '../../interfaces'; +import { Listener as BaseListener } from '../../Listener'; +import { addPrefix, factory } from '../../logging'; + +import { Block, EventKind, ISubstrateListenerOptions } from './types'; + +import { + createApi, + EnricherConfig, + Poller, + Processor, + StorageFetcher, + Subscriber, +} from './index'; + +// TODO: archival support +export class Listener extends BaseListener< + ApiPromise, + StorageFetcher, + Processor, + Subscriber, + EventKind +> { + private readonly _options: ISubstrateListenerOptions; + + private _poller: IEventPoller; + + protected readonly log; + + constructor( + chain: string, + url?: string, + spec?: RegisteredTypes, + archival?: boolean, + startBlock?: number, + skipCatchup?: boolean, + enricherConfig?: EnricherConfig, + verbose?: boolean, + discoverReconnectRange?: (c: string) => Promise + ) { + super(SupportedNetwork.Substrate, chain, verbose); + + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Substrate, this._chain]) + ); + + this._options = { + archival: !!archival, + startBlock: startBlock ?? 0, + url, + spec: spec || {}, + skipCatchup: !!skipCatchup, + enricherConfig: enricherConfig || {}, + }; + + this.discoverReconnectRange = discoverReconnectRange; + this._subscribed = false; + } + + public async init(): Promise { + try { + this._api = await createApi( + this._options.url, + this._options.spec, + this._chain + ); + + this._api.on('connected', this.processMissedBlocks); + } catch (error) { + this.log.error(`Fatal error occurred while starting the API`); + throw error; + } + + try { + this._poller = new Poller(this._api, this._chain); + this._processor = new Processor( + this._api, + this._options.enricherConfig, + this._chain + ); + this.storageFetcher = new StorageFetcher(this._api, this._chain); + this._subscriber = await new Subscriber( + this._api, + this._verbose, + this._chain + ); + } catch (error) { + this.log.error( + `Fatal error occurred while starting the Poller, Processor, Subscriber, and Fetcher` + ); + throw error; + } + } + + public async subscribe(): Promise { + if (!this._subscriber) { + this.log.warn(`Subscriber isn't initialized. Please run init() first!`); + return; + } + + // processed blocks missed during downtime + if (!this.options.skipCatchup) await this.processMissedBlocks(); + else this.log.info(`Skipping event catchup on startup!`); + + try { + this.log.info( + `Subscribing to ${this._chain} on url ${this._options.url}` + ); + await this._subscriber.subscribe(this.processBlock.bind(this)); + this._subscribed = true; + } catch (error) { + this.log.error(`Subscription error`, error.message); + } + } + + private async processMissedBlocks(): Promise { + this.log.info(`Detected offline time, polling missed blocks...`); + + if (!this.discoverReconnectRange) { + this.log.info( + `Unable to determine offline range - No discoverReconnectRange function given` + ); + return; + } + + let offlineRange: IDisconnectedRange; + try { + // fetch the block of the last server event from database + offlineRange = await this.discoverReconnectRange(this._chain); + if (!offlineRange) { + this.log.warn(`No offline range found, skipping event catchup.`); + return; + } + } catch (error) { + this.log.error( + `Could not discover offline range: ${error.message}. Skipping event catchup.` + ); + return; + } + + // compare with default range algorithm: take last cached block in processor + // if it exists, and is more recent than the provided algorithm + // (note that on first run, we wont have a cached block/this wont do anything) + if ( + this._lastBlockNumber && + (!offlineRange || + !offlineRange.startBlock || + offlineRange.startBlock < this._lastBlockNumber) + ) { + offlineRange = { startBlock: this._lastBlockNumber }; + } + + // if we can't figure out when the last block we saw was, + // do nothing + // (i.e. don't try and fetch all events from block 0 onward) + if (!offlineRange || !offlineRange.startBlock) { + this.log.warn(`Unable to determine offline time range.`); + return; + } + + try { + const blocks = await this.getBlocks( + offlineRange.startBlock, + offlineRange.endBlock + ); + await Promise.all(blocks.map(this.processBlock, this)); + } catch (error) { + this.log.error( + `Block polling failed after disconnect at block ${offlineRange.startBlock}`, + error + ); + } + } + + public async getBlocks( + startBlock: number, + endBlock?: number + ): Promise { + return this._poller.poll({ startBlock, endBlock }); + } + + public async updateSpec(spec: RegisteredTypes): Promise { + // set the new spec + this._options.spec = spec; + + // restart api with new spec + await this.init(); + if (this._subscribed === true) await this.subscribe(); + } + + public async updateUrl(url: string): Promise { + this._options.url = url; + + // restart api with new url + await this.init(); + if (this._subscribed === true) await this.subscribe(); + } + + protected async processBlock(block: Block): Promise { + // cache block number if needed for disconnection purposes + const blockNumber = +block.header.number; + if (!this._lastBlockNumber || blockNumber > this._lastBlockNumber) { + this._lastBlockNumber = blockNumber; + } + + const events: CWEvent[] = await this._processor.process(block); + + for (const event of events) { + await this.handleEvent(event as any); + } + } + + public get options(): ISubstrateListenerOptions { + return this._options; + } +} diff --git a/packages/chain-events/src/chains/substrate/filters/enricher.ts b/packages/chain-events/src/chains/substrate/filters/enricher.ts new file mode 100644 index 00000000000..a1fc558503c --- /dev/null +++ b/packages/chain-events/src/chains/substrate/filters/enricher.ts @@ -0,0 +1,1330 @@ +import { ApiPromise } from '@polkadot/api'; +import { + Event, + ReferendumInfoTo239, + AccountId, + TreasuryProposal, + Balance, + PropIndex, + Proposal, + ReferendumIndex, + ProposalIndex, + VoteThreshold, + Hash, + BlockNumber, + Extrinsic, + ReferendumInfo, + ValidatorId, + Exposure, + AuthorityId, + IdentificationTuple, + AccountVote, + BountyIndex, + BalanceOf, +} from '@polkadot/types/interfaces'; +import { + Option, + bool, + Vec, + u32, + u64, + Compact, + StorageKey, + Bytes, +} from '@polkadot/types'; +import { Codec, AnyTuple } from '@polkadot/types/types'; +import { hexToString } from '@polkadot/util'; +import { filter } from 'lodash'; +import { + Kind, + OpaqueTimeSlot, + OffenceDetails, +} from '@polkadot/types/interfaces/offences'; + +import { CWEvent, SupportedNetwork } from '../../../interfaces'; +import { + EventKind, + IEventData, + isEvent, + parseJudgement, + IdentityJudgement, + ActiveExposure, +} from '../types'; +import { currentPoints } from '../utils/currentPoint'; + +export interface EnricherConfig { + // if a balance transfer > (totalIssuance * balanceTransferThresholdPermill / 1_000_000) + // then emit an event, otherwise do not emit for balance transfer. + // Set to 0 or undefined to emit for all balance transfers. + balanceTransferThresholdPermill?: number; +} + +/** + * This is an "enricher" function, whose goal is to augment the initial event data + * received from the "system.events" query with additional useful information, as + * described in the event's interface in our "types.ts" file. + * + * Once fetched, the function marshalls the event data and the additional information + * into the interface, and returns a fully-formed event, ready for database storage. + */ + +export async function Enrich( + api: ApiPromise, + blockNumber: number, + kind: EventKind, + rawData: Event | Extrinsic, + config: EnricherConfig = {} +): Promise> { + const extractEventData = async ( + event: Event + ): Promise<{ + data: IEventData; + includeAddresses?: string[]; + excludeAddresses?: string[]; + }> => { + switch (kind) { + case EventKind.BalanceTransfer: { + const [sender, dest, value] = (event.data as unknown) as [ + AccountId, + AccountId, + Balance + ] & + Codec; + + // TODO: we may want to consider passing a hard threshold rather than recomputing it every + // time, in order to save on queries for chains with a large amount of transfers. + const totalIssuance = await api.query.balances.totalIssuance(); + + // only emit to everyone if transfer is 0 or above the configuration threshold + const shouldEmitToAll = + !config.balanceTransferThresholdPermill || + value + .muln(1_000_000) + .divn(config.balanceTransferThresholdPermill) + .gte(totalIssuance); + + // skip this event if the transfer value isn't above the threshold + if (!shouldEmitToAll) return null; + + // should not notify sender or recipient + const excludeAddresses = [sender.toString(), dest.toString()]; + + return { + excludeAddresses, + data: { + kind, + sender: sender.toString(), + dest: dest.toString(), + value: value.toString(), + }, + }; + } + + /** + * ImOnline Events + */ + case EventKind.HeartbeatReceived: { + const [authorityId] = (event.data as unknown) as [AuthorityId] & Codec; + return { + data: { + kind, + authorityId: authorityId.toString(), + }, + }; + } + + case EventKind.SomeOffline: { + const hash = await api.rpc.chain.getBlockHash(blockNumber); + const sessionIndex = await api.query.session.currentIndex.at(hash); + const [validators] = (event.data as unknown) as [ + Vec + ]; + return { + data: { + kind, + sessionIndex: +sessionIndex - 1, + validators: validators?.map((v) => v.toString()), + }, + }; + } + case EventKind.AllGood: { + const hash = await api.rpc.chain.getBlockHash(blockNumber); + const sessionIndex = await api.query.session.currentIndex.at(hash); + const validators = await api.query.session.validators.at(hash); + return { + data: { + kind, + sessionIndex: +sessionIndex - 1, + validators: validators?.map((v) => v.toString()), + }, + }; + } + + /** + * Offences Events + */ + case EventKind.Offence: { + const [ + offenceKind, + opaqueTimeSlot, + applied, + ] = (event.data as unknown) as [Kind, OpaqueTimeSlot, bool]; + const reportIds = await api.query.offences.concurrentReportsIndex( + offenceKind, + opaqueTimeSlot + ); + const offenceDetails: Option< + OffenceDetails + >[] = await api.query.offences.reports.multi(reportIds); + + const allOffenders: Array = offenceDetails.map( + (offence) => { + return offence.isSome ? offence.unwrap().offender[0] : null; + } + ); + const offenders: Array = filter(allOffenders, null); + return { + data: { + kind, + offenceKind: offenceKind.toString(), + opaqueTimeSlot: opaqueTimeSlot.toString(), + applied: applied?.isTrue, + offenders: offenders.map((offender) => offender.toString()), + }, + }; + } + /** + * Session Events + */ + case EventKind.NewSession: { + const hash = await api.rpc.chain.getBlockHash(blockNumber); + const sessionIndex = await api.query.session.currentIndex.at(hash); + const validators = await api.query.session.validators.at(hash); + + // get era of current block + const rawCurrentEra = await api.query.staking.currentEra.at(hash); + const currentEra = + rawCurrentEra instanceof Option + ? rawCurrentEra.unwrap() + : rawCurrentEra; + + // get the nextElected Validators + const keys: StorageKey[] = api.query.staking.erasStakers + ? // for version >= 38 + await api.query.staking.erasStakers.keysAt(hash, currentEra) + : // for version = 31 + await api.query.staking.stakers.keysAt(hash); + + const nextElected = + keys?.length > 0 + ? keys.map((key) => key.args[key.args.length - 1].toString()) + : validators.map((v) => v.toString()); + + // get current stashes + const stashes = await api.query.staking.validators.keysAt(hash); + + // find waiting validators + const stashesStr = stashes + .filter((v) => v.args.length > 0) + .map((v) => v.args[0].toString()); + const waiting = stashesStr.filter((v) => !nextElected.includes(v)); + + // get validators current era reward points + const validatorEraPoints = await currentPoints( + api, + currentEra, + hash, + validators + ); + + // populate per-validator information + const validatorInfo = {}; + for (const validator of validators) { + const key = validator.toString(); + + // get commissions + const preference = api.query.staking.erasValidatorPrefs + ? // for version >= 38 + await api.query.staking.erasValidatorPrefs.at( + hash, + currentEra, + key + ) + : // for version == 31 + await api.query.staking.validators.at(hash, key); + + const commissionPer = (+preference.commission || 0) / 10_000_000; + + const rewardDestination = await api.query.staking.payee.at(hash, key); + const controllerId = await api.query.staking.bonded.at(hash, key); + + validatorInfo[key] = { + commissionPer, + controllerId: controllerId.isSome + ? controllerId.unwrap().toString() + : key, + rewardDestination, + eraPoints: validatorEraPoints[key] ?? 0, + }; + } + + // populate exposures + const activeExposures: ActiveExposure = {}; + if (validators && currentEra) { + // if currentEra isn't empty + await Promise.all( + validators.map(async (validator) => { + const tmpExposure: Exposure = api.query.staking.erasStakers + ? await api.query.staking.erasStakers.at( + hash, + currentEra, + validator + ) + : await api.query.staking.stakers.at(hash, validator); + + activeExposures[validator.toString()] = { + own: +tmpExposure.own, + total: +tmpExposure.total, + others: tmpExposure.others.map((exp) => ({ + who: exp.who.toString(), + value: exp.value.toString(), + })), + }; + }) + ); + } + return { + data: { + kind, + activeExposures, + active: validators?.map((v) => v.toString()), + waiting, + sessionIndex: +sessionIndex, + currentEra: +currentEra, + validatorInfo, + }, + }; + } + + /** + * Staking Events + */ + case EventKind.Reward: { + if (event.data.typeDef[0].type === 'Balance') { + // edgeware/old event + const [amount] = (event.data as unknown) as [Balance, Balance] & + Codec; + return { + data: { + kind, + amount: amount.toString(), + }, + }; + } + // kusama/new event + const [validator, amount] = (event.data as unknown) as [ + AccountId, + Balance + ] & + Codec; + return { + includeAddresses: [validator.toString()], + data: { + kind, + validator: validator.toString(), + amount: amount.toString(), + }, + }; + } + case EventKind.Slash: { + const [validator, amount] = (event.data as unknown) as [ + AccountId, + Balance + ] & + Codec; + return { + includeAddresses: [validator.toString()], + data: { + kind, + validator: validator.toString(), + amount: amount.toString(), + }, + }; + } + + case EventKind.Bonded: + case EventKind.Unbonded: { + const hash = await api.rpc.chain.getBlockHash(blockNumber); + const [stash, amount] = (event.data as unknown) as [ + AccountId, + Balance + ] & + Codec; + const controllerOpt = await api.query.staking.bonded.at< + Option + >(hash, stash); + if (!controllerOpt.isSome) { + throw new Error( + `could not fetch staking controller for ${stash.toString()}` + ); + } + return { + includeAddresses: [stash.toString()], + data: { + kind, + stash: stash.toString(), + amount: amount.toString(), + controller: controllerOpt.unwrap().toString(), + }, + }; + } + case EventKind.StakingElection: { + const era = await api.query.staking.activeEra(); + const validators = await api.derive.staking.validators(); + return { + data: { + kind, + era: +era, + validators: validators.validators?.map((v) => v.toString()), + }, + }; + } + + /** + * Democracy Events + */ + case EventKind.VoteDelegated: { + const [who, target] = (event.data as unknown) as [ + AccountId, + AccountId + ] & + Codec; + return { + includeAddresses: [target.toString()], + data: { + kind, + who: who.toString(), + target: target.toString(), + }, + }; + } + + case EventKind.DemocracyProposed: { + const [proposalIndex, deposit] = (event.data as unknown) as [ + PropIndex, + Balance + ] & + Codec; + const props = await api.query.democracy.publicProps(); + const prop = props.find( + (p) => p.length > 0 && +p[0] === +proposalIndex + ); + if (!prop) { + throw new Error( + `could not fetch info for proposal ${+proposalIndex}` + ); + } + const [, hash, proposer] = prop; + return { + excludeAddresses: [proposer.toString()], + data: { + kind, + proposalIndex: +proposalIndex, + proposalHash: hash.toString(), + deposit: deposit.toString(), + proposer: proposer.toString(), + }, + }; + } + + case EventKind.DemocracyTabled: { + const [proposalIndex] = (event.data as unknown) as [ + PropIndex, + Balance, + Vec + ] & + Codec; + return { + data: { + kind, + proposalIndex: +proposalIndex, + }, + }; + } + + case EventKind.DemocracyStarted: { + const [referendumIndex, voteThreshold] = (event.data as unknown) as [ + ReferendumIndex, + VoteThreshold + ] & + Codec; + const infoOpt = await api.query.democracy.referendumInfoOf< + Option + >(referendumIndex); + if (!infoOpt.isSome) { + throw new Error( + `could not find info for referendum ${+referendumIndex}` + ); + } + if ((infoOpt.unwrap() as ReferendumInfo).isOngoing) { + // kusama + const info = infoOpt.unwrap() as ReferendumInfo; + if (!info.isOngoing) { + throw new Error( + `kusama referendum ${+referendumIndex} not in ongoing state` + ); + } + return { + data: { + kind, + referendumIndex: +referendumIndex, + proposalHash: info.asOngoing.proposalHash.toString(), + voteThreshold: voteThreshold.toString(), + endBlock: +info.asOngoing.end, + }, + }; + } + // edgeware + const info = infoOpt.unwrap() as ReferendumInfoTo239; + return { + data: { + kind, + referendumIndex: +referendumIndex, + proposalHash: info.proposalHash.toString(), + voteThreshold: voteThreshold.toString(), + endBlock: +info.end, + }, + }; + } + + case EventKind.DemocracyPassed: { + const [referendumIndex] = (event.data as unknown) as [ReferendumIndex] & + Codec; + // dispatch queue -- if not present, it was already executed + const dispatchQueue = await api.derive.democracy.dispatchQueue(); + const dispatchInfo = dispatchQueue.find( + ({ index }) => +index === +referendumIndex + ); + return { + data: { + kind, + referendumIndex: +referendumIndex, + dispatchBlock: dispatchInfo ? +dispatchInfo.at : null, + }, + }; + } + + case EventKind.DemocracyNotPassed: + case EventKind.DemocracyCancelled: { + const [referendumIndex] = (event.data as unknown) as [ReferendumIndex] & + Codec; + return { + data: { + kind, + referendumIndex: +referendumIndex, + }, + }; + } + + case EventKind.DemocracyExecuted: { + const [referendumIndex, executionOk] = (event.data as unknown) as [ + ReferendumIndex, + bool + ] & + Codec; + return { + data: { + kind, + referendumIndex: +referendumIndex, + executionOk: executionOk.isTrue, + }, + }; + } + + /** + * Preimage Events + */ + case EventKind.PreimageNoted: { + const [hash, noter] = (event.data as unknown) as [ + Hash, + AccountId, + Balance + ] & + Codec; + const image = await api.derive.democracy.preimage(hash); + if (!image || !image.proposal) { + throw new Error( + `could not find info for preimage ${hash.toString()}` + ); + } + return { + excludeAddresses: [noter.toString()], + data: { + kind, + proposalHash: hash.toString(), + noter: noter.toString(), + preimage: { + method: image.proposal.method, + section: image.proposal.section, + args: image.proposal.args.map((a) => a.toString()), + }, + }, + }; + } + case EventKind.PreimageUsed: { + const [hash, noter] = (event.data as unknown) as [ + Hash, + AccountId, + Balance + ] & + Codec; + return { + data: { + kind, + proposalHash: hash.toString(), + noter: noter.toString(), + }, + }; + } + case EventKind.PreimageInvalid: + case EventKind.PreimageMissing: { + const [hash, referendumIndex] = (event.data as unknown) as [ + Hash, + ReferendumIndex + ] & + Codec; + return { + data: { + kind, + proposalHash: hash.toString(), + referendumIndex: +referendumIndex, + }, + }; + } + case EventKind.PreimageReaped: { + const [hash, noter, , reaper] = (event.data as unknown) as [ + Hash, + AccountId, + Balance, + AccountId + ] & + Codec; + return { + excludeAddresses: [reaper.toString()], + data: { + kind, + proposalHash: hash.toString(), + noter: noter.toString(), + reaper: reaper.toString(), + }, + }; + } + + /** + * Tip Events + */ + case EventKind.NewTip: { + const [hash] = (event.data as unknown) as [Hash] & Codec; + const tip = await api.query.tips.tips(hash); + if (!tip.isSome) { + throw new Error(`Could not find tip: ${hash.toString()}`); + } + const { + reason: reasonHash, + who, + finder, + deposit, + findersFee, + } = tip.unwrap(); + const reasonOpt = await api.query.tips.reasons(reasonHash); + if (!reasonOpt.isSome) { + throw new Error( + `Could not find reason for tip: ${reasonHash.toString()}` + ); + } + return { + data: { + kind, + proposalHash: hash.toString(), + // TODO: verify this reason string unmarshals correctly + reason: hexToString(reasonOpt.unwrap().toString()), + who: who.toString(), + finder: finder.toString(), + deposit: deposit.toString(), + findersFee: findersFee.valueOf(), + }, + }; + } + case EventKind.TipClosing: { + const [hash] = (event.data as unknown) as [Hash] & Codec; + const tip = await api.query.tips.tips(hash); + if (!tip.isSome) { + throw new Error(`Could not find tip: ${hash.toString()}`); + } + return { + data: { + kind, + proposalHash: hash.toString(), + closing: +tip.unwrap().closes.unwrap(), + }, + }; + } + case EventKind.TipClosed: { + const [hash, accountId, balance] = (event.data as unknown) as [ + Hash, + AccountId, + Balance + ] & + Codec; + return { + data: { + kind, + proposalHash: hash.toString(), + who: accountId.toString(), + payout: balance.toString(), + }, + }; + } + case EventKind.TipRetracted: { + const [hash] = (event.data as unknown) as [Hash] & Codec; + return { + data: { + kind, + proposalHash: hash.toString(), + }, + }; + } + case EventKind.TipSlashed: { + const [hash, accountId, balance] = (event.data as unknown) as [ + Hash, + AccountId, + Balance + ] & + Codec; + return { + data: { + kind, + proposalHash: hash.toString(), + finder: accountId.toString(), + deposit: balance.toString(), + }, + }; + } + + /** + * Treasury Events + */ + case EventKind.TreasuryProposed: { + const [proposalIndex] = (event.data as unknown) as [ProposalIndex] & + Codec; + const proposalOpt = await api.query.treasury.proposals< + Option + >(proposalIndex); + + if (!proposalOpt.isSome) { + throw new Error( + `could not fetch treasury proposal index ${+proposalIndex}` + ); + } + const proposal = proposalOpt.unwrap(); + return { + excludeAddresses: [proposal.proposer.toString()], + data: { + kind, + proposalIndex: +proposalIndex, + proposer: proposal.proposer.toString(), + value: proposal.value.toString(), + beneficiary: proposal.beneficiary.toString(), + bond: proposal.bond.toString(), + }, + }; + } + + case EventKind.TreasuryAwarded: { + const [ + proposalIndex, + amount, + beneficiary, + ] = (event.data as unknown) as [ProposalIndex, Balance, AccountId] & + Codec; + return { + data: { + kind, + proposalIndex: +proposalIndex, + value: amount.toString(), + beneficiary: beneficiary.toString(), + }, + }; + } + + case EventKind.TreasuryRejected: { + const [proposalIndex] = (event.data as unknown) as [ProposalIndex] & + Codec; + return { + data: { + kind, + proposalIndex: +proposalIndex, + }, + }; + } + + /** + * Bounty Events + */ + + case EventKind.TreasuryBountyProposed: { + const [bountyIndex] = (event.data as unknown) as [BountyIndex] & Codec; + const bounties = await api.derive.bounties.bounties(); + if (!bounties) { + throw new Error(`could not fetch bounties`); + } + const bounty = bounties.find((b) => +b.index === +bountyIndex); + if (!bounty) { + throw new Error(`could not find bounty`); + } + return { + data: { + kind, + bountyIndex: +bountyIndex, + proposer: bounty.bounty.proposer.toString(), + value: bounty.bounty.value.toString(), + fee: bounty.bounty.fee.toString(), + curatorDeposit: bounty.bounty.curatorDeposit.toString(), + bond: bounty.bounty.bond.toString(), + description: bounty.description, + }, + }; + } + + case EventKind.TreasuryBountyAwarded: { + const [bountyIndex, beneficiary] = (event.data as unknown) as [ + BountyIndex, + AccountId + ] & + Codec; + + const bounties = await api.derive.bounties.bounties(); + if (!bounties) { + throw new Error(`could not fetch bounties`); + } + const bounty = bounties.find((b) => +b.index === +bountyIndex); + if (!bounty) { + throw new Error(`could not find bounty`); + } + if (!bounty.bounty.status.isPendingPayout) { + throw new Error(`invalid bounty status`); + } + return { + data: { + kind, + bountyIndex: +bountyIndex, + beneficiary: beneficiary.toString(), + curator: bounty.bounty.status.asPendingPayout.curator.toString(), + unlockAt: +bounty.bounty.status.asPendingPayout.unlockAt, + }, + }; + } + + case EventKind.TreasuryBountyRejected: { + const [bountyIndex, bond] = (event.data as unknown) as [ + BountyIndex, + Balance + ] & + Codec; + return { + data: { + kind, + bountyIndex: +bountyIndex, + bond: bond.toString(), + }, + }; + } + + case EventKind.TreasuryBountyClaimed: { + const [bountyIndex, payout, beneficiary] = (event.data as unknown) as [ + BountyIndex, + Balance, + AccountId + ] & + Codec; + return { + data: { + kind, + bountyIndex: +bountyIndex, + payout: payout.toString(), + beneficiary: beneficiary?.toString(), + }, + }; + } + + case EventKind.TreasuryBountyCanceled: { + const [bountyIndex] = (event.data as unknown) as [BountyIndex] & Codec; + return { + data: { + kind, + bountyIndex: +bountyIndex, + }, + }; + } + + case EventKind.TreasuryBountyBecameActive: { + const [bountyIndex] = (event.data as unknown) as [BountyIndex] & Codec; + + const bounties = await api.derive.bounties.bounties(); + if (!bounties) { + throw new Error(`could not fetch bounties`); + } + const bounty = bounties.find((b) => +b.index === +bountyIndex); + if (!bounty) { + throw new Error(`could not find bounty`); + } + if (!bounty.bounty.status.isActive) { + throw new Error(`invalid bounty status`); + } + return { + data: { + kind, + bountyIndex: +bountyIndex, + curator: bounty.bounty.status.asActive.curator.toString(), + updateDue: +bounty.bounty.status.asActive.updateDue, + }, + }; + } + + /** + * Elections Events + */ + case EventKind.ElectionNewTerm: { + const [newMembers] = (event.data as unknown) as [ + Vec<[AccountId, Balance] & Codec> + ] & + Codec; + const section = api.query.electionsPhragmen + ? 'electionsPhragmen' + : 'elections'; + const allMembers = await api.query[section].members< + Vec<[AccountId, Balance] & Codec> + >(); + const round = await api.query[section].electionRounds(); + return { + data: { + kind, + round: +round, + newMembers: newMembers.map(([who]) => who.toString()), + allMembers: allMembers.map(([who]) => who.toString()), + }, + }; + } + case EventKind.ElectionEmptyTerm: { + const section = api.query.electionsPhragmen + ? 'electionsPhragmen' + : 'elections'; + const allMembers = await api.query[section].members< + Vec<[AccountId, Balance] & Codec> + >(); + const round = await api.query[section].electionRounds(); + return { + data: { + kind, + round: +round, + members: allMembers.map(([who]) => who.toString()), + }, + }; + } + case EventKind.ElectionMemberKicked: + case EventKind.ElectionMemberRenounced: { + const [who] = (event.data as unknown) as [AccountId] & Codec; + return { + data: { + kind, + who: who.toString(), + }, + }; + } + + /** + * Collective Events + */ + case EventKind.CollectiveProposed: { + const [proposer, index, hash, threshold] = (event.data as unknown) as [ + AccountId, + ProposalIndex, + Hash, + u32 + ] & + Codec; + const proposalOpt = await api.query[event.section].proposalOf< + Option + >(hash); + if (!proposalOpt.isSome) { + throw new Error(`could not fetch method for collective proposal`); + } + return { + excludeAddresses: [proposer.toString()], + data: { + kind, + collectiveName: + event.section === 'council' || + event.section === 'technicalCommittee' + ? event.section + : undefined, + proposer: proposer.toString(), + proposalIndex: +index, + proposalHash: hash.toString(), + threshold: +threshold, + call: { + method: proposalOpt.unwrap().method, + section: proposalOpt.unwrap().section, + args: proposalOpt.unwrap().args.map((c) => c.toString()), + }, + }, + }; + } + case EventKind.CollectiveVoted: { + const [voter, hash, vote] = (event.data as unknown) as [ + AccountId, + Hash, + bool + ] & + Codec; + return { + excludeAddresses: [voter.toString()], + data: { + kind, + collectiveName: + event.section === 'council' || + event.section === 'technicalCommittee' + ? event.section + : undefined, + proposalHash: hash.toString(), + voter: voter.toString(), + vote: vote.isTrue, + }, + }; + } + case EventKind.CollectiveApproved: + case EventKind.CollectiveDisapproved: { + const [hash] = (event.data as unknown) as [Hash] & Codec; + return { + data: { + kind, + collectiveName: + event.section === 'council' || + event.section === 'technicalCommittee' + ? event.section + : undefined, + proposalHash: hash.toString(), + }, + }; + } + case EventKind.CollectiveExecuted: + case EventKind.CollectiveMemberExecuted: { + const [hash, executionOk] = (event.data as unknown) as [Hash, bool] & + Codec; + return { + data: { + kind, + collectiveName: + event.section === 'council' || + event.section === 'technicalCommittee' + ? event.section + : undefined, + proposalHash: hash.toString(), + executionOk: executionOk.isTrue, + }, + }; + } + + /** + * Signaling Events + */ + case EventKind.SignalingNewProposal: { + const [proposer, hash] = (event.data as unknown) as [AccountId, Hash] & + Codec; + const proposalInfoOpt = await api.query.signaling.proposalOf< + // eslint-disable-next-line @typescript-eslint/no-explicit-any + Option + >(hash); + if (!proposalInfoOpt.isSome) { + throw new Error(`unable to fetch signaling proposal info`); + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const voteInfoOpt = await api.query.voting.voteRecords>( + proposalInfoOpt.unwrap().vote_id + ); + if (!voteInfoOpt.isSome) { + throw new Error(`unable to fetch signaling proposal voting info`); + } + return { + excludeAddresses: [proposer.toString()], + data: { + kind, + proposer: proposer.toString(), + proposalHash: hash.toString(), + voteId: proposalInfoOpt.unwrap().vote_id.toString(), + title: proposalInfoOpt.unwrap().title.toString(), + description: proposalInfoOpt.unwrap().contents.toString(), + tallyType: voteInfoOpt.unwrap().data.tally_type.toString(), + voteType: voteInfoOpt.unwrap().data.vote_type.toString(), + choices: voteInfoOpt + .unwrap() + .outcomes.map((outcome) => outcome.toString()), + }, + }; + } + case EventKind.SignalingCommitStarted: + case EventKind.SignalingVotingStarted: { + const [hash, voteId, endBlock] = (event.data as unknown) as [ + Hash, + u64, + BlockNumber + ] & + Codec; + return { + data: { + kind, + proposalHash: hash.toString(), + voteId: voteId.toString(), + endBlock: +endBlock, + }, + }; + } + case EventKind.SignalingVotingCompleted: { + const [hash, voteId] = (event.data as unknown) as [Hash, u64] & Codec; + return { + data: { + kind, + proposalHash: hash.toString(), + voteId: voteId.toString(), + }, + }; + } + + /** + * TreasuryReward events + */ + case EventKind.TreasuryRewardMinting: { + const [pot, reward] = (event.data as unknown) as [ + Balance, + Balance, + BlockNumber + ] & + Codec; + return { + data: { + kind, + pot: pot.toString(), + reward: reward.toString(), + }, + }; + } + case EventKind.TreasuryRewardMintingV2: { + const [pot, , potAddress] = (event.data as unknown) as [ + Balance, + BlockNumber, + AccountId + ] & + Codec; + return { + data: { + kind, + pot: pot.toString(), + potAddress: potAddress.toString(), + }, + }; + } + + /** + * Identity events + */ + case EventKind.IdentitySet: { + const [who] = (event.data as unknown) as [AccountId] & Codec; + const registrationOpt = await api.query.identity.identityOf(who); + if (!registrationOpt.isSome) { + throw new Error(`unable to retrieve identity info`); + } + const { info, judgements: judgementInfo } = registrationOpt.unwrap(); + if (!info.display || !info.display.isRaw) { + throw new Error(`no display name set`); + } + const displayName = info.display.asRaw.toUtf8(); + const judgements: [string, IdentityJudgement][] = []; + if (judgementInfo.length > 0) { + const registrars = await api.query.identity.registrars(); + judgements.push( + ...judgementInfo.map(([id, judgement]): [ + string, + IdentityJudgement + ] => { + const registrarOpt = registrars[+id]; + if (!registrarOpt || !registrarOpt.isSome) { + throw new Error(`invalid judgement!`); + } + return [ + registrarOpt.unwrap().account.toString(), + parseJudgement(judgement), + ]; + }) + ); + } + return { + excludeAddresses: [who.toString()], + data: { + kind, + who: who.toString(), + displayName, + judgements, + }, + }; + } + case EventKind.JudgementGiven: { + const [who, registrarId] = (event.data as unknown) as [AccountId, u32] & + Codec; + + // convert registrar from id to address + const registrars = await api.query.identity.registrars(); + const registrarOpt = registrars[+registrarId]; + if (!registrarOpt || !registrarOpt.isSome) { + throw new Error(`unable to retrieve registrar info`); + } + const registrar = registrarOpt.unwrap().account; + + // query the actual judgement provided + const registrationOpt = await api.query.identity.identityOf(who); + if (!registrationOpt.isSome) { + throw new Error(`unable to retrieve identity info`); + } + const judgementTuple = registrationOpt + .unwrap() + .judgements.find(([id]) => +id === +registrarId); + if (!judgementTuple) { + throw new Error(`unable to find judgement`); + } + const judgement = parseJudgement(judgementTuple[1]); + return { + data: { + kind, + who: who.toString(), + registrar: registrar.toString(), + judgement, + }, + }; + } + case EventKind.IdentityCleared: { + const [who] = (event.data as unknown) as [AccountId] & Codec; + return { + excludeAddresses: [who.toString()], + data: { + kind, + who: who.toString(), + }, + }; + } + case EventKind.IdentityKilled: { + const [who] = (event.data as unknown) as [AccountId] & Codec; + return { + data: { + kind, + who: who.toString(), + }, + }; + } + default: { + throw new Error(`unknown event type: ${kind}`); + } + } + }; + + const extractExtrinsicData = async ( + extrinsic: Extrinsic + ): Promise<{ + data: IEventData; + includeAddresses?: string[]; + excludeAddresses?: string[]; + }> => { + switch (kind) { + case EventKind.DemocracySeconded: { + const voter = extrinsic.signer.toString(); + const [proposal] = extrinsic.args as [Compact]; + return { + excludeAddresses: [voter], + data: { + kind, + proposalIndex: +proposal, + who: voter, + }, + }; + } + case EventKind.DemocracyVoted: { + const voter = extrinsic.signer.toString(); + const [idx, vote] = extrinsic.args as [ + Compact, + AccountVote + ]; + if (vote.isSplit) { + throw new Error(`split votes not supported`); + } + return { + excludeAddresses: [voter], + data: { + kind, + referendumIndex: +idx, + who: voter, + isAye: vote.asStandard.vote.isAye, + conviction: vote.asStandard.vote.conviction.index, + balance: vote.asStandard.balance.toString(), + }, + }; + } + + case EventKind.ElectionCandidacySubmitted: { + const candidate = extrinsic.signer.toString(); + const section = api.query.electionsPhragmen + ? 'electionsPhragmen' + : 'elections'; + const round = await api.query[section].electionRounds(); + return { + excludeAddresses: [candidate], + data: { + kind, + round: +round, + candidate, + }, + }; + } + case EventKind.TipVoted: { + const voter = extrinsic.signer.toString(); + const [hash, value] = extrinsic.args as [Hash, Compact]; + return { + data: { + kind, + proposalHash: hash.toString(), + who: voter, + value: value.toString(), + }, + }; + } + case EventKind.TreasuryBountyExtended: { + const [idx, remark] = extrinsic.args as [BountyIndex, Bytes]; + return { + data: { + kind, + bountyIndex: +idx, + remark: hexToString(remark.toString()), + }, + }; + } + + default: { + throw new Error(`unknown event type: ${kind}`); + } + } + }; + + const eventData = await (isEvent(rawData) + ? extractEventData(rawData as Event) + : extractExtrinsicData(rawData as Extrinsic)); + return eventData + ? { ...eventData, blockNumber, network: SupportedNetwork.Substrate } + : null; +} diff --git a/packages/chain-events/src/chains/substrate/filters/labeler.ts b/packages/chain-events/src/chains/substrate/filters/labeler.ts new file mode 100644 index 00000000000..3de689b5cd9 --- /dev/null +++ b/packages/chain-events/src/chains/substrate/filters/labeler.ts @@ -0,0 +1,849 @@ +import BN from 'bn.js'; + +import { + IEventLabel, + LabelerFilter, + SupportedNetwork, +} from '../../../interfaces'; +import { BalanceString, EventKind, IEventData } from '../types'; + +function fmtAddr(addr: string) { + if (!addr) return ''; + if (addr.length < 16) return addr; + return `${addr.slice(0, 5)}…${addr.slice(addr.length - 3)}`; +} + +// ideally we shouldn't hard-code this stuff, but we need the header to appear before the chain loads +const EDG_DECIMAL = 18; +const KUSAMA_DECIMAL = 12; +const KLP_DECIMAL = 12; +const FIS_DECIMAL = 12; +const CLOVER_DECIMAL = 12; + +function formatNumberShort(num: number) { + const round = (n, digits?) => { + if (digits === undefined) digits = 2; + return Math.round(n * 10 ** digits) / 10 ** digits; + }; + + const precise = (n, digits?) => { + if (digits === undefined) digits = 3; + return n.toPrecision(digits); + }; + + // TODO: Clean this up + return num > 1_000_000_000_000 + ? `${round(num / 1_000_000_000_000)}t` + : num > 1_000_000_000 + ? `${round(num / 1_000_000_000)}b` + : num > 1_000_000 + ? `${round(num / 1_000_000)}m` + : num > 1_000 + ? `${round(num / 1_000)}k` + : num > 0.1 + ? round(num) + : num > 0.01 + ? precise(num, 2) + : num > 0.001 + ? precise(num, 1) + : num.toString(); +} + +const getDenom = (chain: string): string => { + switch (chain) { + case 'clover': + return 'CLV'; + case 'edgeware': + return 'EDG'; + case 'edgeware-local': + case 'edgeware-testnet': + return 'tEDG'; + case 'hydradx': + return 'HDX'; + case 'kusama': + return 'KSM'; + case 'kusama-local': + return 'tKSM'; + case 'kulupu': + return 'KLP'; + case 'stafi': + return 'FIS'; + case 'polkadot': + return 'DOT'; + case 'polkadot-local': + return 'tDOT'; + default: { + throw new Error(`[Substrate::${chain}]: invalid chain`); + } + } +}; + +const edgBalanceFormatter = (chain: string, balance: BalanceString): string => { + const denom = getDenom(chain); + let dollar: BN; + if (chain.startsWith('edgeware')) { + dollar = new BN(10).pow(new BN(EDG_DECIMAL)); + } else if (chain.startsWith('kusama') || chain.startsWith('polkadot')) { + dollar = new BN(10).pow(new BN(KUSAMA_DECIMAL)); + } else if (chain.startsWith('kulupu')) { + dollar = new BN(10).pow(new BN(KLP_DECIMAL)); + } else if (chain.startsWith('stafi')) { + dollar = new BN(10).pow(new BN(FIS_DECIMAL)); + } else if (chain.startsWith('clover')) { + dollar = new BN(10).pow(new BN(CLOVER_DECIMAL)); + } else { + throw new Error(`[Substrate::${chain}]: unexpected chain`); + } + const balanceDollars = new BN(balance, 10).div(dollar); + return `${formatNumberShort(+balanceDollars)} ${denom}`; +}; + +/* eslint-disable max-len */ +/** + * This a labeler function, which takes event data and describes it in "plain english", + * such that we can display a notification regarding its contents. + */ +export const Label: LabelerFilter = ( + blockNumber: number, + chainId: string, + data: IEventData +): IEventLabel => { + const balanceFormatter = (bal) => edgBalanceFormatter(chainId, bal); + switch (data.kind) { + case EventKind.BalanceTransfer: { + const { sender, dest, value } = data; + return { + heading: 'Balance Transferred', + label: `${fmtAddr(sender)} transferred ${balanceFormatter( + value + )} to ${fmtAddr(dest)}.`, + }; + } + /** + * ImOnline Events + */ + case EventKind.HeartbeatReceived: { + const { authorityId } = data; + return { + heading: 'Heartbeat Received', + label: `A heartbeat was received from ${fmtAddr(authorityId)}.`, + }; + } + case EventKind.SomeOffline: { + const { sessionIndex } = data; + return { + heading: 'Some Offline', + label: `At least one validator went offline during session ${sessionIndex}.`, + }; + } + case EventKind.AllGood: { + const { sessionIndex } = data; + return { + heading: 'All Good', + label: `No validators committed offences during session ${sessionIndex}.`, + }; + } + + /** + * Session Events + */ + case EventKind.NewSession: { + const { sessionIndex } = data; + return { + heading: 'New Session', + label: `Session ${sessionIndex.toString()} started.`, + // TODO: get link to validator page + }; + } + + /** + * Offences Events + */ + case EventKind.Offence: { + const { offenceKind, opaqueTimeSlot, applied } = data; + return { + heading: 'Offence', + label: `An offence of type ${offenceKind} was reported and ${ + applied ? 'penalties applied' : 'penalties queued' + } at time ${opaqueTimeSlot}.`, + linkUrl: chainId ? `/${chainId}/validators` : null, + }; + } + + /** + * Staking Events + */ + case EventKind.Slash: { + const { validator, amount } = data; + return { + heading: 'Validator Slashed', + label: `Validator ${fmtAddr( + validator + )} was slashed by amount ${balanceFormatter(amount)}.`, + // TODO: get link to validator page + }; + } + case EventKind.Reward: { + const { amount } = data; + return { + heading: 'Validator Rewarded', + label: data.validator + ? `Validator ${fmtAddr( + data.validator + )} was rewarded by amount ${balanceFormatter(amount)}.` + : `All validators were rewarded by amount ${balanceFormatter( + amount + )}.`, + // TODO: get link to validator page + }; + } + case EventKind.Bonded: { + const { stash, controller, amount } = data; + return { + heading: 'Bonded', + label: `${balanceFormatter(amount)} was bonded by controller ${fmtAddr( + controller + )} on stash ${fmtAddr(stash)}.`, + // TODO: should this link to controller or stash? + linkUrl: chainId ? `/${chainId}/account/${stash}` : null, + }; + } + case EventKind.Unbonded: { + const { stash, controller, amount } = data; + return { + heading: 'Bonded', + label: `${balanceFormatter( + amount + )} was unbonded by controller ${fmtAddr(controller)} on stash ${fmtAddr( + stash + )}.`, + // TODO: should this link to controller or stash? + linkUrl: chainId ? `/${chainId}/account/${stash}` : null, + }; + } + case EventKind.StakingElection: { + const { era } = data; + return { + heading: 'Staking Election', + label: `A new validator set was elected for era ${era}.`, + }; + } + + /** + * Democracy Events + */ + case EventKind.VoteDelegated: { + const { who, target } = data; + return { + heading: 'Vote Delegated', + label: `${fmtAddr(target)} received a voting delegation from ${fmtAddr( + who + )}.`, + linkUrl: chainId ? `/${chainId}/account/${who}` : null, + }; + } + case EventKind.DemocracyProposed: { + const { deposit, proposalIndex } = data; + return { + heading: 'Democracy Proposal Created', + label: `Democracy proposal ${proposalIndex} was introduced with a deposit of ${balanceFormatter( + deposit + )}.`, + linkUrl: chainId + ? `/${chainId}/proposal/democracyproposal/${proposalIndex}` + : null, + }; + } + case EventKind.DemocracySeconded: { + const { proposalIndex, who } = data; + return { + heading: 'Democracy Proposal Created', + label: `Democracy proposal ${proposalIndex} was seconded by ${fmtAddr( + who + )}.`, + linkUrl: chainId + ? `/${chainId}/proposal/democracyproposal/${proposalIndex}` + : null, + }; + } + case EventKind.DemocracyTabled: { + const { proposalIndex } = data; + return { + heading: 'Democracy Proposal Tabled', + label: `Democracy proposal ${proposalIndex} was tabled as a referendum.`, + linkUrl: chainId + ? `/${chainId}/proposal/democracyproposal/${proposalIndex}` + : null, + }; + } + case EventKind.DemocracyStarted: { + const { endBlock, referendumIndex } = data; + return { + heading: 'Democracy Referendum Started', + label: endBlock + ? `Referendum ${referendumIndex} started voting, and will be in voting until block ${endBlock}.` + : `Referendum ${referendumIndex} started voting.`, + linkUrl: chainId + ? `/${chainId}/proposal/referendum/${referendumIndex}` + : null, + }; + } + case EventKind.DemocracyVoted: { + const { referendumIndex, who, isAye } = data; + return { + heading: 'Vote Received on Democracy Referendum', + label: `Voter ${fmtAddr(who)} voted ${ + isAye ? 'Yes' : 'No' + } on referendum ${referendumIndex}.`, + linkUrl: chainId + ? `/${chainId}/proposal/referendum/${referendumIndex}` + : null, + }; + } + case EventKind.DemocracyPassed: { + const { dispatchBlock, referendumIndex } = data; + return { + heading: 'Democracy Referendum Passed', + label: dispatchBlock + ? `Referendum ${referendumIndex} passed, and will be executed on block ${dispatchBlock}.` + : `Referendum ${referendumIndex} passed, and was executed on block ${blockNumber}.`, + linkUrl: chainId + ? `/${chainId}/proposal/referendum/${referendumIndex}` + : null, + }; + } + case EventKind.DemocracyNotPassed: { + const { referendumIndex } = data; + return { + heading: 'Democracy Referendum Failed', + label: `Referendum ${referendumIndex} failed.`, + linkUrl: chainId + ? `/${chainId}/proposal/referendum/${referendumIndex}` + : null, + }; + } + case EventKind.DemocracyCancelled: { + const { referendumIndex } = data; + return { + heading: 'Democracy Referendum Cancelled', + label: `Referendum ${referendumIndex} was cancelled.`, + linkUrl: chainId + ? `/${chainId}/proposal/referendum/${referendumIndex}` + : null, + }; + } + case EventKind.DemocracyExecuted: { + const { referendumIndex, executionOk } = data; + return { + heading: 'Democracy Referendum Executed', + label: `Referendum ${referendumIndex} was executed ${ + executionOk ? 'successfully' : 'unsuccessfully' + }.`, + linkUrl: chainId + ? `/${chainId}/proposal/referendum/${referendumIndex}` + : null, + }; + } + + /** + * Preimage Events + */ + case EventKind.PreimageNoted: { + const { noter } = data; + return { + heading: 'Preimage Noted', + label: `A new preimage was provided by ${fmtAddr(noter)}.`, + // TODO: the only way to get a link to (or text regarding) the related proposal here + // requires back-referencing the proposalHash with the index we use to identify the + // proposal. + // Alternatively, if we have a preimage-specific page (which would be nice, as we could + // display info about its corresponding Call), we can link to that, or we could instead + // link to the noter's profile. + }; + } + case EventKind.PreimageUsed: { + const { noter } = data; + return { + heading: 'Preimage Used', + label: `A preimage provided by ${fmtAddr(noter)} was used.`, + // TODO: see linkUrl comment above, on PreimageNoted. + }; + } + case EventKind.PreimageInvalid: { + const { referendumIndex } = data; + return { + heading: 'Preimage Invalid', + label: `A preimage for referendum ${referendumIndex} was found to be invalid.`, + linkUrl: chainId + ? `/${chainId}/proposal/referendum/${referendumIndex}` + : null, + }; + } + case EventKind.PreimageMissing: { + const { referendumIndex } = data; + return { + heading: 'Preimage Missing', + label: `A preimage for referendum ${referendumIndex} was not found.`, + linkUrl: chainId + ? `/${chainId}/proposal/referendum/${referendumIndex}` + : null, + }; + } + case EventKind.PreimageReaped: { + const { noter, reaper } = data; + return { + heading: 'Preimage Reaped', + label: `A preimage noted by ${fmtAddr( + noter + )} was cleaned up from the chain by ${fmtAddr(reaper)}.`, + // TODO: see linkURL comment above, but also we could link to the reaper? + }; + } + + /** + * Treasury Events + */ + case EventKind.TreasuryProposed: { + const { proposalIndex, proposer, value } = data; + return { + heading: 'Treasury Proposal Created', + label: `Treasury proposal ${proposalIndex} was introduced by ${fmtAddr( + proposer + )} for ${balanceFormatter(value)}.`, + linkUrl: chainId + ? `/${chainId}/proposal/treasuryproposal/${proposalIndex}` + : null, + }; + } + case EventKind.TreasuryAwarded: { + const { proposalIndex, value, beneficiary } = data; + return { + heading: 'Treasury Proposal Awarded', + label: `Treasury proposal ${proposalIndex} was awarded to ${fmtAddr( + beneficiary + )} for ${balanceFormatter(value)}.`, + linkUrl: chainId + ? `/${chainId}/proposal/treasuryproposal/${proposalIndex}` + : null, + }; + } + case EventKind.TreasuryRejected: { + const { proposalIndex } = data; + return { + heading: 'Treasury Proposal Rejected', + label: `Treasury proposal ${proposalIndex} was rejected.`, + linkUrl: chainId + ? `/${chainId}/proposal/treasuryproposal/${proposalIndex}` + : null, + }; + } + case EventKind.TreasuryBountyProposed: { + const { bountyIndex } = data; + return { + heading: 'Treasury Bounty Proposed', + label: `Treasury bounty ${bountyIndex} was proposed.`, + linkUrl: chainId + ? `/${chainId}/proposal/treasurybounty/${bountyIndex}` + : null, + }; + } + case EventKind.TreasuryBountyAwarded: { + const { bountyIndex, beneficiary } = data; + return { + heading: 'Treasury Bounty Awarded', + label: `Treasury bounty ${bountyIndex} was awarded to ${beneficiary}.`, + linkUrl: chainId + ? `/${chainId}/proposal/treasurybounty/${bountyIndex}` + : null, + }; + } + case EventKind.TreasuryBountyRejected: { + const { bountyIndex, bond } = data; + return { + heading: 'Treasury Bounty Rejected', + label: `Treasury bounty ${bountyIndex} with bond ${bond} was rejected.`, + linkUrl: chainId + ? `/${chainId}/proposal/treasurybounty/${bountyIndex}` + : null, + }; + } + case EventKind.TreasuryBountyBecameActive: { + const { bountyIndex } = data; + return { + heading: 'Treasury Bounty Became Active', + label: `Treasury bounty ${bountyIndex} became active.`, + linkUrl: chainId + ? `/${chainId}/proposal/treasurybounty/${bountyIndex}` + : null, + }; + } + case EventKind.TreasuryBountyClaimed: { + const { bountyIndex, payout, beneficiary } = data; + return { + heading: 'Treasury Bounty Claimed', + label: `${beneficiary} claimed Treasury Bounty ${bountyIndex}, worth ${payout}.`, + linkUrl: chainId + ? `/${chainId}/proposal/treasurybounty/${bountyIndex}` + : null, + }; + } + case EventKind.TreasuryBountyCanceled: { + const { bountyIndex } = data; + return { + heading: 'Treasury Bounty Canceled', + label: `Treasury bounty ${bountyIndex} was canceled.`, + linkUrl: chainId + ? `/${chainId}/proposal/treasurybounty/${bountyIndex}` + : null, + }; + } + case EventKind.TreasuryBountyExtended: { + const { bountyIndex } = data; + return { + heading: 'Treasury Bounty Expiry Extended', + label: `Treasury bounty ${bountyIndex} expiry was extended.`, + linkUrl: chainId + ? `/${chainId}/proposal/treasurybounty/${bountyIndex}` + : null, + }; + } + + /** + * Elections Events + * + * Note: all election events simply link to the council page. + * We may want to change this if deemed unnecessary. + */ + case EventKind.ElectionNewTerm: { + const { newMembers } = data; + return { + heading: 'New Election Term Started', + label: `A new election term started with ${ + newMembers.length + } new member${newMembers.length !== 1 ? 's' : ''}.`, + // we just link to the council page here, so they can see the new members/results + linkUrl: chainId ? `/${chainId}/council/` : null, + }; + } + case EventKind.ElectionEmptyTerm: { + return { + heading: 'New Election Term Started', + label: 'A new election term started with no new members.', + linkUrl: chainId ? `/${chainId}/council/` : null, + }; + } + case EventKind.ElectionCandidacySubmitted: { + const { candidate } = data; + return { + heading: 'Council Candidate Submitted', + label: `${fmtAddr(candidate)} submitted a candidacy for council.`, + // TODO: this could also link to the member's page + linkUrl: chainId ? `/${chainId}/council` : null, + }; + } + case EventKind.ElectionMemberKicked: { + const { who } = data; + return { + heading: 'Council Member Kicked', + label: `${fmtAddr(who)} left the council.`, + // TODO: this could also link to the member's page + linkUrl: chainId ? `/${chainId}/council/` : null, + }; + } + case EventKind.ElectionMemberRenounced: { + const { who } = data; + return { + heading: 'Council Member Renounced', + label: `${fmtAddr(who)} renounced their council candidacy.`, + // TODO: this could also link to the member's page + linkUrl: chainId ? `/${chainId}/council/` : null, + }; + } + + /** + * Collective Events + */ + case EventKind.CollectiveProposed: { + const { proposer, proposalHash, threshold, collectiveName } = data; + const collective = + collectiveName && collectiveName === 'technicalCommittee' + ? 'Technical Committee' + : 'Council'; + return { + heading: `New ${collective} Proposal`, + label: `${fmtAddr( + proposer + )} introduced a new ${collective} proposal, requiring ${threshold} approvals to pass.`, + linkUrl: chainId + ? `/${chainId}/proposal/councilmotion/${proposalHash}` + : null, + }; + } + case EventKind.CollectiveVoted: { + const { vote, proposalHash, collectiveName } = data; + const collective = + collectiveName && collectiveName === 'technicalCommittee' + ? 'Technical Committee' + : 'Council'; + return { + heading: `Member Voted on ${collective} Proposal`, + label: `A council member voted ${ + vote ? 'Yes' : 'No' + } on a collective proposal.`, + linkUrl: chainId + ? `/${chainId}/proposal/councilmotion/${proposalHash}` + : null, + }; + } + case EventKind.CollectiveApproved: { + const { proposalHash, collectiveName } = data; + const collective = + collectiveName && collectiveName === 'technicalCommittee' + ? 'Technical Committee' + : 'Council'; + return { + heading: `${collective} Proposal Approved`, + label: `A ${collective} proposal was approved.`, + linkUrl: chainId + ? `/${chainId}/proposal/councilmotion/${proposalHash}` + : null, + }; + } + case EventKind.CollectiveDisapproved: { + const { collectiveName, proposalHash } = data; + const collective = + collectiveName && collectiveName === 'technicalCommittee' + ? 'Technical Committee' + : 'Council'; + return { + heading: `${collective} Proposal Disapproved`, + label: `A ${collective} proposal was disapproved.`, + linkUrl: chainId + ? `/${chainId}/proposal/councilmotion/${proposalHash}` + : null, + }; + } + case EventKind.CollectiveExecuted: { + const { executionOk, collectiveName, proposalHash } = data; + const collective = + collectiveName && collectiveName === 'technicalCommittee' + ? 'Technical Committee' + : 'Council'; + return { + heading: `${collective} Proposal Executed`, + label: `Approved ${collective} proposal was executed ${ + executionOk ? 'successfully' : 'unsuccessfully' + }.`, + linkUrl: chainId + ? `/${chainId}/proposal/councilmotion/${proposalHash}` + : null, + }; + } + case EventKind.CollectiveMemberExecuted: { + const { executionOk, collectiveName } = data; + const collective = + collectiveName && collectiveName === 'technicalCommittee' + ? 'Technical Committee' + : 'Council'; + return { + heading: `${collective} Proposal Executed`, + label: `A member-executed ${collective} proposal was executed ${ + executionOk ? 'successfully' : 'unsuccessfully' + }.`, + // no proposal link will exist, because this happens immediately, without creating a proposal + // TODO: maybe link to the executing member? + }; + } + + /** + * Signaling Events + */ + case EventKind.SignalingNewProposal: { + const { proposer, voteId } = data; + return { + heading: 'New Signaling Proposal', + label: `A new signaling proposal was created by ${fmtAddr(proposer)}.`, + linkUrl: chainId + ? `/${chainId}/proposal/signalingproposal/${voteId}` + : null, + }; + } + case EventKind.SignalingCommitStarted: { + const { endBlock, voteId } = data; + return { + heading: 'Signaling Proposal Commit Started', + label: `A signaling proposal's commit phase started, and will last until block ${endBlock}.`, + linkUrl: chainId + ? `/${chainId}/proposal/signalingproposal/${voteId}` + : null, + }; + } + case EventKind.SignalingVotingStarted: { + const { endBlock, voteId } = data; + return { + heading: 'Signaling Proposal Voting Started', + label: `A signaling proposal's voting phase started, and will last until block ${endBlock}.`, + linkUrl: chainId + ? `/${chainId}/proposal/signalingproposal/${voteId}` + : null, + }; + } + case EventKind.SignalingVotingCompleted: { + const { voteId } = data; + return { + heading: 'Signaling Proposal Completed', + label: "A signaling proposal's voting phase completed.", + linkUrl: chainId + ? `/${chainId}/proposal/signalingproposal/${voteId}` + : null, + }; + } + + /** + * Tip Events + */ + case EventKind.NewTip: { + return { + heading: 'New Tip Suggested', + label: `A new tip for ${fmtAddr(data.who)} was suggested with reason "${ + data.reason + }".`, + // TODO: fix + linkUrl: chainId + ? `/${chainId}/proposal/tip/${data.proposalHash}` + : null, + }; + } + case EventKind.TipVoted: { + return { + heading: 'Tip Voted', + label: `A tip was voted on by ${data.who} for ${balanceFormatter( + data.value + )}.`, + // TODO: fix + linkUrl: chainId + ? `/${chainId}/proposal/tip/${data.proposalHash}` + : null, + }; + } + case EventKind.TipClosing: { + return { + heading: 'Tip Closing', + label: `A tip is now closing on block ${data.closing}.`, + // TODO: fix + linkUrl: chainId + ? `/${chainId}/proposal/tip/${data.proposalHash}` + : null, + }; + } + case EventKind.TipClosed: { + return { + heading: 'Tip Closed', + label: `A tip to ${fmtAddr( + data.who + )} was paid out for ${balanceFormatter(data.payout)}.`, + // TODO: fix + linkUrl: chainId + ? `/${chainId}/proposal/tip/${data.proposalHash}` + : null, + }; + } + case EventKind.TipRetracted: { + return { + heading: 'Tip Retracted', + label: 'A tip was retracted.', + // TODO: fix + linkUrl: chainId + ? `/${chainId}/proposal/tip/${data.proposalHash}` + : null, + }; + } + case EventKind.TipSlashed: { + return { + heading: 'Tip Slashed', + label: `A tip submitted by ${fmtAddr( + data.finder + )} slashed for ${balanceFormatter(data.deposit)}`, + // TODO: fix + linkUrl: chainId + ? `/${chainId}/proposal/tip/${data.proposalHash}` + : null, + }; + } + + /** + * TreasuryReward events + */ + case EventKind.TreasuryRewardMinting: { + const { pot, reward } = data; + return { + heading: 'Treasury Reward Minted', + label: `A treasury reward of ${balanceFormatter( + reward + )} was minted. The treasury now has a balance of ${balanceFormatter( + pot + )}.`, + // TODO: link to pot? or something? + }; + } + case EventKind.TreasuryRewardMintingV2: { + const { pot } = data; + return { + heading: 'Treasury Reward Minted', + label: `A treasury reward was minted. The treasury now has a balance of ${balanceFormatter( + pot + )}.`, + // TODO: link to pot? or something? + }; + } + + /** + * Identity events + */ + case EventKind.IdentitySet: { + const { who, displayName } = data; + return { + heading: 'Identity Set', + label: `${fmtAddr( + who + )} set their identity with display name "${displayName}".`, + linkUrl: chainId ? `/${chainId}/account/${who}` : null, + }; + } + case EventKind.JudgementGiven: { + const { who, registrar, judgement } = data; + return { + heading: 'Identity Judgement Given', + label: `Registrar ${fmtAddr( + registrar + )} passed judgement '${judgement}' on ${fmtAddr(who)}.`, + linkUrl: chainId ? `/${chainId}/account/${who}` : null, + }; + } + case EventKind.IdentityCleared: { + const { who } = data; + return { + heading: 'Identity Cleared', + label: `${fmtAddr(who)} cleared their identity.`, + linkUrl: chainId ? `/${chainId}/account/${who}` : null, + }; + } + case EventKind.IdentityKilled: { + const { who } = data; + return { + heading: 'Identity Killed', + label: `${fmtAddr(who)}'s identity was removed.`, + linkUrl: chainId ? `/${chainId}/account/${who}` : null, + }; + } + + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = data; + throw new Error( + `[${SupportedNetwork.Substrate}::${chainId}]: Unknown event type` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/substrate/filters/titler.ts b/packages/chain-events/src/chains/substrate/filters/titler.ts new file mode 100644 index 00000000000..7ef21957909 --- /dev/null +++ b/packages/chain-events/src/chains/substrate/filters/titler.ts @@ -0,0 +1,458 @@ +import { + IEventTitle, + SupportedNetwork, + TitlerFilter, +} from '../../../interfaces'; +import { EventKind } from '../types'; + +/** + * This a titler function, not to be confused with the labeler -- it takes a particular + * kind of event, and returns a "plain english" description of that type. This is used + * on the client to present a list of subscriptions that a user might want to subscribe to. + */ +export const Title: TitlerFilter = ( + kind: EventKind, + chain?: string +): IEventTitle => { + switch (kind) { + case EventKind.BalanceTransfer: { + return { + title: 'Balance Transferred', + description: 'A balance transfer is performed.', + }; + } + /** + * ImOnline Events + */ + case EventKind.HeartbeatReceived: { + return { + title: 'Heartbeat Received', + description: 'A new heartbeat is received .', + }; + } + case EventKind.SomeOffline: { + return { + title: 'Some validators were offline ', + description: + 'At the end of the session, at least one validator was found to be offline.', + }; + } + case EventKind.AllGood: { + return { + title: 'All validators were online ', + description: 'At the end of the session, no offence was committed.', + }; + } + + /** + * Session Events + */ + case EventKind.NewSession: { + return { + title: 'New Session', + description: 'A new session begins.', + }; + } + + /** + * Offences Events + */ + case EventKind.Offence: { + return { + title: 'Offence Reported', + description: 'An offence of given type is reported at timeslot.', + }; + } + + /** + * Staking Events + */ + case EventKind.Slash: { + return { + title: 'Validator Slash', + description: 'Your validator is slashed.', + }; + } + case EventKind.Reward: { + return { + title: 'Validator Reward', + description: 'Your validator is rewarded.', + }; + } + case EventKind.Bonded: { + return { + title: 'Stash Bonded', + description: 'Your controller account bonds to a stash account.', + }; + } + case EventKind.Unbonded: { + return { + title: 'Stash Unbonded', + description: 'Your controller account unbonds from a stash account.', + }; + } + case EventKind.StakingElection: { + return { + title: 'Staking Election', + description: 'A new validator set is elected.', + }; + } + + /** + * Democracy Events + */ + case EventKind.VoteDelegated: { + return { + title: 'Vote Delegated', + description: 'You receive a voting delegation.', + }; + } + case EventKind.DemocracyProposed: { + return { + title: 'Democracy Proposed', + description: 'A new community democracy proposal is introduced.', + }; + } + case EventKind.DemocracySeconded: { + return { + title: 'Democracy Proposal Seconded', + description: 'A democracy proposal is seconded.', + }; + } + case EventKind.DemocracyTabled: { + return { + title: 'Democracy Proposal Tabled', + description: 'A public democracy proposal is tabled to a referendum.', + }; + } + case EventKind.DemocracyStarted: { + return { + title: 'Referendum Started', + description: 'A new democracy referendum started voting.', + }; + } + case EventKind.DemocracyVoted: { + return { + title: 'Democracy Vote Received', + description: 'A democracy vote was received.', + }; + } + case EventKind.DemocracyPassed: { + return { + title: 'Referendum Passed', + description: 'A democracy referendum finished voting and passed.', + }; + } + case EventKind.DemocracyNotPassed: { + return { + title: 'Referendum Failed', + description: 'A democracy referendum finished voting and failed.', + }; + } + case EventKind.DemocracyCancelled: { + return { + title: 'Referendum Cancelled', + description: 'A democracy referendum is cancelled.', + }; + } + case EventKind.DemocracyExecuted: { + return { + title: 'Referendum Executed', + description: 'A passed democracy referendum is executed on chain.', + }; + } + + /** + * Preimage Events + */ + case EventKind.PreimageNoted: { + return { + title: 'Preimage Noted', + description: 'A preimage is noted for a democracy referendum.', + }; + } + case EventKind.PreimageUsed: { + return { + title: 'Preimage Used', + description: "A democracy referendum's execution uses a preimage.", + }; + } + case EventKind.PreimageInvalid: { + return { + title: 'Preimage Invalid', + description: + "A democracy referendum's execution was attempted but the preimage is invalid.", + }; + } + case EventKind.PreimageMissing: { + return { + title: 'Preimage Missing', + description: + "A democracy referendum's execution was attempted but the preimage is missing.", + }; + } + case EventKind.PreimageReaped: { + return { + title: 'Preimage Reaped', + description: + 'A registered preimage is removed and the deposit is collected.', + }; + } + + /** + * Treasury Events + */ + case EventKind.TreasuryProposed: { + return { + title: 'Treasury Proposed', + description: 'A treasury spend is proposed.', + }; + } + case EventKind.TreasuryAwarded: { + return { + title: 'Treasury Awarded', + description: 'A treasury spend is awarded.', + }; + } + case EventKind.TreasuryRejected: { + return { + title: 'Treasury Rejected', + description: 'A treasury spend is rejected.', + }; + } + case EventKind.TreasuryBountyProposed: { + return { + title: 'Treasury Bounty Proposed', + description: 'A treasury bounty is proposed.', + }; + } + case EventKind.TreasuryBountyAwarded: { + return { + title: 'Treasury Bounty Awarded', + description: 'A treasury bounty is awarded.', + }; + } + case EventKind.TreasuryBountyRejected: { + return { + title: 'Treasury Bounty Rejected', + description: 'A treasury bounty is rejected.', + }; + } + case EventKind.TreasuryBountyBecameActive: { + return { + title: 'Treasury Bounty Became Active', + description: 'A treasury bounty became active.', + }; + } + case EventKind.TreasuryBountyClaimed: { + return { + title: 'Treasury Bounty Claimed', + description: 'A treasury bounty is claimed.', + }; + } + case EventKind.TreasuryBountyCanceled: { + return { + title: 'Treasury Bounty Canceled', + description: 'A treasury bounty is canceled.', + }; + } + case EventKind.TreasuryBountyExtended: { + return { + title: 'Treasury Bounty Expiry Extended', + description: "A treasury bounty's expiry is extended.", + }; + } + + /** + * Elections Events + */ + case EventKind.ElectionNewTerm: { + return { + title: 'New Election Term', + description: 'A new election term begins with new members.', + }; + } + case EventKind.ElectionEmptyTerm: { + return { + title: 'Empty Election Term', + description: 'A new election term begins with no member changes.', + }; + } + case EventKind.ElectionCandidacySubmitted: { + return { + title: 'Candidacy Submitted', + description: 'Someone submits a council candidacy.', + }; + } + case EventKind.ElectionMemberKicked: { + return { + title: 'Member Kicked', + description: 'A member is kicked at end of term.', + }; + } + case EventKind.ElectionMemberRenounced: { + return { + title: 'Member Renounced', + description: 'A member renounces their candidacy for the next round.', + }; + } + + /** + * Collective Events + */ + case EventKind.CollectiveProposed: { + return { + title: 'New Collective Proposal', + description: 'A new collective proposal is introduced.', + }; + } + case EventKind.CollectiveVoted: { + return { + title: 'Collective Proposal Vote', + description: 'A collective proposal receives a vote.', + }; + } + case EventKind.CollectiveApproved: { + return { + title: 'Collective Proposal Approved', + description: 'A collective proposal is approved.', + }; + } + case EventKind.CollectiveDisapproved: { + return { + title: 'Collective Proposal Disapproved', + description: 'A collective proposal is disapproved.', + }; + } + case EventKind.CollectiveExecuted: { + return { + title: 'Collective Proposal Executed', + description: 'A collective proposal is executed.', + }; + } + case EventKind.CollectiveMemberExecuted: { + return { + title: 'Collective Member Execution', + description: 'A collective member directly executes a proposal.', + }; + } + + /** + * Signaling Events + */ + case EventKind.SignalingNewProposal: { + return { + title: 'New Signaling Proposal', + description: 'A new signaling proposal is introduced.', + }; + } + case EventKind.SignalingCommitStarted: { + return { + title: 'Signaling Proposal Commit Started', + description: "A signaling proposal's commit phase begins.", + }; + } + case EventKind.SignalingVotingStarted: { + return { + title: 'Signaling Proposal Voting Started', + description: "A signaling proposal's voting phase begins.", + }; + } + case EventKind.SignalingVotingCompleted: { + return { + title: 'Signaling Proposal Voting Completed', + description: 'A signaling proposal is completed.', + }; + } + + /** + * Tip Events + */ + case EventKind.NewTip: { + return { + title: 'New Tip Suggested', + description: 'A new tip is opened.', + }; + } + case EventKind.TipVoted: { + return { + title: 'Tip Voted', + description: 'A tip is voted on.', + }; + } + case EventKind.TipClosing: { + return { + title: 'Tip Closing', + description: 'A tip begins closing.', + }; + } + case EventKind.TipClosed: { + return { + title: 'Tip Closed', + description: 'A tip is closed and paid out.', + }; + } + case EventKind.TipRetracted: { + return { + title: 'Tip Retracted', + description: 'A tip is retracted.', + }; + } + case EventKind.TipSlashed: { + return { + title: 'Tip Slashed', + description: 'A tip is slashed.', + }; + } + + /** + * TreasuryReward events + */ + case EventKind.TreasuryRewardMinting: + case EventKind.TreasuryRewardMintingV2: { + return { + title: 'Treasury Reward Minted', + description: 'A reward is added to the treasury pot.', + }; + } + + /** + * Identity events + */ + case EventKind.IdentitySet: { + return { + title: 'Identity Set', + description: 'A user sets an identity.', + }; + } + case EventKind.JudgementGiven: { + return { + title: 'Identity Judgement Given', + description: 'A registrar passes judgement on an identity.', + }; + } + case EventKind.IdentityCleared: { + return { + title: 'Identity Cleared', + description: 'A user clears an identity.', + }; + } + case EventKind.IdentityKilled: { + return { + title: 'Identity Killed', + description: "A user's identity is rejected.", + }; + } + + default: { + // ensure exhaustive matching -- gives ts error if missing cases + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _exhaustiveMatch: never = kind; + throw new Error( + `[${SupportedNetwork.Substrate}${ + chain ? `::${chain}` : '' + }]: unknown event type` + ); + } + } +}; diff --git a/packages/chain-events/src/chains/substrate/filters/type_parser.ts b/packages/chain-events/src/chains/substrate/filters/type_parser.ts new file mode 100644 index 00000000000..696149c520d --- /dev/null +++ b/packages/chain-events/src/chains/substrate/filters/type_parser.ts @@ -0,0 +1,235 @@ +import { EventKind } from '../types'; + +/** + * This is the Type Parser function, which takes a raw Substrate chain Event + * and determines which of our local event kinds it belongs to. + */ +export function ParseType( + versionName: string, + versionNumber: number, + section: string, + method: string +): EventKind | null { + // TODO: we can unify this with the enricher file: parse out the kind, and then + // marshall the rest of the types in the same place. But for now, we can leave as-is. + switch (section) { + case 'balances': { + switch (method) { + case 'Transfer': + return EventKind.BalanceTransfer; + default: + return null; + } + } + case 'imOnline': + switch (method) { + case 'AllGood': + return EventKind.AllGood; + case 'HeartbeatReceived': + return EventKind.HeartbeatReceived; + case 'SomeOffline': + return EventKind.SomeOffline; + default: + return null; + } + + case 'session': + switch (method) { + case 'NewSession': + return EventKind.NewSession; + default: + return null; + } + + case 'staking': + switch (method) { + case 'Slash': + return EventKind.Slash; + case 'Reward': + return EventKind.Reward; + // NOTE: these are not supported yet on Edgeware, only kusama and edgeware-develop + case 'Bonded': + return EventKind.Bonded; + case 'Unbonded': + return EventKind.Unbonded; + case 'StakingElection': + return EventKind.StakingElection; + default: + return null; + } + case 'democracy': + switch (method) { + case 'Proposed': + return EventKind.DemocracyProposed; + case 'second': + return EventKind.DemocracySeconded; + case 'Tabled': + return EventKind.DemocracyTabled; + case 'Started': + return EventKind.DemocracyStarted; + case 'Passed': + return EventKind.DemocracyPassed; + case 'NotPassed': + return EventKind.DemocracyNotPassed; + case 'Cancelled': + return EventKind.DemocracyCancelled; + case 'Executed': + return EventKind.DemocracyExecuted; + case 'Delegated': + return EventKind.VoteDelegated; + case 'PreimageNoted': + return EventKind.PreimageNoted; + case 'PreimageUsed': + return EventKind.PreimageUsed; + case 'PreimageInvalid': + return EventKind.PreimageInvalid; + case 'PreimageMissing': + return EventKind.PreimageMissing; + case 'PreimageReaped': + return EventKind.PreimageReaped; + case 'vote': + return EventKind.DemocracyVoted; + default: + return null; + } + case 'treasury': + switch (method) { + case 'Proposed': + return EventKind.TreasuryProposed; + case 'Awarded': + return EventKind.TreasuryAwarded; + case 'Rejected': + return EventKind.TreasuryRejected; + default: + return null; + } + case 'elections': + case 'electionsPhragmen': + switch (method) { + case 'submitCandidacy': + return EventKind.ElectionCandidacySubmitted; + case 'NewTerm': + return EventKind.ElectionNewTerm; + case 'EmptyTerm': + return EventKind.ElectionEmptyTerm; + case 'MemberKicked': + return EventKind.ElectionMemberKicked; + case 'MemberRenounced': + return EventKind.ElectionMemberRenounced; + default: + return null; + } + case 'collective': + case 'council': + case 'technicalCollective': + switch (method) { + case 'Proposed': + return EventKind.CollectiveProposed; + case 'Voted': + return EventKind.CollectiveVoted; + case 'Approved': + return EventKind.CollectiveApproved; + case 'Disapproved': + return EventKind.CollectiveDisapproved; + case 'Executed': + return EventKind.CollectiveExecuted; + case 'MemberExecuted': + return EventKind.CollectiveMemberExecuted; + default: + return null; + } + case 'signaling': + switch (method) { + case 'NewProposal': + return EventKind.SignalingNewProposal; + case 'CommitStarted': + return EventKind.SignalingCommitStarted; + case 'VotingStarted': + return EventKind.SignalingVotingStarted; + case 'VotingCompleted': + return EventKind.SignalingVotingCompleted; + default: + return null; + } + case 'tips': + switch (method) { + case 'NewTip': { + return EventKind.NewTip; + } + // extrinsic call tip() + case 'tip': { + return EventKind.TipVoted; + } + case 'TipClosing': { + return EventKind.TipClosing; + } + case 'TipClosed': { + return EventKind.TipClosed; + } + case 'TipRetracted': { + return EventKind.TipRetracted; + } + case 'TipSlashed': { + return EventKind.TipSlashed; + } + default: { + return null; + } + } + case 'treasuryReward': + switch (method) { + case 'TreasuryMinting': { + if (versionNumber < 34) { + return EventKind.TreasuryRewardMinting; + } + return EventKind.TreasuryRewardMintingV2; + } + default: + return null; + } + case 'identity': { + switch (method) { + case 'IdentitySet': + return EventKind.IdentitySet; + case 'JudgementGiven': + return EventKind.JudgementGiven; + case 'IdentityCleared': + return EventKind.IdentityCleared; + case 'IdentityKilled': + return EventKind.IdentityKilled; + default: + return null; + } + } + case 'offences': { + switch (method) { + case 'Offence': + return EventKind.Offence; + default: + return null; + } + } + case 'bounties': { + switch (method) { + case 'BountyProposed': + return EventKind.TreasuryBountyProposed; + case 'BountyRejected': + return EventKind.TreasuryBountyRejected; + case 'BountyBecameActive': + return EventKind.TreasuryBountyBecameActive; + case 'BountyAwarded': + return EventKind.TreasuryBountyAwarded; + case 'BountyClaimed': + return EventKind.TreasuryBountyClaimed; + case 'BountyCanceled': + return EventKind.TreasuryBountyCanceled; + case 'extendBountyExpiry': + return EventKind.TreasuryBountyExtended; + default: + return null; + } + } + default: + return null; + } +} diff --git a/packages/chain-events/src/chains/substrate/index.ts b/packages/chain-events/src/chains/substrate/index.ts new file mode 100644 index 00000000000..d1af7949b29 --- /dev/null +++ b/packages/chain-events/src/chains/substrate/index.ts @@ -0,0 +1,12 @@ +export * as Types from './types'; +export * from './subscribeFunc'; +export * from './subscriber'; +export * from './poller'; +export * from './processor'; +export * from './storageFetcher'; +export * from './Listener'; + +export * from './filters/enricher'; +export * from './filters/labeler'; +export * from './filters/titler'; +export * from './filters/type_parser'; diff --git a/packages/chain-events/src/chains/substrate/poller.ts b/packages/chain-events/src/chains/substrate/poller.ts new file mode 100644 index 00000000000..fc1599a234f --- /dev/null +++ b/packages/chain-events/src/chains/substrate/poller.ts @@ -0,0 +1,159 @@ +/** + * Fetches historical events from substrate chain. + */ +import { ApiPromise } from '@polkadot/api'; + +import { + IEventPoller, + IDisconnectedRange, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { Block } from './types'; + +export class Poller extends IEventPoller { + protected readonly log; + + constructor(protected _api: ApiPromise, protected readonly chain?: string) { + super(_api); + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Substrate, chain]) + ); + } + + /** + * Connects to chain, fetches specified blocks and passes them + * along for processing. + * + * @param range The range of block numbers to poll + * @param maxRange The maximum number of blocks to poll + */ + public async poll( + range: IDisconnectedRange, + maxRange = 500 + ): Promise { + // discover current block if no end block provided + if (!range.endBlock) { + const header = await this._api.rpc.chain.getHeader(); + range.endBlock = +header.number; + this.log.info(`Discovered endBlock: ${range.endBlock}`); + } + if (range.endBlock - range.startBlock <= 0) { + this.log.error( + `End of range (${range.endBlock}) <= start (${range.startBlock})! No blocks to fetch.` + ); + return []; + } + if (range.endBlock - range.startBlock > maxRange) { + this.log.info( + `Attempting to poll ${ + range.endBlock - range.startBlock + } blocks, reducing query size to ${maxRange}.` + ); + range.startBlock = range.endBlock - maxRange; + } + + // discover current version + const version = await this._api.rpc.state.getRuntimeVersion(); + const versionNumber = +version.specVersion; + const versionName = version.specName.toString(); + // TODO: on newer versions of Substrate, a "system.lastRuntimeUpgrade" query is exposed, + // which will tell us if we hit an upgrade during the polling period. But for now, we + // can assume that the chain has not been upgraded during the offline polling period + // (which for a non-archive node, is only the most recent 250 blocks anyway). + + // fetch blocks from start to end + const blockNumbers = [ + ...Array(range.endBlock - range.startBlock).keys(), + ].map((i) => range.startBlock + i); + this.log.info( + `Fetching hashes for blocks: ${JSON.stringify(blockNumbers)}` + ); + + // the hashes are pruned when using api.query.system.blockHash.multi + // therefore fetching hashes from chain. the downside is that for every + // single hash a separate request is made + const hashes = await Promise.all( + blockNumbers.map((number) => this._api.rpc.chain.getBlockHash(number)) + ); + + // remove all-0 block hashes -- those blocks have been pruned & we cannot fetch their data + const nonZeroHashes = hashes.filter((hash) => !hash.isEmpty); + this.log.info( + `${nonZeroHashes.length} active and ${ + hashes.length - nonZeroHashes.length + } pruned hashes fetched!` + ); + this.log.debug('Fetching headers and events...'); + const blocks: Block[] = await Promise.all( + nonZeroHashes.map(async (hash) => { + const header = await this._api.rpc.chain.getHeader(hash); + const events = await this._api.query.system.events.at(hash); + const signedBlock = await this._api.rpc.chain.getBlock(hash); + const { extrinsics } = signedBlock.block; + this.log.trace( + `Fetched Block for ${versionName}:${versionNumber}: ${+header.number}` + ); + return { header, events, extrinsics, versionNumber, versionName }; + }) + ); + this.log.info('Finished polling past blocks!'); + + return blocks; + } + + /** + * Connects to chain, fetches blocks specified in given range in provided batch size, + * prcoesses the blocks if a handler is provided + * @param range IDisconnectedRange having startBlock and optional endBlock + * @param batchSize size of the batch in which blocks are to be fetched from chain + * @param processBlockFn an optional function to process the blocks + */ + public async archive( + range: IDisconnectedRange, + batchSize = 500, + processBlockFn: (block: Block) => void = null + ): Promise { + const syncWithHead = !range.endBlock; + + // if the endBlock is not provided then we will run archival mode until we reach the head + if (syncWithHead) { + const header = await this._api.rpc.chain.getHeader(); + range.endBlock = +header.number; + } + + for ( + let block = range.startBlock; + block < range.endBlock; + block = Math.min(block + batchSize, range.endBlock) + ) { + try { + const currentBlocks = await this.poll( + { + startBlock: block, + endBlock: Math.min(block + batchSize, range.endBlock), + }, + batchSize + ); + + // process all blocks sequentially + if (processBlockFn) { + for (const b of currentBlocks) { + await processBlockFn(b); + } + } + } catch (e) { + this.log.error( + `Block polling failed after disconnect at block ${range.startBlock}` + ); + return; + } + // if sync with head then update the endBlock to current header + if (syncWithHead) { + const header = await this._api.rpc.chain.getHeader(); + range.endBlock = +header.number; + } + } + } +} diff --git a/packages/chain-events/src/chains/substrate/processor.ts b/packages/chain-events/src/chains/substrate/processor.ts new file mode 100644 index 00000000000..ef7869c832f --- /dev/null +++ b/packages/chain-events/src/chains/substrate/processor.ts @@ -0,0 +1,110 @@ +/** + * Processes substrate blocks and emits events. + */ +import { ApiPromise } from '@polkadot/api'; +import { Extrinsic, Event } from '@polkadot/types/interfaces'; + +import { IEventProcessor, CWEvent, SupportedNetwork } from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { Block, isEvent, IEventData } from './types'; +import { ParseType } from './filters/type_parser'; +import { Enrich, EnricherConfig } from './filters/enricher'; + +export class Processor extends IEventProcessor { + constructor( + protected _api: ApiPromise, + private _enricherConfig: EnricherConfig = {}, + protected readonly chain?: string + ) { + super(_api); + } + + private _lastBlockNumber: number; + + public get lastBlockNumber(): number { + return this._lastBlockNumber; + } + + /** + * Parse events out of an substrate block and standardizes their format + * for processing. + * + * @param block the block received for processing + * @returns an array of processed events + */ + public async process(block: Block): Promise[]> { + const log = factory.getLogger( + addPrefix(__filename, [ + SupportedNetwork.Substrate, + this.chain || block.versionName, + ]) + ); + + // cache block number if needed for disconnection purposes + const blockNumber = +block.header.number; + if (!this._lastBlockNumber || blockNumber > this._lastBlockNumber) { + this._lastBlockNumber = blockNumber; + } + + const applyFilters = async ( + data: Event | Extrinsic + ): Promise> | null => { + const section = isEvent(data) ? data.section : data.method.section; + const method = isEvent(data) ? data.method : data.method.method; + const kind = ParseType( + block.versionName, + block.versionNumber, + section, + method + ); + if (kind !== null) { + try { + const result = await Enrich( + this._api, + blockNumber, + kind, + data, + this._enricherConfig + ); + return result; + } catch (e) { + log.error( + `Failed to enrich event. Block number: ${blockNumber}, Chain/Version Name: ${block.versionName}, Version Number: ${block.versionNumber}, Section: ${section}, Method: ${method}, Error Message: ${e.message}` + ); + return null; + } + } else { + return null; + } + }; + + const events = await Promise.all( + block.events.map(({ event }) => applyFilters(event)) + ); + + // remove unsuccessful extrinsics, only keep extrinsics that map to ExtrinsicSuccess events + // cf: https://polkadot.js.org/docs/api/cookbook/blocks#how-do-i-map-extrinsics-to-their-events + const successfulExtrinsics = block.extrinsics.filter( + (_extrinsic, index) => { + const extrinsicEvents = block.events.filter( + (event) => + event.phase && + event.phase.isApplyExtrinsic && + +event.phase.asApplyExtrinsic === index + ); + // if the extrinsic involves any "success" events, then we keep it -- it may involve more than + // that, though, as the result will list *all* events generated as a result of the extrinsic + return ( + extrinsicEvents.findIndex( + (e) => e.event.method === 'ExtrinsicSuccess' + ) !== -1 + ); + } + ); + const processedExtrinsics = await Promise.all( + successfulExtrinsics.map((extrinsic) => applyFilters(extrinsic)) + ); + return [...events, ...processedExtrinsics].filter((e) => !!e); // remove null / unwanted events + } +} diff --git a/packages/chain-events/src/chains/substrate/storageFetcher.ts b/packages/chain-events/src/chains/substrate/storageFetcher.ts new file mode 100644 index 00000000000..c6bddfc5c82 --- /dev/null +++ b/packages/chain-events/src/chains/substrate/storageFetcher.ts @@ -0,0 +1,890 @@ +/** + * The purpose of this file is to synthesize "events" from currently-present + * chain data, such that we don't need to "start fresh". We can "recover" the + * originating event of any present entity and use that to seed our database + * when converting from a client-based chain listener setup to a server-based one. + */ + +import _ from 'underscore'; +import { ApiPromise } from '@polkadot/api'; +import { Option, Vec } from '@polkadot/types'; +import { + BalanceOf, + AccountId, + Hash, + BlockNumber, + Registration, + TreasuryProposal, + Proposal, + Votes, + PropIndex, + OpenTip, +} from '@polkadot/types/interfaces'; +import { Codec } from '@polkadot/types/types'; +import { DeriveProposalImage } from '@polkadot/api-derive/types'; +import { isFunction, hexToString } from '@polkadot/util'; + +import { + CWEvent, + IChainEntityKind, + IStorageFetcher, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { + EventKind, + IDemocracyProposed, + IDemocracyStarted, + IDemocracyPassed, + IPreimageNoted, + ITreasuryProposed, + ITreasuryBountyProposed, + ICollectiveProposed, + ICollectiveVoted, + ISignalingNewProposal, + ISignalingCommitStarted, + ISignalingVotingStarted, + ISignalingVotingCompleted, + IEventData, + IIdentitySet, + parseJudgement, + IdentityJudgement, + ITreasuryBountyBecameActive, + ITreasuryBountyAwarded, + ITreasuryBountyEvents, + EntityKind, + INewTip, + ITipVoted, + ITipClosing, +} from './types'; + +export class StorageFetcher extends IStorageFetcher { + protected readonly log; + + constructor(protected readonly _api: ApiPromise, chain?: string) { + super(_api); + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Substrate, chain]) + ); + } + + public async fetchIdentities( + addresses: string[] + ): Promise[]> { + if (!this._api.query.identity) { + this.log.info('Identities module not detected.'); + return []; + } + + const blockNumber = +(await this._api.rpc.chain.getHeader()).number; + + // fetch all identities and registrars from chain + const identities: Option< + Registration + >[] = await this._api.query.identity.identityOf.multi(addresses); + const registrars = await this._api.query.identity.registrars(); + + // construct events + const cwEvents: CWEvent[] = _.zip(addresses, identities) + .map( + ([address, id]: [string, Option]): CWEvent< + IIdentitySet + > => { + // if no identity found, do nothing + if (!id.isSome) return null; + const { info, judgements } = id.unwrap(); + if (!info.display || !info.display.isRaw) return null; + + // parse out judgements from identity info + const parsedJudgements = judgements + .map(([judgmentId, judgement]): [string, IdentityJudgement] => { + const registrarOpt = registrars[+judgmentId]; + // skip invalid registrars + if (!registrarOpt || !registrarOpt.isSome) return null; + return [ + registrarOpt.unwrap().account.toString(), + parseJudgement(judgement), + ]; + }) + .filter((j) => !!j); + return { + // use current block as "fake" set date + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.IdentitySet, + who: address, + displayName: info.display.asRaw.toUtf8(), + judgements: parsedJudgements, + }, + }; + } + ) + // remove null values + .filter((v) => !!v); + return cwEvents; + } + + public async fetchOne( + id: string, + kind: IChainEntityKind, + moduleName?: 'council' | 'technicalCommittee' + ): Promise[]> { + if (!Object.values(EntityKind).find((k) => k === kind)) { + this.log.error(`Invalid entity kind: ${kind}`); + return []; + } + const blockNumber = +(await this._api.rpc.chain.getHeader()).number; + switch (kind as EntityKind) { + case EntityKind.CollectiveProposal: + return this.fetchCollectiveProposals(moduleName, blockNumber, id); + case EntityKind.DemocracyPreimage: + return this.fetchDemocracyPreimages([id]); + case EntityKind.DemocracyProposal: + return this.fetchDemocracyProposals(blockNumber, id); + case EntityKind.DemocracyReferendum: + return this.fetchDemocracyReferenda(blockNumber, id); + case EntityKind.SignalingProposal: + return this.fetchSignalingProposals(blockNumber, id); + case EntityKind.TreasuryBounty: + return this.fetchBounties(blockNumber, id); + case EntityKind.TreasuryProposal: + return this.fetchTreasuryProposals(blockNumber, id); + case EntityKind.TipProposal: + return this.fetchTips(blockNumber, id); + default: + return null; + } + } + + public async fetch(): Promise[]> { + // get current blockNumber for synthesizing events + const blockNumber = +(await this._api.rpc.chain.getHeader()).number; + + /** democracy proposals */ + const democracyProposalEvents = await this.fetchDemocracyProposals( + blockNumber + ); + + /** democracy referenda */ + const democracyReferendaEvents = await this.fetchDemocracyReferenda( + blockNumber + ); + + /** democracy preimages */ + const proposalHashes = democracyProposalEvents.map( + (d) => (d.data as IDemocracyProposed).proposalHash + ); + const referendaHashes = democracyReferendaEvents + .filter((d) => d.data.kind === EventKind.DemocracyStarted) + .map((d) => (d.data as IDemocracyStarted).proposalHash); + const democracyPreimageEvents = await this.fetchDemocracyPreimages([ + ...proposalHashes, + ...referendaHashes, + ]); + + /** treasury proposals */ + const treasuryProposalEvents = await this.fetchTreasuryProposals( + blockNumber + ); + const bountyEvents = await this.fetchBounties(blockNumber); + + /** collective proposals */ + let technicalCommitteeProposalEvents = []; + if (this._api.query.technicalCommittee) { + technicalCommitteeProposalEvents = await this.fetchCollectiveProposals( + 'technicalCommittee', + blockNumber + ); + } + const councilProposalEvents = await this.fetchCollectiveProposals( + 'council', + blockNumber + ); + + /** tips */ + const tipsEvents = await this.fetchTips(blockNumber); + + /** signaling proposals */ + const signalingProposalEvents = await this.fetchSignalingProposals( + blockNumber + ); + + this.log.info('Fetch complete.'); + return [ + ...democracyProposalEvents, + ...democracyReferendaEvents, + ...democracyPreimageEvents, + ...treasuryProposalEvents, + ...bountyEvents, + ...technicalCommitteeProposalEvents, + ...councilProposalEvents, + ...signalingProposalEvents, + ...tipsEvents, + ]; + } + + public async fetchDemocracyProposals( + blockNumber: number, + id?: string + ): Promise[]> { + if (!this._api.query.democracy) { + return []; + } + this.log.info('Migrating democracy proposals...'); + const publicProps = await this._api.query.democracy.publicProps(); + const constructEvent = ( + prop: [PropIndex, Hash, AccountId] & Codec, + depositOpt: Option<[Vec | BalanceOf, BalanceOf] & Codec> + ): IDemocracyProposed => { + if (!depositOpt.isSome) return null; + + // handle kusama vs edgeware depositOpt order + const depositors = depositOpt.unwrap(); + let deposit: BalanceOf; + if (isFunction((depositors[0] as BalanceOf).mul)) { + [deposit] = depositors as [BalanceOf, unknown] & Codec; + } else { + [, deposit] = depositors; + } + return { + kind: EventKind.DemocracyProposed, + proposalIndex: +prop[0], + proposalHash: prop[1].toString(), + proposer: prop[2].toString(), + deposit: deposit.toString(), + }; + }; + if (id === undefined) { + const deposits: Array] & Codec + >> = await this._api.queryMulti( + publicProps.map(([idx]) => [this._api.query.democracy.depositOf, idx]) + ); + const proposedEvents = _.zip(publicProps, deposits) + .map(([prop, depositOpt]) => constructEvent(prop, depositOpt)) + .filter((e) => !!e); + this.log.info(`Found ${proposedEvents.length} democracy proposals!`); + return proposedEvents.map((data) => ({ + blockNumber, + network: SupportedNetwork.Substrate, + data, + })); + // eslint-disable-next-line no-else-return + } else { + const publicProp = publicProps.find(([idx]) => +idx === +id); + if (!publicProp) { + this.log.error(`Democracy proposal ${id} not found!`); + return null; + } + const depositOpt = await this._api.query.democracy.depositOf( + publicProp[0] + ); + const evt = constructEvent(publicProp, depositOpt); + return [ + { + blockNumber, + network: SupportedNetwork.Substrate, + data: evt, + }, + ]; + } + } + + public async fetchDemocracyReferenda( + blockNumber: number, + id?: string + ): Promise[]> { + if (!this._api.query.democracy) { + this.log.info('Democracy module not detected.'); + return []; + } + + this.log.info('Migrating democracy referenda...'); + const activeReferenda = await this._api.derive.democracy.referendumsActive(); + const startEvents = activeReferenda.map((r) => { + return { + kind: EventKind.DemocracyStarted, + referendumIndex: +r.index, + proposalHash: r.imageHash.toString(), + voteThreshold: r.status.threshold.toString(), + endBlock: +r.status.end, + } as IDemocracyStarted; + }); + const dispatchQueue = await this._api.derive.democracy.dispatchQueue(); + const passedEvents: Array = _.flatten( + dispatchQueue.map(({ index, at, imageHash }) => { + return [ + { + kind: EventKind.DemocracyStarted, + referendumIndex: +index, + proposalHash: imageHash.toString(), + + // fake unknown values for started event + voteThreshold: '', + endBlock: 0, + } as IDemocracyStarted, + { + kind: EventKind.DemocracyPassed, + referendumIndex: +index, + dispatchBlock: +at, + } as IDemocracyPassed, + ]; + }) + ); + const results = [...startEvents, ...passedEvents].map((data) => ({ + blockNumber, + network: SupportedNetwork.Substrate, + data, + })); + + // no easier way to only fetch one than to fetch em all + if (id !== undefined) { + const data = results.filter( + ({ data: { referendumIndex } }) => referendumIndex === +id + ); + if (data.length === 0) { + this.log.error(`No referendum found with id ${id}!`); + return null; + } + return data; + } + this.log.info(`Found ${startEvents.length} democracy referenda!`); + return results; + } + + // must pass proposal hashes found in prior events + public async fetchDemocracyPreimages( + hashes: string[] + ): Promise[]> { + if (!this._api.query.democracy) { + return []; + } + this.log.info('Migrating preimages...'); + const hashCodecs = hashes.map((hash) => this._api.createType('Hash', hash)); + const preimages = await this._api.derive.democracy.preimages(hashCodecs); + const notedEvents: Array<[number, IPreimageNoted]> = _.zip( + hashes, + preimages + ).map(([hash, preimage]: [string, DeriveProposalImage]) => { + if (!preimage || !preimage.proposal) return [0, null]; + return [ + +preimage.at, + { + kind: EventKind.PreimageNoted, + proposalHash: hash, + noter: preimage.proposer.toString(), + preimage: { + method: preimage.proposal.method, + section: preimage.proposal.section, + args: preimage.proposal.args.map((arg) => arg.toString()), + }, + } as IPreimageNoted, + ]; + }); + const cwEvents = notedEvents + .filter(([, data]) => !!data) + .map(([blockNumber, data]) => ({ + blockNumber, + network: SupportedNetwork.Substrate, + data, + })); + this.log.info(`Found ${cwEvents.length} preimages!`); + return cwEvents; + } + + public async fetchTreasuryProposals( + blockNumber: number, + id?: string + ): Promise[]> { + if (!this._api.query.treasury) { + this.log.info('Treasury module not detected.'); + return []; + } + + this.log.info('Migrating treasury proposals...'); + const approvals = await this._api.query.treasury.approvals(); + const nProposals = await this._api.query.treasury.proposalCount(); + + if (id !== undefined) { + const proposal = await this._api.query.treasury.proposals(+id); + if (!proposal.isSome) { + this.log.error(`No treasury proposal found with id ${id}!`); + return null; + } + const { proposer, value, beneficiary, bond } = proposal.unwrap(); + return [ + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.TreasuryProposed, + proposalIndex: +id, + proposer: proposer.toString(), + value: value.toString(), + beneficiary: beneficiary.toString(), + bond: bond.toString(), + }, + }, + ]; + } + + const proposalIds: number[] = []; + for (let i = 0; i < +nProposals; i++) { + if (!approvals.some((idx) => +idx === i)) { + proposalIds.push(i); + } + } + + const proposals = await this._api.query.treasury.proposals.multi< + Option + >(proposalIds); + const proposedEvents = proposalIds + .map((idx, index) => { + if (!proposals[index] || !proposals[index].isSome) return null; + const { proposer, value, beneficiary, bond } = proposals[ + index + ].unwrap(); + return { + kind: EventKind.TreasuryProposed, + proposalIndex: +idx, + proposer: proposer.toString(), + value: value.toString(), + beneficiary: beneficiary.toString(), + bond: bond.toString(), + } as ITreasuryProposed; + }) + .filter((e) => !!e); + this.log.info(`Found ${proposedEvents.length} treasury proposals!`); + return proposedEvents.map((data) => ({ + blockNumber, + network: SupportedNetwork.Substrate, + data, + })); + } + + public async fetchBounties( + blockNumber: number, + id?: string + ): Promise[]> { + // TODO: List all relevant events explicitly? + if ( + !this._api.query.treasury?.bountyCount && + !this._api.query.bounties?.bountyCount + ) { + this.log.info('Bounties module not detected.'); + return []; + } + + this.log.info('Migrating treasury bounties...'); + const bounties = await this._api.derive.bounties.bounties(); + const events = []; + for (const b of bounties) { + events.push({ + kind: EventKind.TreasuryBountyProposed, + bountyIndex: +b.index, + proposer: b.bounty.proposer.toString(), + value: b.bounty.value.toString(), + fee: b.bounty.fee.toString(), + curatorDeposit: b.bounty.curatorDeposit.toString(), + bond: b.bounty.bond.toString(), + description: b.description, + } as ITreasuryBountyProposed); + + if (b.bounty.status.isActive) { + events.push({ + kind: EventKind.TreasuryBountyBecameActive, + bountyIndex: +b.index, + curator: b.bounty.status.asActive.curator.toString(), + updateDue: +b.bounty.status.asActive.updateDue, + } as ITreasuryBountyBecameActive); + } + + if (b.bounty.status.isPendingPayout) { + events.push({ + kind: EventKind.TreasuryBountyBecameActive, + bountyIndex: +b.index, + curator: b.bounty.status.asPendingPayout.curator.toString(), + updateDue: blockNumber, // fake this unavailable field + } as ITreasuryBountyBecameActive); + events.push({ + kind: EventKind.TreasuryBountyAwarded, + bountyIndex: +b.index, + value: b.bounty.value.toString(), + beneficiary: b.bounty.status.asPendingPayout.beneficiary.toString(), + curator: b.bounty.status.asPendingPayout.curator.toString(), + unlockAt: +b.bounty.status.asPendingPayout.unlockAt, + } as ITreasuryBountyAwarded); + } + } + + // no easier way to only fetch one than to fetch em all + const results = events.map((data) => ({ + blockNumber, + network: SupportedNetwork.Substrate, + data, + })); + if (id !== undefined) { + const data = results.filter( + ({ data: { bountyIndex } }) => bountyIndex === +id + ); + if (data.length === 0) { + this.log.error(`No bounty found with id ${id}!`); + return null; + } + return data; + } + this.log.info(`Found ${bounties.length} bounties!`); + return results; + } + + public async fetchCollectiveProposals( + moduleName: 'council' | 'technicalCommittee', + blockNumber: number, + id?: string + ): Promise[]> { + if (!this._api.query[moduleName]) { + this.log.info(`${moduleName} module not detected.`); + return []; + } + + const constructEvent = ( + hash: Hash, + proposalOpt: Option, + votesOpt: Option + ) => { + if ( + !hash || + !proposalOpt || + !votesOpt || + !proposalOpt.isSome || + !votesOpt.isSome + ) + return null; + const proposal = proposalOpt.unwrap(); + const votes = votesOpt.unwrap(); + return [ + { + kind: EventKind.CollectiveProposed, + collectiveName: moduleName, + proposalIndex: +votes.index, + proposalHash: hash.toString(), + threshold: +votes.threshold, + call: { + method: proposal.method, + section: proposal.section, + args: proposal.args.map((arg) => arg.toString()), + }, + + // unknown + proposer: '', + } as ICollectiveProposed, + ...votes.ayes.map( + (who) => + ({ + kind: EventKind.CollectiveVoted, + collectiveName: moduleName, + proposalHash: hash.toString(), + voter: who.toString(), + vote: true, + } as ICollectiveVoted) + ), + ...votes.nays.map( + (who) => + ({ + kind: EventKind.CollectiveVoted, + collectiveName: moduleName, + proposalHash: hash.toString(), + voter: who.toString(), + vote: false, + } as ICollectiveVoted) + ), + ]; + }; + + this.log.info(`Migrating ${moduleName} proposals...`); + const proposalHashes = await this._api.query[moduleName].proposals(); + + // fetch one + if (id !== undefined) { + const hash = proposalHashes.find((h) => h.toString() === id); + if (!hash) { + this.log.error(`No collective proposal found with hash ${id}!`); + return null; + } + const proposalOpt = await this._api.query[moduleName].proposalOf(hash); + const votesOpt = await this._api.query[moduleName].voting(hash); + const events = constructEvent(hash, proposalOpt, votesOpt); + if (!events) { + this.log.error(`No collective proposal found with hash ${id}!`); + return null; + } + return events.map((data) => ({ + blockNumber, + network: SupportedNetwork.Substrate, + data, + })); + } + + // fetch all + const proposals: Array> = await Promise.all( + proposalHashes.map(async (h) => { + try { + // awaiting inside the map here to force the individual call to throw, rather than the Promise.all + return await this._api.query[moduleName].proposalOf(h); + } catch (e) { + this.log.error(`Failed to fetch council motion hash ${h.toString()}`); + return Promise.resolve(null); + } + }) + ); + const proposalVotes = await this._api.query[moduleName].voting.multi< + Option + >(proposalHashes); + const proposedEvents = _.flatten( + proposalHashes + .map((hash, index) => { + const proposalOpt = proposals[index]; + const votesOpt = proposalVotes[index]; + return constructEvent(hash, proposalOpt, votesOpt); + }) + .filter((es) => !!es) + ); + const nProposalEvents = proposedEvents.filter( + (e) => e.kind === EventKind.CollectiveProposed + ).length; + this.log.info( + `Found ${nProposalEvents} ${moduleName} proposals and ${ + proposedEvents.length - nProposalEvents + } votes!` + ); + return proposedEvents.map((data) => ({ + blockNumber, + network: SupportedNetwork.Substrate, + data, + })); + } + + public async fetchTips( + blockNumber: number, + hash?: string + ): Promise[]> { + if (!this._api.query.tips) { + this.log.info('Tips module not detected.'); + return []; + } + + this.log.info('Migrating tips...'); + const openTipKeys = await this._api.query.tips.tips.keys(); + const results: CWEvent[] = []; + for (const key of openTipKeys) { + const h = key.args[0].toString(); + // support fetchOne + if (!hash || hash === h) { + try { + const tip = await this._api.rpc.state.getStorage>( + key + ); + if (tip.isSome) { + const { + reason: reasonHash, + who, + finder, + deposit, + closes, + tips: tipVotes, + findersFee, + } = tip.unwrap(); + const reason = await this._api.query.tips.reasons(reasonHash); + if (reason.isSome) { + // newtip events + results.push({ + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.NewTip, + proposalHash: h, + who: who.toString(), + reason: hexToString(reason.unwrap().toString()), + finder: finder.toString(), + deposit: deposit.toString(), + findersFee: findersFee.valueOf(), + }, + }); + + // n tipvoted events + for (const [voter, amount] of tipVotes) { + results.push({ + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.TipVoted, + proposalHash: h, + who: voter.toString(), + value: amount.toString(), + }, + }); + } + + // tipclosing event + if (closes.isSome) { + const closesAt = +closes.unwrap(); + results.push({ + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.TipClosing, + proposalHash: h, + closing: closesAt, + }, + }); + } + } + } + } catch (e) { + this.log.error(`Unable to fetch tip "${key.args[0]}"!`); + } + } + } + + const newTips = results.filter((v) => v.data.kind === EventKind.NewTip); + this.log.info(`Found ${newTips.length} open tips!`); + return results; + } + + public async fetchSignalingProposals( + blockNumber: number, + id?: string + ): Promise< + CWEvent< + | ISignalingNewProposal + | ISignalingCommitStarted + | ISignalingVotingStarted + | ISignalingVotingCompleted + >[] + > { + if (!this._api.query.signaling || !this._api.query.voting) { + this.log.info('Signaling module not detected.'); + return []; + } + + this.log.info('Migrating signaling proposals...'); + if (!this._api.query.voting || !this._api.query.signaling) { + this.log.info('Found no signaling proposals (wrong chain)!'); + return []; + } + // in "prevoting" phase + const inactiveProposals = await this._api.query.signaling.inactiveProposals< + Vec<[Hash, BlockNumber] & Codec> + >(); + // in "commit" or "voting" phase + const activeProposals = await this._api.query.signaling.activeProposals< + Vec<[Hash, BlockNumber] & Codec> + >(); + // in "completed" phase + const completedProposals = await this._api.query.signaling.completedProposals< + Vec<[Hash, BlockNumber] & Codec> + >(); + const proposalHashes = [ + ...inactiveProposals, + ...activeProposals, + ...completedProposals, + ].map(([hash]) => hash); + + // fetch records + const proposalRecordOpts = await this._api.queryMulti( + proposalHashes.map((hash) => [this._api.query.signaling.proposalOf, hash]) + ); + const proposalRecords = _.zip(proposalRecordOpts, proposalHashes) + .filter(([p]) => p.isSome) + .map(([p, hash]) => [p.unwrap(), hash]); + const voteRecordOpts = await this._api.queryMulti( + proposalRecords.map(([p]) => [ + this._api.query.voting.voteRecords, + p.vote_id, + ]) + ); + const allRecords = _.zip(proposalRecords, voteRecordOpts) + .filter(([, voteOpt]) => voteOpt.isSome) + .map(([[record, hash], vote]) => [hash, record, vote.unwrap()]); + + // generate events + const newProposalEvents = allRecords.map(([hash, proposal, voting]) => { + return { + kind: EventKind.SignalingNewProposal, + proposer: proposal.author.toString(), + proposalHash: hash.toString(), + voteId: voting.id.toString(), + title: proposal.title.toString(), + description: proposal.contents.toString(), + tallyType: voting.data.tally_type.toString(), + voteType: voting.data.vote_type.toString(), + choices: voting.outcomes.map((outcome) => outcome.toString()), + } as ISignalingNewProposal; + }); + + // we're not using commit in production, but check anyway + const commitStartedEvents = allRecords + .filter(([, proposal]) => proposal.stage.isCommit) + .map(([hash, proposal, voting]) => { + return { + kind: EventKind.SignalingCommitStarted, + proposalHash: hash.toString(), + voteId: voting.id.toString(), + endBlock: +proposal.transition_time, + } as ISignalingCommitStarted; + }); + + // assume all voting/completed proposals skipped straight there without commit + const votingStartedEvents = allRecords + .filter( + ([, proposal]) => proposal.stage.isVoting || proposal.stage.isCompleted + ) + .map(([hash, proposal, voting]) => { + return { + kind: EventKind.SignalingVotingStarted, + proposalHash: hash.toString(), + voteId: voting.id.toString(), + endBlock: +proposal.transition_time, + } as ISignalingVotingStarted; + }); + + const completedEvents = allRecords + .filter(([, proposal]) => proposal.stage.isCompleted) + .map(([hash, , voting]) => { + return { + kind: EventKind.SignalingVotingCompleted, + proposalHash: hash.toString(), + voteId: voting.id.toString(), + } as ISignalingVotingCompleted; + }); + + const events = [ + ...newProposalEvents, + ...commitStartedEvents, + ...votingStartedEvents, + ...completedEvents, + ]; + // we could plausibly populate the completed events with block numbers, but not necessary + const results = events.map((data) => ({ + blockNumber, + network: SupportedNetwork.Substrate, + data, + })); + + // no easier way to only fetch one than to fetch em all + if (id !== undefined) { + const data = results.filter( + ({ data: { proposalHash } }) => proposalHash === id + ); + if (data.length === 0) { + this.log.error(`No referendum found with id ${id}!`); + return null; + } + return data; + } + this.log.info(`Found ${newProposalEvents.length} signaling proposals!`); + return results; + } +} diff --git a/packages/chain-events/src/chains/substrate/subscribeFunc.ts b/packages/chain-events/src/chains/substrate/subscribeFunc.ts new file mode 100644 index 00000000000..636d7af8270 --- /dev/null +++ b/packages/chain-events/src/chains/substrate/subscribeFunc.ts @@ -0,0 +1,204 @@ +import { WsProvider, ApiPromise } from '@polkadot/api'; +import { RegisteredTypes } from '@polkadot/types/types'; + +import { + IDisconnectedRange, + CWEvent, + SubscribeFunc, + ISubscribeOptions, + SupportedNetwork, +} from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { Subscriber } from './subscriber'; +import { Poller } from './poller'; +import { Processor } from './processor'; +import { Block, IEventData } from './types'; +import { EnricherConfig } from './filters/enricher'; + +export interface ISubstrateSubscribeOptions + extends ISubscribeOptions { + enricherConfig?: EnricherConfig; +} + +/** + * Attempts to open an API connection, retrying if it cannot be opened. + * @param url websocket endpoing to connect to, including ws[s]:// and port + * @param typeOverrides + * @param chain + * @returns a promise resolving to an ApiPromise once the connection has been established + */ +export async function createApi( + url: string, + typeOverrides: RegisteredTypes = {}, + chain?: string +): Promise { + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Substrate, chain]) + ); + for (let i = 0; i < 3; ++i) { + const provider = new WsProvider(url, 0); + let unsubscribe: () => void; + const success = await new Promise((resolve) => { + unsubscribe = provider.on('connected', () => resolve(true)); + + provider.on('error', () => { + if (i < 2) + log.warn(`An error occurred connecting to ${url} - retrying...`); + resolve(false); + }); + + provider.on('disconnected', () => resolve(false)); + + provider.connect(); + }); + + // construct API using provider + if (success) { + unsubscribe(); + return ApiPromise.create({ + provider, + ...typeOverrides, + }); + } + // TODO: add delay + } + + throw new Error( + `[${SupportedNetwork.Substrate}${ + chain ? `::${chain}` : '' + }]: Failed to connect to API endpoint at: ${url}` + ); +} + +/** + * This is the main function for substrate event handling. It constructs a connection + * to the chain, connects all event-related modules, and initializes event handling. + * @param options + * @returns An active block subscriber. + */ +export const subscribeEvents: SubscribeFunc< + ApiPromise, + Block, + ISubstrateSubscribeOptions +> = async (options) => { + const { + chain, + api, + handlers, + skipCatchup, + archival, + startBlock, + discoverReconnectRange, + verbose, + enricherConfig, + } = options; + const log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Substrate, chain]) + ); + // helper function that sends an event through event handlers + const handleEventFn = async (event: CWEvent): Promise => { + let prevResult = null; + for (const handler of handlers) { + try { + event.chain = chain; + event.received = Date.now(); + + // pass result of last handler into next one (chaining db events) + prevResult = await handler.handle(event, prevResult); + } catch (err) { + log.error(`Event handle failure: ${err.message}`); + break; + } + } + }; + + // helper function that sends a block through the event processor and + // into the event handlers + const processor = new Processor(api, enricherConfig || {}); + const processBlockFn = async (block: Block): Promise => { + // retrieve events from block + const events: CWEvent[] = await processor.process(block); + + // send all events through event-handlers in sequence + for (const event of events) await handleEventFn(event); + }; + + const subscriber = new Subscriber(api, verbose); + const poller = new Poller(api); + + // if running in archival mode: run poller.archive with batch_size 50 + // then exit without subscribing. + // TODO: should we start subscription? + if (archival) { + // default to startBlock 0 + const offlineRange: IDisconnectedRange = { startBlock: startBlock ?? 0 }; + log.info( + `Executing in archival mode, polling blocks starting from: ${offlineRange.startBlock}` + ); + await poller.archive(offlineRange, 50, processBlockFn); + return subscriber; + } + + // helper function that runs after we've been offline/the server's been down, + // and attempts to fetch events from skipped blocks + const pollMissedBlocksFn = async (): Promise => { + log.info('Detected offline time, polling missed blocks...'); + // grab the cached block immediately to avoid a new block appearing before the + // server can do its thing... + const { lastBlockNumber } = processor; + // determine how large of a reconnect we dealt with + let offlineRange: IDisconnectedRange; + + // first, attempt the provided range finding method if it exists + // (this should fetch the block of the last server event from database) + if (discoverReconnectRange) { + offlineRange = await discoverReconnectRange(); + } + + // compare with default range algorithm: take last cached block in processor + // if it exists, and is more recent than the provided algorithm + // (note that on first run, we wont have a cached block/this wont do anything) + if ( + lastBlockNumber && + (!offlineRange || + !offlineRange.startBlock || + offlineRange.startBlock < lastBlockNumber) + ) { + offlineRange = { startBlock: lastBlockNumber }; + } + + // if we can't figure out when the last block we saw was, + // do nothing + // (i.e. don't try and fetch all events from block 0 onward) + if (!offlineRange || !offlineRange.startBlock) { + log.warn('Unable to determine offline time range.'); + return; + } + try { + const blocks = await poller.poll(offlineRange); + await Promise.all(blocks.map(processBlockFn)); + } catch (e) { + log.error( + `Block polling failed after disconnect at block ${offlineRange.startBlock}` + ); + } + }; + + if (!skipCatchup) { + await pollMissedBlocksFn(); + } else { + log.info('Skipping event catchup on startup!'); + } + + try { + log.info(`Subscribing to ${chain} endpoint...`); + await subscriber.subscribe(processBlockFn); + + // handle reconnects with poller + api.on('connected', pollMissedBlocksFn); + } catch (e) { + log.error(`Subscription error: ${e.message}`); + } + return subscriber; +}; diff --git a/packages/chain-events/src/chains/substrate/subscriber.ts b/packages/chain-events/src/chains/substrate/subscriber.ts new file mode 100644 index 00000000000..db448cc780f --- /dev/null +++ b/packages/chain-events/src/chains/substrate/subscriber.ts @@ -0,0 +1,81 @@ +/** + * Fetches events from substrate chain in real time. + */ +import { ApiPromise } from '@polkadot/api'; +import { VoidFn } from '@polkadot/api/types'; +import { Header, RuntimeVersion } from '@polkadot/types/interfaces'; + +import { IEventSubscriber, SupportedNetwork } from '../../interfaces'; +import { addPrefix, factory } from '../../logging'; + +import { Block } from './types'; + +export class Subscriber extends IEventSubscriber { + private _subscription: VoidFn; + + private _versionName: string; + + private _versionNumber: number; + + protected readonly log; + + constructor( + protected readonly _api: ApiPromise, + protected _verbose = false, + chain?: string + ) { + super(_api); + this.log = factory.getLogger( + addPrefix(__filename, [SupportedNetwork.Substrate, chain]) + ); + } + + /** + * Initializes subscription to chain and starts emitting events. + */ + public async subscribe(cb: (block: Block) => void): Promise { + // wait for version available before we start producing blocks + await new Promise((resolve) => { + this._api.rpc.state.subscribeRuntimeVersion((version: RuntimeVersion) => { + this._versionNumber = +version.specVersion; + this._versionName = version.specName.toString(); + this.log.info( + `Fetched runtime version for ${this._versionName}: ${this._versionNumber}` + ); + resolve(); + }); + }); + + // subscribe to events and pass to block processor + this._subscription = await this._api.rpc.chain.subscribeNewHeads( + async (header: Header) => { + const events = await this._api.query.system.events.at(header.hash); + const signedBlock = await this._api.rpc.chain.getBlock(header.hash); + const { extrinsics } = signedBlock.block; + const block: Block = { + header, + events, + extrinsics, + versionNumber: this._versionNumber, + versionName: this._versionName, + }; + const logStr = `Fetched Block for ${this._versionName}:${ + this._versionNumber + }: ${+block.header.number}`; + // eslint-disable-next-line no-unused-expressions + this._verbose ? this.log.info(logStr) : this.log.trace(logStr); + cb(block); + } + ); + } + + public unsubscribe(): void { + if (this._subscription) { + this.log.info(`Unsubscribing from ${this._versionName}`); + this._subscription(); + this._subscription = null; + } else { + this.log.info(`No subscriber to unsubscribe from`); + } + } +} diff --git a/packages/chain-events/src/chains/substrate/types.ts b/packages/chain-events/src/chains/substrate/types.ts new file mode 100644 index 00000000000..2961bc6474b --- /dev/null +++ b/packages/chain-events/src/chains/substrate/types.ts @@ -0,0 +1,832 @@ +import { + Header, + EventRecord, + Extrinsic, + Event, + IdentityJudgement as SubstrateJudgement, +} from '@polkadot/types/interfaces'; +import { RegisteredTypes } from '@polkadot/types/types'; + +import { EnricherConfig } from './filters/enricher'; + +export interface ISubstrateListenerOptions { + startBlock: number; + skipCatchup: boolean; + archival: boolean; + url: string; + spec: RegisteredTypes; + enricherConfig: EnricherConfig; +} + +/** + * To implement a new form of event, add it to this enum, and add its + * JSON interface below (ensure it is stringify-able and then parse-able). + */ + +/** Special types for formatting/labeling purposes */ +export type BalanceString = string; +export type BigIntString = string; +export type BlockNumber = number; +export type AccountId = string; +export type RuntimeVersion = number; +// eslint-disable-next-line no-shadow +export enum IdentityJudgement { + Unknown = 'unknown', + FeePaid = 'fee-paid', + Reasonable = 'reasonable', + KnownGood = 'known-good', + OutOfDate = 'out-of-date', + LowQuality = 'low-quality', + Erroneous = 'erroneous', +} + +export interface BountyStatusCuratorProposed { + curator: AccountId; +} + +export interface BountyStatusActive { + curator: AccountId; + updateDue: BlockNumber; +} + +export interface BountyStatusPendingPayout { + curator: AccountId; + beneficiary: AccountId; + unlockAt: BlockNumber; +} + +export interface BountyStatus { + isProposed: boolean; + isApproved: boolean; + isFunded: boolean; + isCuratorProposed: boolean; + asCuratorProposed: BountyStatusCuratorProposed; + isActive: boolean; + asActive: BountyStatusActive; + isPendingPayout: boolean; + asPendingPayout: BountyStatusPendingPayout; +} + +export function parseJudgement(j: SubstrateJudgement): IdentityJudgement { + if (j.isFeePaid) return IdentityJudgement.FeePaid; + if (j.isReasonable) return IdentityJudgement.Reasonable; + if (j.isKnownGood) return IdentityJudgement.KnownGood; + if (j.isOutOfDate) return IdentityJudgement.OutOfDate; + if (j.isLowQuality) return IdentityJudgement.LowQuality; + if (j.isErroneous) return IdentityJudgement.Erroneous; + return IdentityJudgement.Unknown; +} + +/** + * lacks a block type that includes events as well, so we synthesize a type + * from the combination of headers, events, and extrinsics. + */ +export interface Block { + header: Header; + events: EventRecord[]; + extrinsics: Extrinsic[]; + versionNumber: number; + versionName: string; +} + +export interface Validator { + commissionPer: number; + controllerId: AccountId; + rewardDestination: string; + nextSessionIds: string; + eraPoints: number; +} + +// Used for grouping EventKinds together for archival purposes +// eslint-disable-next-line no-shadow +export enum EntityKind { + DemocracyProposal = 'democracy-proposal', + DemocracyReferendum = 'democracy-referendum', + DemocracyPreimage = 'democracy-preimage', + TreasuryProposal = 'treasury-proposal', + CollectiveProposal = 'collective-proposal', + SignalingProposal = 'signaling-proposal', + TipProposal = 'tip-proposal', + TreasuryBounty = 'treasury-bounty', +} + +// Each kind of event we handle +// In theory we could use a higher level type-guard here, like +// `e instanceof GenericEvent`, but that makes unit testing +// more difficult, as we need to then mock the original constructor. +export function isEvent(e: Event | Extrinsic): e is Event { + return !(e.data instanceof Uint8Array); +} + +// eslint-disable-next-line no-shadow +export enum EventKind { + Slash = 'slash', + Reward = 'reward', + Bonded = 'bonded', + Unbonded = 'unbonded', + + BalanceTransfer = 'balance-transfer', + + StakingElection = 'staking-election', + + VoteDelegated = 'vote-delegated', + DemocracyProposed = 'democracy-proposed', + DemocracySeconded = 'democracy-seconded', + DemocracyTabled = 'democracy-tabled', + DemocracyStarted = 'democracy-started', + DemocracyVoted = 'democracy-voted', + DemocracyPassed = 'democracy-passed', + DemocracyNotPassed = 'democracy-not-passed', + DemocracyCancelled = 'democracy-cancelled', + DemocracyExecuted = 'democracy-executed', + + PreimageNoted = 'preimage-noted', + PreimageUsed = 'preimage-used', + PreimageInvalid = 'preimage-invalid', + PreimageMissing = 'preimage-missing', + PreimageReaped = 'preimage-reaped', + + TreasuryProposed = 'treasury-proposed', + TreasuryAwarded = 'treasury-awarded', + TreasuryRejected = 'treasury-rejected', + + TreasuryBountyProposed = 'treasury-bounty-proposed', + TreasuryBountyAwarded = 'treasury-bounty-awarded', + TreasuryBountyRejected = 'treasury-bounty-rejected', + TreasuryBountyBecameActive = 'treasury-bounty-became-active', + TreasuryBountyClaimed = 'treasury-bounty-claimed', + TreasuryBountyCanceled = 'treasury-bounty-canceled', + TreasuryBountyExtended = 'treasury-bounty-extended', + + NewTip = 'new-tip', + TipVoted = 'tip-voted', + TipClosing = 'tip-closing', + TipClosed = 'tip-closed', + TipRetracted = 'tip-retracted', + TipSlashed = 'tip-slashed', + + ElectionNewTerm = 'election-new-term', + ElectionEmptyTerm = 'election-empty-term', + ElectionCandidacySubmitted = 'election-candidacy-submitted', + ElectionMemberKicked = 'election-member-kicked', + ElectionMemberRenounced = 'election-member-renounced', + + CollectiveProposed = 'collective-proposed', + CollectiveVoted = 'collective-voted', + CollectiveApproved = 'collective-approved', + CollectiveDisapproved = 'collective-disapproved', + CollectiveExecuted = 'collective-executed', + CollectiveMemberExecuted = 'collective-member-executed', + // TODO: do we want to track votes as events, in collective? + + SignalingNewProposal = 'signaling-new-proposal', + SignalingCommitStarted = 'signaling-commit-started', + SignalingVotingStarted = 'signaling-voting-started', + SignalingVotingCompleted = 'signaling-voting-completed', + + TreasuryRewardMinting = 'treasury-reward-minting', + TreasuryRewardMintingV2 = 'treasury-reward-minting-v2', + + IdentitySet = 'identity-set', + JudgementGiven = 'identity-judgement-given', + IdentityCleared = 'identity-cleared', + IdentityKilled = 'identity-killed', + + NewSession = 'new-session', + AllGood = 'all-good', + HeartbeatReceived = 'heartbeat-received', + SomeOffline = 'some-offline', + + // offences events + Offence = 'offences-offence', +} + +interface IEvent { + kind: EventKind; +} + +export interface IBalanceTransfer extends IEvent { + kind: EventKind.BalanceTransfer; + sender: AccountId; + dest: AccountId; + value: BalanceString; +} + +/** + * ImOnline Events + */ +export interface IAllGood extends IEvent { + kind: EventKind.AllGood; + sessionIndex: number; + validators: Array; +} +export interface IHeartbeatReceived extends IEvent { + kind: EventKind.HeartbeatReceived; + authorityId: string; +} + +export interface ISomeOffline extends IEvent { + kind: EventKind.SomeOffline; + sessionIndex: number; + validators: Array; +} + +/** + * Offences Events + */ +export interface IOffence extends IEvent { + kind: EventKind.Offence; + offenceKind: string; + opaqueTimeSlot: string; + applied: boolean; + offenders: Array; +} + +// Individual Exposure +export interface IndividualExposure { + who: AccountId; + value: string; +} + +// Active Exposure +export interface ActiveExposure { + [key: string]: { + own: number; + total: number; + others: IndividualExposure[]; + }; +} + +/** + * Session Event + */ +export interface INewSession extends IEvent { + kind: EventKind.NewSession; + activeExposures: ActiveExposure; + active: Array; + waiting: Array; + sessionIndex: number; + currentEra?: number; + validatorInfo: { [key: string]: Validator }; +} + +/** + * Staking Events + */ +export interface ISlash extends IEvent { + kind: EventKind.Slash; + validator: AccountId; + amount: BalanceString; +} + +export interface IReward extends IEvent { + kind: EventKind.Reward; + validator?: AccountId; + amount: BalanceString; +} + +export interface IBonded extends IEvent { + kind: EventKind.Bonded; + stash: AccountId; + amount: BalanceString; + controller: AccountId; +} + +export interface IUnbonded extends IEvent { + kind: EventKind.Unbonded; + stash: AccountId; + amount: BalanceString; + controller: AccountId; +} + +export interface IStakingElection extends IEvent { + kind: EventKind.StakingElection; + era: number; + validators: AccountId[]; +} + +/** + * Democracy Events + */ +export interface IVoteDelegated extends IEvent { + kind: EventKind.VoteDelegated; + who: AccountId; + target: AccountId; +} + +export interface IDemocracyProposed extends IEvent { + kind: EventKind.DemocracyProposed; + proposalIndex: number; + proposalHash: string; + deposit: BalanceString; + proposer: AccountId; +} + +export interface IDemocracySeconded extends IEvent { + kind: EventKind.DemocracySeconded; + proposalIndex: number; + who: AccountId; +} + +export interface IDemocracyTabled extends IEvent { + kind: EventKind.DemocracyTabled; + proposalIndex: number; +} + +export interface IDemocracyStarted extends IEvent { + kind: EventKind.DemocracyStarted; + referendumIndex: number; + proposalHash: string; + voteThreshold: string; + endBlock: BlockNumber; +} + +export interface IDemocracyVoted extends IEvent { + kind: EventKind.DemocracyVoted; + referendumIndex: number; + who: AccountId; + isAye: boolean; + conviction: number; // index of the conviction enum + balance: BalanceString; +} + +export interface IDemocracyPassed extends IEvent { + kind: EventKind.DemocracyPassed; + referendumIndex: number; + dispatchBlock: BlockNumber | null; + // TODO: worth enriching with tally? +} + +export interface IDemocracyNotPassed extends IEvent { + kind: EventKind.DemocracyNotPassed; + referendumIndex: number; + // TODO: worth enriching with tally? +} + +export interface IDemocracyCancelled extends IEvent { + kind: EventKind.DemocracyCancelled; + referendumIndex: number; +} + +export interface IDemocracyExecuted extends IEvent { + kind: EventKind.DemocracyExecuted; + referendumIndex: number; + executionOk: boolean; +} + +/** + * Preimage Events + * TODO: do we want to track depositors and deposit amounts? + */ +export interface IPreimageNoted extends IEvent { + kind: EventKind.PreimageNoted; + proposalHash: string; + noter: AccountId; + preimage: { + method: string; + section: string; + args: string[]; + }; +} + +export interface IPreimageUsed extends IEvent { + kind: EventKind.PreimageUsed; + proposalHash: string; + noter: AccountId; +} + +export interface IPreimageInvalid extends IEvent { + kind: EventKind.PreimageInvalid; + proposalHash: string; + referendumIndex: number; +} + +export interface IPreimageMissing extends IEvent { + kind: EventKind.PreimageMissing; + proposalHash: string; + referendumIndex: number; +} + +export interface IPreimageReaped extends IEvent { + kind: EventKind.PreimageReaped; + proposalHash: string; + noter: AccountId; + reaper: AccountId; +} + +/** + * Treasury Events + */ +export interface ITreasuryProposed extends IEvent { + kind: EventKind.TreasuryProposed; + proposalIndex: number; + proposer: AccountId; + value: BalanceString; + beneficiary: AccountId; + bond: BalanceString; +} + +export interface ITreasuryAwarded extends IEvent { + kind: EventKind.TreasuryAwarded; + proposalIndex: number; + value: BalanceString; + beneficiary: AccountId; +} + +export interface ITreasuryRejected extends IEvent { + kind: EventKind.TreasuryRejected; + proposalIndex: number; + // can also fetch slashed bond value if needed + // cannot fetch other data because proposal data disappears on rejection +} + +// Treasury Bounty Event Interfaces + +export interface ITreasuryBountyProposed extends IEvent { + // New bounty proposal. [index] + kind: EventKind.TreasuryBountyProposed; + bountyIndex: number; + proposer: AccountId; + value: BalanceString; + fee: BalanceString; + curatorDeposit: BalanceString; + bond: BalanceString; + description?: string; +} + +export interface ITreasuryBountyAwarded extends IEvent { + // A bounty is awarded to a beneficiary. [index, beneficiary] + kind: EventKind.TreasuryBountyAwarded; + bountyIndex: number; + beneficiary: AccountId; + curator: AccountId; + unlockAt: number; +} + +export interface ITreasuryBountyRejected extends IEvent { + // A bounty proposal was rejected; funds were slashed. [index, bond] + kind: EventKind.TreasuryBountyRejected; + bountyIndex: number; + bond: BalanceString; +} + +export interface ITreasuryBountyBecameActive extends IEvent { + // A bounty proposal is funded and became active. [index] + kind: EventKind.TreasuryBountyBecameActive; + bountyIndex: number; + curator: AccountId; + updateDue: number; +} + +export interface ITreasuryBountyClaimed extends IEvent { + // A bounty is claimed by beneficiary. [index, payout, beneficiary] + kind: EventKind.TreasuryBountyClaimed; + bountyIndex: number; + payout: BalanceString; + beneficiary: AccountId; +} + +export interface ITreasuryBountyCanceled extends IEvent { + // A bounty is cancelled. [index] + kind: EventKind.TreasuryBountyCanceled; + bountyIndex: number; +} + +export interface ITreasuryBountyExtended extends IEvent { + // A bounty expiry is extended. [index, remark] + kind: EventKind.TreasuryBountyExtended; + bountyIndex: number; + remark: string; +} + +/** + * Tips Events + */ +export interface INewTip extends IEvent { + kind: EventKind.NewTip; + proposalHash: string; + reason: string; + who: AccountId; + finder: AccountId; + deposit: BalanceString; + findersFee: boolean; +} + +// from extrinsic, not event +export interface ITipVoted extends IEvent { + kind: EventKind.TipVoted; + proposalHash: string; + who: AccountId; + value: BalanceString; +} + +export interface ITipClosing extends IEvent { + kind: EventKind.TipClosing; + closing: BlockNumber; + proposalHash: string; +} + +export interface ITipClosed extends IEvent { + kind: EventKind.TipClosed; + proposalHash: string; + who: AccountId; + payout: BalanceString; +} + +export interface ITipRetracted extends IEvent { + kind: EventKind.TipRetracted; + proposalHash: string; +} + +export interface ITipSlashed extends IEvent { + kind: EventKind.TipSlashed; + proposalHash: string; + finder: AccountId; + deposit: BalanceString; +} + +/** + * Elections Events + */ +export interface IElectionNewTerm extends IEvent { + kind: EventKind.ElectionNewTerm; + round: number; + newMembers: AccountId[]; + allMembers: AccountId[]; +} + +export interface IElectionEmptyTerm extends IEvent { + kind: EventKind.ElectionEmptyTerm; + round: number; + members: AccountId[]; +} + +export interface ICandidacySubmitted extends IEvent { + kind: EventKind.ElectionCandidacySubmitted; + round: number; + candidate: AccountId; +} + +export interface IElectionMemberKicked extends IEvent { + kind: EventKind.ElectionMemberKicked; + who: AccountId; +} + +export interface IElectionMemberRenounced extends IEvent { + kind: EventKind.ElectionMemberRenounced; + who: AccountId; +} + +/** + * Collective Events + */ +export interface ICollectiveProposed extends IEvent { + kind: EventKind.CollectiveProposed; + collectiveName?: 'council' | 'technicalCommittee'; + proposer: AccountId; + proposalIndex: number; + proposalHash: string; + threshold: number; + // TODO: add end block? + call: { + method: string; + section: string; + args: string[]; + }; +} + +export interface ICollectiveVoted extends IEvent { + kind: EventKind.CollectiveVoted; + collectiveName?: 'council' | 'technicalCommittee'; + proposalHash: string; + voter: AccountId; + vote: boolean; +} + +export interface ICollectiveApproved extends IEvent { + kind: EventKind.CollectiveApproved; + collectiveName?: 'council' | 'technicalCommittee'; + proposalHash: string; +} + +export interface ICollectiveDisapproved extends IEvent { + kind: EventKind.CollectiveDisapproved; + collectiveName?: 'council' | 'technicalCommittee'; + proposalHash: string; +} + +export interface ICollectiveExecuted extends IEvent { + kind: EventKind.CollectiveExecuted; + collectiveName?: 'council' | 'technicalCommittee'; + proposalHash: string; + executionOk: boolean; +} + +export interface ICollectiveMemberExecuted extends IEvent { + kind: EventKind.CollectiveMemberExecuted; + collectiveName?: 'council' | 'technicalCommittee'; + proposalHash: string; + executionOk: boolean; +} + +/** + * Signaling Events + */ +export interface ISignalingNewProposal extends IEvent { + kind: EventKind.SignalingNewProposal; + proposer: AccountId; + proposalHash: string; + voteId: BigIntString; + title: string; + description: string; + tallyType: string; + voteType: string; + choices: string[]; +} + +export interface ISignalingCommitStarted extends IEvent { + kind: EventKind.SignalingCommitStarted; + proposalHash: string; + voteId: BigIntString; + endBlock: number; +} + +export interface ISignalingVotingStarted extends IEvent { + kind: EventKind.SignalingVotingStarted; + proposalHash: string; + voteId: BigIntString; + endBlock: number; +} + +export interface ISignalingVotingCompleted extends IEvent { + kind: EventKind.SignalingVotingCompleted; + proposalHash: string; + voteId: BigIntString; + // TODO: worth enriching with tally? +} + +/** + * TreasuryReward events + */ +export interface ITreasuryRewardMinting extends IEvent { + kind: EventKind.TreasuryRewardMinting; + pot: BalanceString; + reward: BalanceString; +} +export interface ITreasuryRewardMintingV2 extends IEvent { + kind: EventKind.TreasuryRewardMintingV2; + pot: BalanceString; + potAddress: AccountId; +} + +/** + * Identity events + */ +export interface IIdentitySet extends IEvent { + kind: EventKind.IdentitySet; + who: AccountId; + displayName: string; + judgements: [AccountId, IdentityJudgement][]; +} + +export interface IJudgementGiven extends IEvent { + kind: EventKind.JudgementGiven; + who: AccountId; + registrar: AccountId; + judgement: IdentityJudgement; +} + +export interface IIdentityCleared extends IEvent { + kind: EventKind.IdentityCleared; + who: AccountId; +} + +export interface IIdentityKilled extends IEvent { + kind: EventKind.IdentityKilled; + who: AccountId; +} + +// Interface for era reward points +export interface AccountPoints { + [key: string]: number; +} + +export type IEventData = + | ISlash + | IReward + | IBonded + | IUnbonded + | IBalanceTransfer + | IStakingElection + | IVoteDelegated + | IDemocracyProposed + | IDemocracySeconded + | IDemocracyTabled + | IDemocracyStarted + | IDemocracyVoted + | IDemocracyPassed + | IDemocracyNotPassed + | IDemocracyCancelled + | IDemocracyExecuted + | IPreimageNoted + | IPreimageUsed + | IPreimageInvalid + | IPreimageMissing + | IPreimageReaped + | ITreasuryProposed + | ITreasuryAwarded + | ITreasuryRejected + | ITreasuryBountyProposed + | ITreasuryBountyAwarded + | ITreasuryBountyRejected + | ITreasuryBountyBecameActive + | ITreasuryBountyCanceled + | ITreasuryBountyClaimed + | ITreasuryBountyExtended + | INewTip + | ITipVoted + | ITipClosing + | ITipClosed + | ITipRetracted + | ITipSlashed + | IElectionNewTerm + | IElectionEmptyTerm + | ICandidacySubmitted + | IElectionMemberKicked + | IElectionMemberRenounced + | ICollectiveProposed + | ICollectiveVoted + | ICollectiveApproved + | ICollectiveDisapproved + | ICollectiveExecuted + | ICollectiveMemberExecuted + | ISignalingNewProposal + | ISignalingCommitStarted + | ISignalingVotingStarted + | ISignalingVotingCompleted + | ITreasuryRewardMinting + | ITreasuryRewardMintingV2 + | IIdentitySet + | IJudgementGiven + | IIdentityCleared + | IIdentityKilled + | INewSession + | IHeartbeatReceived + | ISomeOffline + | IAllGood + | IOffence; +// eslint-disable-next-line semi-style + +export const EventKinds: EventKind[] = Object.values(EventKind); + +/** + * The following auxiliary types and functions are used in migrations and should + * not be relied upon for general implementations. + */ +export type IDemocracyProposalEvents = + | IDemocracyProposed + | IDemocracySeconded + | IDemocracyTabled; +export type IDemocracyReferendumEvents = + | IDemocracyStarted + | IDemocracyVoted + | IDemocracyPassed + | IDemocracyNotPassed + | IDemocracyCancelled + | IDemocracyExecuted; +export type IDemocracyPreimageEvents = + | IPreimageNoted + | IPreimageUsed + | IPreimageInvalid + | IPreimageMissing + | IPreimageReaped; +export type ITreasuryProposalEvents = + | ITreasuryProposed + | ITreasuryRejected + | ITreasuryAwarded; +export type ICollectiveProposalEvents = + | ICollectiveProposed + | ICollectiveVoted + | ICollectiveApproved + | ICollectiveDisapproved + | ICollectiveExecuted; +export type ISignalingProposalEvents = + | ISignalingNewProposal + | ISignalingCommitStarted + | ISignalingVotingStarted + | ISignalingVotingCompleted; +export type ITipProposalEvents = + | INewTip + | ITipVoted + | ITipClosing + | ITipClosed + | ITipRetracted + | ITipSlashed; +export type ITreasuryBountyEvents = + | ITreasuryBountyBecameActive + | ITreasuryBountyCanceled + | ITreasuryBountyClaimed + | ITreasuryBountyAwarded + | ITreasuryBountyExtended + | ITreasuryBountyProposed + | ITreasuryBountyRejected; diff --git a/packages/chain-events/src/chains/substrate/utils/currentPoint.ts b/packages/chain-events/src/chains/substrate/utils/currentPoint.ts new file mode 100644 index 00000000000..e0aa0620efb --- /dev/null +++ b/packages/chain-events/src/chains/substrate/utils/currentPoint.ts @@ -0,0 +1,40 @@ +import { + AccountId, + EraPoints, + EraRewardPoints, + EraIndex, + BlockHash, +} from '@polkadot/types/interfaces'; +import { ApiPromise } from '@polkadot/api'; + +import { AccountPoints } from '../types'; + +export function currentPoints( + api: ApiPromise, + era: EraIndex, + hash: BlockHash, + validators: AccountId[] +): Promise { + const points: AccountPoints = {}; + // api call to retreive eraRewardPoints for version >= 38 + if (api.query.staking.erasRewardPoints) + return api.query.staking.erasRewardPoints + .at(hash, era) + .then((rewardPoints) => { + rewardPoints.individual.forEach((rewardPoint, accountKey) => { + points[accountKey.toString()] = +rewardPoint; + }); + return points; + }); + + // creating eraRewardPoints for for version = 31 + return api.query.staking.currentEraPointsEarned + .at(hash, era) + .then((eraPoints) => { + const { individual } = eraPoints; + individual.forEach((point, idx) => { + points[validators[idx].toString()] = +point; + }); + return points; + }); +} diff --git a/packages/chain-events/src/contractTypes/AaveGovernanceV2.d.ts b/packages/chain-events/src/contractTypes/AaveGovernanceV2.d.ts new file mode 100644 index 00000000000..1ed5ffc9ed7 --- /dev/null +++ b/packages/chain-events/src/contractTypes/AaveGovernanceV2.d.ts @@ -0,0 +1,1764 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface AaveGovernanceV2Interface extends ethers.utils.Interface { + functions: { + "DOMAIN_TYPEHASH()": FunctionFragment; + "NAME()": FunctionFragment; + "VOTE_EMITTED_TYPEHASH()": FunctionFragment; + "__abdicate()": FunctionFragment; + "authorizeExecutors(address[])": FunctionFragment; + "cancel(uint256)": FunctionFragment; + "create(address,address[],uint256[],string[],bytes[],bool[],bytes32)": FunctionFragment; + "execute(uint256)": FunctionFragment; + "getGovernanceStrategy()": FunctionFragment; + "getGuardian()": FunctionFragment; + "getProposalById(uint256)": FunctionFragment; + "getProposalState(uint256)": FunctionFragment; + "getProposalsCount()": FunctionFragment; + "getVoteOnProposal(uint256,address)": FunctionFragment; + "getVotingDelay()": FunctionFragment; + "isExecutorAuthorized(address)": FunctionFragment; + "owner()": FunctionFragment; + "queue(uint256)": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "setGovernanceStrategy(address)": FunctionFragment; + "setVotingDelay(uint256)": FunctionFragment; + "submitVote(uint256,bool)": FunctionFragment; + "submitVoteBySignature(uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "unauthorizeExecutors(address[])": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DOMAIN_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "NAME", values?: undefined): string; + encodeFunctionData( + functionFragment: "VOTE_EMITTED_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "__abdicate", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "authorizeExecutors", + values: [string[]] + ): string; + encodeFunctionData( + functionFragment: "cancel", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "create", + values: [ + string, + string[], + BigNumberish[], + string[], + BytesLike[], + boolean[], + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getGovernanceStrategy", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getGuardian", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getProposalById", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getProposalState", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getProposalsCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getVoteOnProposal", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "getVotingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isExecutorAuthorized", + values: [string] + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData(functionFragment: "queue", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setGovernanceStrategy", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "setVotingDelay", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "submitVote", + values: [BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "submitVoteBySignature", + values: [BigNumberish, boolean, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "unauthorizeExecutors", + values: [string[]] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "NAME", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "VOTE_EMITTED_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "__abdicate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "authorizeExecutors", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getGovernanceStrategy", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getGuardian", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposalById", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposalState", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposalsCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVoteOnProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVotingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isExecutorAuthorized", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setGovernanceStrategy", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setVotingDelay", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "submitVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "submitVoteBySignature", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "unauthorizeExecutors", + data: BytesLike + ): Result; + + events: { + "ExecutorAuthorized(address)": EventFragment; + "ExecutorUnauthorized(address)": EventFragment; + "GovernanceStrategyChanged(address,address)": EventFragment; + "OwnershipTransferred(address,address)": EventFragment; + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address,address[],uint256[],string[],bytes[],bool[],uint256,uint256,address,bytes32)": EventFragment; + "ProposalExecuted(uint256,address)": EventFragment; + "ProposalQueued(uint256,uint256,address)": EventFragment; + "VoteEmitted(uint256,address,bool,uint256)": EventFragment; + "VotingDelayChanged(uint256,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ExecutorAuthorized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutorUnauthorized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GovernanceStrategyChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteEmitted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingDelayChanged"): EventFragment; +} + +export class AaveGovernanceV2 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: AaveGovernanceV2Interface; + + functions: { + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + NAME(overrides?: CallOverrides): Promise<[string]>; + + "NAME()"(overrides?: CallOverrides): Promise<[string]>; + + VOTE_EMITTED_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "VOTE_EMITTED_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + authorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + create( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "create(address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getGovernanceStrategy(overrides?: CallOverrides): Promise<[string]>; + + "getGovernanceStrategy()"(overrides?: CallOverrides): Promise<[string]>; + + getGuardian(overrides?: CallOverrides): Promise<[string]>; + + "getGuardian()"(overrides?: CallOverrides): Promise<[string]>; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + string, + string + ] & { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + executionTime: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + executed: boolean; + canceled: boolean; + strategy: string; + ipfsHash: string; + } + ] + >; + + "getProposalById(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + string, + string + ] & { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + executionTime: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + executed: boolean; + canceled: boolean; + strategy: string; + ipfsHash: string; + } + ] + >; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "getProposalState(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + getProposalsCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + "getProposalsCount()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getVoteOnProposal( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [[boolean, BigNumber] & { support: boolean; votingPower: BigNumber }] + >; + + "getVoteOnProposal(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [[boolean, BigNumber] & { support: boolean; votingPower: BigNumber }] + >; + + getVotingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "getVotingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + isExecutorAuthorized( + executor: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isExecutorAuthorized(address)"( + executor: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + "owner()"(overrides?: CallOverrides): Promise<[string]>; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setGovernanceStrategy( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setGovernanceStrategy(address)"( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingDelay( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingDelay(uint256)"( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVoteBySignature(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + unauthorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "unauthorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + "NAME()"(overrides?: CallOverrides): Promise; + + VOTE_EMITTED_TYPEHASH(overrides?: CallOverrides): Promise; + + "VOTE_EMITTED_TYPEHASH()"(overrides?: CallOverrides): Promise; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + authorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + create( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "create(address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getGovernanceStrategy(overrides?: CallOverrides): Promise; + + "getGovernanceStrategy()"(overrides?: CallOverrides): Promise; + + getGuardian(overrides?: CallOverrides): Promise; + + "getGuardian()"(overrides?: CallOverrides): Promise; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + string, + string + ] & { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + executionTime: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + executed: boolean; + canceled: boolean; + strategy: string; + ipfsHash: string; + } + >; + + "getProposalById(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + string, + string + ] & { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + executionTime: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + executed: boolean; + canceled: boolean; + strategy: string; + ipfsHash: string; + } + >; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getProposalState(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalsCount(overrides?: CallOverrides): Promise; + + "getProposalsCount()"(overrides?: CallOverrides): Promise; + + getVoteOnProposal( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, BigNumber] & { support: boolean; votingPower: BigNumber } + >; + + "getVoteOnProposal(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, BigNumber] & { support: boolean; votingPower: BigNumber } + >; + + getVotingDelay(overrides?: CallOverrides): Promise; + + "getVotingDelay()"(overrides?: CallOverrides): Promise; + + isExecutorAuthorized( + executor: string, + overrides?: CallOverrides + ): Promise; + + "isExecutorAuthorized(address)"( + executor: string, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setGovernanceStrategy( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setGovernanceStrategy(address)"( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingDelay( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingDelay(uint256)"( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVoteBySignature(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + unauthorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "unauthorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + "NAME()"(overrides?: CallOverrides): Promise; + + VOTE_EMITTED_TYPEHASH(overrides?: CallOverrides): Promise; + + "VOTE_EMITTED_TYPEHASH()"(overrides?: CallOverrides): Promise; + + __abdicate(overrides?: CallOverrides): Promise; + + "__abdicate()"(overrides?: CallOverrides): Promise; + + authorizeExecutors( + executors: string[], + overrides?: CallOverrides + ): Promise; + + "authorizeExecutors(address[])"( + executors: string[], + overrides?: CallOverrides + ): Promise; + + cancel(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + create( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "create(address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + execute(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getGovernanceStrategy(overrides?: CallOverrides): Promise; + + "getGovernanceStrategy()"(overrides?: CallOverrides): Promise; + + getGuardian(overrides?: CallOverrides): Promise; + + "getGuardian()"(overrides?: CallOverrides): Promise; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + string, + string + ] & { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + executionTime: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + executed: boolean; + canceled: boolean; + strategy: string; + ipfsHash: string; + } + >; + + "getProposalById(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + string, + string + ] & { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + executionTime: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + executed: boolean; + canceled: boolean; + strategy: string; + ipfsHash: string; + } + >; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getProposalState(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalsCount(overrides?: CallOverrides): Promise; + + "getProposalsCount()"(overrides?: CallOverrides): Promise; + + getVoteOnProposal( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, BigNumber] & { support: boolean; votingPower: BigNumber } + >; + + "getVoteOnProposal(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, BigNumber] & { support: boolean; votingPower: BigNumber } + >; + + getVotingDelay(overrides?: CallOverrides): Promise; + + "getVotingDelay()"(overrides?: CallOverrides): Promise; + + isExecutorAuthorized( + executor: string, + overrides?: CallOverrides + ): Promise; + + "isExecutorAuthorized(address)"( + executor: string, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + queue(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + "renounceOwnership()"(overrides?: CallOverrides): Promise; + + setGovernanceStrategy( + governanceStrategy: string, + overrides?: CallOverrides + ): Promise; + + "setGovernanceStrategy(address)"( + governanceStrategy: string, + overrides?: CallOverrides + ): Promise; + + setVotingDelay( + votingDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "setVotingDelay(uint256)"( + votingDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + overrides?: CallOverrides + ): Promise; + + "submitVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: CallOverrides + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "submitVoteBySignature(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: CallOverrides + ): Promise; + + unauthorizeExecutors( + executors: string[], + overrides?: CallOverrides + ): Promise; + + "unauthorizeExecutors(address[])"( + executors: string[], + overrides?: CallOverrides + ): Promise; + }; + + filters: { + ExecutorAuthorized( + executor: null + ): TypedEventFilter<[string], { executor: string }>; + + ExecutorUnauthorized( + executor: null + ): TypedEventFilter<[string], { executor: string }>; + + GovernanceStrategyChanged( + newStrategy: string | null, + initiatorChange: string | null + ): TypedEventFilter< + [string, string], + { newStrategy: string; initiatorChange: string } + >; + + OwnershipTransferred( + previousOwner: string | null, + newOwner: string | null + ): TypedEventFilter< + [string, string], + { previousOwner: string; newOwner: string } + >; + + ProposalCanceled( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalCreated( + id: null, + creator: string | null, + executor: string | null, + targets: null, + values: null, + signatures: null, + calldatas: null, + withDelegatecalls: null, + startBlock: null, + endBlock: null, + strategy: null, + ipfsHash: null + ): TypedEventFilter< + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + string, + string + ], + { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + strategy: string; + ipfsHash: string; + } + >; + + ProposalExecuted( + id: null, + initiatorExecution: string | null + ): TypedEventFilter< + [BigNumber, string], + { id: BigNumber; initiatorExecution: string } + >; + + ProposalQueued( + id: null, + executionTime: null, + initiatorQueueing: string | null + ): TypedEventFilter< + [BigNumber, BigNumber, string], + { id: BigNumber; executionTime: BigNumber; initiatorQueueing: string } + >; + + VoteEmitted( + id: null, + voter: string | null, + support: null, + votingPower: null + ): TypedEventFilter< + [BigNumber, string, boolean, BigNumber], + { id: BigNumber; voter: string; support: boolean; votingPower: BigNumber } + >; + + VotingDelayChanged( + newVotingDelay: null, + initiatorChange: string | null + ): TypedEventFilter< + [BigNumber, string], + { newVotingDelay: BigNumber; initiatorChange: string } + >; + }; + + estimateGas: { + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + NAME(overrides?: CallOverrides): Promise; + + "NAME()"(overrides?: CallOverrides): Promise; + + VOTE_EMITTED_TYPEHASH(overrides?: CallOverrides): Promise; + + "VOTE_EMITTED_TYPEHASH()"(overrides?: CallOverrides): Promise; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + authorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + create( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "create(address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getGovernanceStrategy(overrides?: CallOverrides): Promise; + + "getGovernanceStrategy()"(overrides?: CallOverrides): Promise; + + getGuardian(overrides?: CallOverrides): Promise; + + "getGuardian()"(overrides?: CallOverrides): Promise; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getProposalById(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getProposalState(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalsCount(overrides?: CallOverrides): Promise; + + "getProposalsCount()"(overrides?: CallOverrides): Promise; + + getVoteOnProposal( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getVoteOnProposal(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + getVotingDelay(overrides?: CallOverrides): Promise; + + "getVotingDelay()"(overrides?: CallOverrides): Promise; + + isExecutorAuthorized( + executor: string, + overrides?: CallOverrides + ): Promise; + + "isExecutorAuthorized(address)"( + executor: string, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setGovernanceStrategy( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setGovernanceStrategy(address)"( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingDelay( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingDelay(uint256)"( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVoteBySignature(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + unauthorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "unauthorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + NAME(overrides?: CallOverrides): Promise; + + "NAME()"(overrides?: CallOverrides): Promise; + + VOTE_EMITTED_TYPEHASH( + overrides?: CallOverrides + ): Promise; + + "VOTE_EMITTED_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + authorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + create( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "create(address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getGovernanceStrategy( + overrides?: CallOverrides + ): Promise; + + "getGovernanceStrategy()"( + overrides?: CallOverrides + ): Promise; + + getGuardian(overrides?: CallOverrides): Promise; + + "getGuardian()"(overrides?: CallOverrides): Promise; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getProposalById(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getProposalState(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalsCount(overrides?: CallOverrides): Promise; + + "getProposalsCount()"( + overrides?: CallOverrides + ): Promise; + + getVoteOnProposal( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getVoteOnProposal(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + getVotingDelay(overrides?: CallOverrides): Promise; + + "getVotingDelay()"( + overrides?: CallOverrides + ): Promise; + + isExecutorAuthorized( + executor: string, + overrides?: CallOverrides + ): Promise; + + "isExecutorAuthorized(address)"( + executor: string, + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setGovernanceStrategy( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setGovernanceStrategy(address)"( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingDelay( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingDelay(uint256)"( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVoteBySignature(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + unauthorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "unauthorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/AaveToken.d.ts b/packages/chain-events/src/contractTypes/AaveToken.d.ts new file mode 100644 index 00000000000..0cc6a05564a --- /dev/null +++ b/packages/chain-events/src/contractTypes/AaveToken.d.ts @@ -0,0 +1,1194 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface AaveTokenInterface extends ethers.utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "EIP712_REVISION()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "REVISION()": FunctionFragment; + "_aaveGovernance()": FunctionFragment; + "_countsSnapshots(address)": FunctionFragment; + "_nonces(address)": FunctionFragment; + "_snapshots(address,uint256)": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "initialize(address,address,address)": FunctionFragment; + "name()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "EIP712_REVISION", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "REVISION", values?: undefined): string; + encodeFunctionData( + functionFragment: "_aaveGovernance", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "_countsSnapshots", + values: [string] + ): string; + encodeFunctionData(functionFragment: "_nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "_snapshots", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [string, string, string] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "EIP712_REVISION", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "REVISION", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "_aaveGovernance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_countsSnapshots", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "_nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_snapshots", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "SnapshotDone(address,uint128,uint128)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SnapshotDone"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class AaveToken extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: AaveTokenInterface; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise<[string]>; + + EIP712_REVISION(overrides?: CallOverrides): Promise<[string]>; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + REVISION(overrides?: CallOverrides): Promise<[BigNumber]>; + + "REVISION()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + _aaveGovernance(overrides?: CallOverrides): Promise<[string]>; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise<[string]>; + + _countsSnapshots( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "_countsSnapshots(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + _nonces(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + _snapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + "_snapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + "decimals()"(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + initialize( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,address)"( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise; + + _countsSnapshots(arg0: string, overrides?: CallOverrides): Promise; + + "_countsSnapshots(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _snapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + "_snapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + initialize( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,address)"( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise; + + _countsSnapshots( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_countsSnapshots(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _snapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + "_snapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + initialize( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: CallOverrides + ): Promise; + + "initialize(address,address,address)"( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + SnapshotDone( + owner: null, + oldValue: null, + newValue: null + ): TypedEventFilter< + [string, BigNumber, BigNumber], + { owner: string; oldValue: BigNumber; newValue: BigNumber } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise; + + _countsSnapshots( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_countsSnapshots(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _snapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_snapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + initialize( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,address)"( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"( + overrides?: CallOverrides + ): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"( + overrides?: CallOverrides + ): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"( + overrides?: CallOverrides + ): Promise; + + _countsSnapshots( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_countsSnapshots(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _nonces( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _snapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_snapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + initialize( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,address)"( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/AaveTokenV1Mock.d.ts b/packages/chain-events/src/contractTypes/AaveTokenV1Mock.d.ts new file mode 100644 index 00000000000..3cffa13fd9c --- /dev/null +++ b/packages/chain-events/src/contractTypes/AaveTokenV1Mock.d.ts @@ -0,0 +1,1184 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface AaveTokenV1MockInterface extends ethers.utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "EIP712_REVISION()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "REVISION()": FunctionFragment; + "_aaveGovernance()": FunctionFragment; + "_countsSnapshots(address)": FunctionFragment; + "_nonces(address)": FunctionFragment; + "_snapshots(address,uint256)": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "initialize(address,address,address)": FunctionFragment; + "name()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "EIP712_REVISION", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "REVISION", values?: undefined): string; + encodeFunctionData( + functionFragment: "_aaveGovernance", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "_countsSnapshots", + values: [string] + ): string; + encodeFunctionData(functionFragment: "_nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "_snapshots", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [string, string, string] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "EIP712_REVISION", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "REVISION", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "_aaveGovernance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_countsSnapshots", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "_nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "_snapshots", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "SnapshotDone(address,uint128,uint128)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SnapshotDone"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class AaveTokenV1Mock extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: AaveTokenV1MockInterface; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise<[string]>; + + EIP712_REVISION(overrides?: CallOverrides): Promise<[string]>; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + REVISION(overrides?: CallOverrides): Promise<[BigNumber]>; + + "REVISION()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + _aaveGovernance(overrides?: CallOverrides): Promise<[string]>; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise<[string]>; + + _countsSnapshots( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "_countsSnapshots(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + _nonces(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + _snapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + "_snapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + "decimals()"(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,address)"( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address)"( + minter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise; + + _countsSnapshots(arg0: string, overrides?: CallOverrides): Promise; + + "_countsSnapshots(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _snapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + "_snapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,address)"( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address)"( + minter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise; + + _countsSnapshots( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_countsSnapshots(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _snapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + "_snapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "initialize(address,address,address)"( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: CallOverrides + ): Promise; + + "initialize(address)"( + minter: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + SnapshotDone( + owner: null, + oldValue: null, + newValue: null + ): TypedEventFilter< + [string, BigNumber, BigNumber], + { owner: string; oldValue: BigNumber; newValue: BigNumber } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise; + + _countsSnapshots( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_countsSnapshots(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _snapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_snapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,address)"( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address)"( + minter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"( + overrides?: CallOverrides + ): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"( + overrides?: CallOverrides + ): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"( + overrides?: CallOverrides + ): Promise; + + _countsSnapshots( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_countsSnapshots(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _nonces( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _snapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_snapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,address)"( + migrator: string, + distributor: string, + aaveGovernance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address)"( + minter: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/AaveTokenV2.d.ts b/packages/chain-events/src/contractTypes/AaveTokenV2.d.ts new file mode 100644 index 00000000000..ce2c4a57e2f --- /dev/null +++ b/packages/chain-events/src/contractTypes/AaveTokenV2.d.ts @@ -0,0 +1,1881 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface AaveTokenV2Interface extends ethers.utils.Interface { + functions: { + "DELEGATE_BY_TYPE_TYPEHASH()": FunctionFragment; + "DELEGATE_TYPEHASH()": FunctionFragment; + "DOMAIN_SEPARATOR()": FunctionFragment; + "EIP712_REVISION()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "REVISION()": FunctionFragment; + "_aaveGovernance()": FunctionFragment; + "_nonces(address)": FunctionFragment; + "_votingSnapshots(address,uint256)": FunctionFragment; + "_votingSnapshotsCounts(address)": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "delegate(address)": FunctionFragment; + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "delegateByType(address,uint8)": FunctionFragment; + "delegateByTypeBySig(address,uint8,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "getDelegateeByType(address,uint8)": FunctionFragment; + "getPowerAtBlock(address,uint256,uint8)": FunctionFragment; + "getPowerCurrent(address,uint8)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "initialize()": FunctionFragment; + "name()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "totalSupplyAt(uint256)": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DELEGATE_BY_TYPE_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "DELEGATE_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "EIP712_REVISION", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "REVISION", values?: undefined): string; + encodeFunctionData( + functionFragment: "_aaveGovernance", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "_nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "_votingSnapshots", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "_votingSnapshotsCounts", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "delegate", values: [string]): string; + encodeFunctionData( + functionFragment: "delegateBySig", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "delegateByType", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "delegateByTypeBySig", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "getDelegateeByType", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getPowerAtBlock", + values: [string, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getPowerCurrent", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "totalSupplyAt", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "DELEGATE_BY_TYPE_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "DELEGATE_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "EIP712_REVISION", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "REVISION", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "_aaveGovernance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "_nonces", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "_votingSnapshots", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_votingSnapshotsCounts", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "delegateBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "delegateByType", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "delegateByTypeBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getDelegateeByType", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPowerAtBlock", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPowerCurrent", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "totalSupplyAt", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "DelegateChanged(address,address,uint8)": EventFragment; + "DelegatedPowerChanged(address,uint256,uint8)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegatedPowerChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class AaveTokenV2 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: AaveTokenV2Interface; + + functions: { + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DELEGATE_BY_TYPE_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DELEGATE_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise<[string]>; + + EIP712_REVISION(overrides?: CallOverrides): Promise<[string]>; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + REVISION(overrides?: CallOverrides): Promise<[BigNumber]>; + + "REVISION()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + _aaveGovernance(overrides?: CallOverrides): Promise<[string]>; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise<[string]>; + + _nonces(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + _votingSnapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + "_votingSnapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + _votingSnapshotsCounts( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "_votingSnapshotsCounts(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + "decimals()"(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByTypeBySig( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByTypeBySig(address,uint8,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + initialize( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_BY_TYPE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _votingSnapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + "_votingSnapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + _votingSnapshotsCounts( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_votingSnapshotsCounts(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByTypeBySig( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByTypeBySig(address,uint8,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + initialize( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_BY_TYPE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _votingSnapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + "_votingSnapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + _votingSnapshotsCounts( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_votingSnapshotsCounts(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delegate(delegatee: string, overrides?: CallOverrides): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: CallOverrides + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delegateByTypeBySig( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "delegateByTypeBySig(address,uint8,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + initialize(overrides?: CallOverrides): Promise; + + "initialize()"(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + DelegateChanged( + delegator: string | null, + delegatee: string | null, + delegationType: null + ): TypedEventFilter< + [string, string, number], + { delegator: string; delegatee: string; delegationType: number } + >; + + DelegatedPowerChanged( + user: string | null, + amount: null, + delegationType: null + ): TypedEventFilter< + [string, BigNumber, number], + { user: string; amount: BigNumber; delegationType: number } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_BY_TYPE_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _votingSnapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_votingSnapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + _votingSnapshotsCounts( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_votingSnapshotsCounts(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByTypeBySig( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByTypeBySig(address,uint8,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + initialize( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DELEGATE_BY_TYPE_TYPEHASH( + overrides?: CallOverrides + ): Promise; + + "DELEGATE_BY_TYPE_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"( + overrides?: CallOverrides + ): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"( + overrides?: CallOverrides + ): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"( + overrides?: CallOverrides + ): Promise; + + _nonces( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _votingSnapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_votingSnapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + _votingSnapshotsCounts( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_votingSnapshotsCounts(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByTypeBySig( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByTypeBySig(address,uint8,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + initialize( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/AaveTokenV2Mock.d.ts b/packages/chain-events/src/contractTypes/AaveTokenV2Mock.d.ts new file mode 100644 index 00000000000..39695d5636d --- /dev/null +++ b/packages/chain-events/src/contractTypes/AaveTokenV2Mock.d.ts @@ -0,0 +1,1947 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface AaveTokenV2MockInterface extends ethers.utils.Interface { + functions: { + "DELEGATE_BY_TYPE_TYPEHASH()": FunctionFragment; + "DELEGATE_TYPEHASH()": FunctionFragment; + "DOMAIN_SEPARATOR()": FunctionFragment; + "EIP712_REVISION()": FunctionFragment; + "PERMIT_TYPEHASH()": FunctionFragment; + "REVISION()": FunctionFragment; + "_aaveGovernance()": FunctionFragment; + "_nonces(address)": FunctionFragment; + "_votingSnapshots(address,uint256)": FunctionFragment; + "_votingSnapshotsCounts(address)": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "delegate(address)": FunctionFragment; + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "delegateByType(address,uint8)": FunctionFragment; + "delegateByTypeBySig(address,uint8,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "getDelegateeByType(address,uint8)": FunctionFragment; + "getPowerAtBlock(address,uint256,uint8)": FunctionFragment; + "getPowerCurrent(address,uint8)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "initialize()": FunctionFragment; + "mint(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "totalSupplyAt(uint256)": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DELEGATE_BY_TYPE_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "DELEGATE_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "EIP712_REVISION", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PERMIT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "REVISION", values?: undefined): string; + encodeFunctionData( + functionFragment: "_aaveGovernance", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "_nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "_votingSnapshots", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "_votingSnapshotsCounts", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "delegate", values: [string]): string; + encodeFunctionData( + functionFragment: "delegateBySig", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "delegateByType", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "delegateByTypeBySig", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "getDelegateeByType", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getPowerAtBlock", + values: [string, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getPowerCurrent", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "totalSupplyAt", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "DELEGATE_BY_TYPE_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "DELEGATE_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "EIP712_REVISION", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PERMIT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "REVISION", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "_aaveGovernance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "_nonces", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "_votingSnapshots", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_votingSnapshotsCounts", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "delegateBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "delegateByType", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "delegateByTypeBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getDelegateeByType", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPowerAtBlock", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPowerCurrent", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "totalSupplyAt", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "DelegateChanged(address,address,uint8)": EventFragment; + "DelegatedPowerChanged(address,uint256,uint8)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegatedPowerChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class AaveTokenV2Mock extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: AaveTokenV2MockInterface; + + functions: { + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DELEGATE_BY_TYPE_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DELEGATE_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise<[string]>; + + EIP712_REVISION(overrides?: CallOverrides): Promise<[string]>; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise<[string]>; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + REVISION(overrides?: CallOverrides): Promise<[BigNumber]>; + + "REVISION()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + _aaveGovernance(overrides?: CallOverrides): Promise<[string]>; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise<[string]>; + + _nonces(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + _votingSnapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + "_votingSnapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + _votingSnapshotsCounts( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "_votingSnapshotsCounts(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + "decimals()"(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByTypeBySig( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByTypeBySig(address,uint8,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + initialize( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + minter: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "mint(address,uint256)"( + minter: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_BY_TYPE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _votingSnapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + "_votingSnapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + _votingSnapshotsCounts( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_votingSnapshotsCounts(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByTypeBySig( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByTypeBySig(address,uint8,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + initialize( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + minter: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "mint(address,uint256)"( + minter: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_BY_TYPE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _votingSnapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + "_votingSnapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber] & { blockNumber: BigNumber; value: BigNumber } + >; + + _votingSnapshotsCounts( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_votingSnapshotsCounts(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delegate(delegatee: string, overrides?: CallOverrides): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: CallOverrides + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delegateByTypeBySig( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "delegateByTypeBySig(address,uint8,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + initialize(overrides?: CallOverrides): Promise; + + "initialize()"(overrides?: CallOverrides): Promise; + + mint( + minter: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "mint(address,uint256)"( + minter: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + DelegateChanged( + delegator: string | null, + delegatee: string | null, + delegationType: null + ): TypedEventFilter< + [string, string, number], + { delegator: string; delegatee: string; delegationType: number } + >; + + DelegatedPowerChanged( + user: string | null, + amount: null, + delegationType: null + ): TypedEventFilter< + [string, BigNumber, number], + { user: string; amount: BigNumber; delegationType: number } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_BY_TYPE_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"(overrides?: CallOverrides): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"(overrides?: CallOverrides): Promise; + + _nonces(arg0: string, overrides?: CallOverrides): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _votingSnapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_votingSnapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + _votingSnapshotsCounts( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_votingSnapshotsCounts(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByTypeBySig( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByTypeBySig(address,uint8,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + initialize( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + minter: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "mint(address,uint256)"( + minter: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DELEGATE_BY_TYPE_TYPEHASH( + overrides?: CallOverrides + ): Promise; + + "DELEGATE_BY_TYPE_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"( + overrides?: CallOverrides + ): Promise; + + EIP712_REVISION(overrides?: CallOverrides): Promise; + + "EIP712_REVISION()"( + overrides?: CallOverrides + ): Promise; + + PERMIT_TYPEHASH(overrides?: CallOverrides): Promise; + + "PERMIT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + REVISION(overrides?: CallOverrides): Promise; + + "REVISION()"(overrides?: CallOverrides): Promise; + + _aaveGovernance(overrides?: CallOverrides): Promise; + + "_aaveGovernance()"( + overrides?: CallOverrides + ): Promise; + + _nonces( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + _votingSnapshots( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_votingSnapshots(address,uint256)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + _votingSnapshotsCounts( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "_votingSnapshotsCounts(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByTypeBySig( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByTypeBySig(address,uint8,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + delegationType: BigNumberish, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + initialize( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + minter: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "mint(address,uint256)"( + minter: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/AccessControl.d.ts b/packages/chain-events/src/contractTypes/AccessControl.d.ts new file mode 100644 index 00000000000..5709d8d933c --- /dev/null +++ b/packages/chain-events/src/contractTypes/AccessControl.d.ts @@ -0,0 +1,527 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface AccessControlInterface extends ethers.utils.Interface { + functions: { + "DEFAULT_ADMIN_ROLE()": FunctionFragment; + "getRoleAdmin(bytes32)": FunctionFragment; + "grantRole(bytes32,address)": FunctionFragment; + "hasRole(bytes32,address)": FunctionFragment; + "renounceRole(bytes32,address)": FunctionFragment; + "revokeRole(bytes32,address)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DEFAULT_ADMIN_ROLE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "DEFAULT_ADMIN_ROLE", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + + events: { + "RoleAdminChanged(bytes32,bytes32,bytes32)": EventFragment; + "RoleGranted(bytes32,address,address)": EventFragment; + "RoleRevoked(bytes32,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; +} + +export class AccessControl extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: AccessControlInterface; + + functions: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<[string]>; + + "DEFAULT_ADMIN_ROLE()"(overrides?: CallOverrides): Promise<[string]>; + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<[string]>; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + "DEFAULT_ADMIN_ROLE()"(overrides?: CallOverrides): Promise; + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + callStatic: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + "DEFAULT_ADMIN_ROLE()"(overrides?: CallOverrides): Promise; + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + RoleAdminChanged( + role: BytesLike | null, + previousAdminRole: BytesLike | null, + newAdminRole: BytesLike | null + ): TypedEventFilter< + [string, string, string], + { role: string; previousAdminRole: string; newAdminRole: string } + >; + + RoleGranted( + role: BytesLike | null, + account: string | null, + sender: string | null + ): TypedEventFilter< + [string, string, string], + { role: string; account: string; sender: string } + >; + + RoleRevoked( + role: BytesLike | null, + account: string | null, + sender: string | null + ): TypedEventFilter< + [string, string, string], + { role: string; account: string; sender: string } + >; + }; + + estimateGas: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + "DEFAULT_ADMIN_ROLE()"(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + DEFAULT_ADMIN_ROLE( + overrides?: CallOverrides + ): Promise; + + "DEFAULT_ADMIN_ROLE()"( + overrides?: CallOverrides + ): Promise; + + getRoleAdmin( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/BaseAdminUpgradeabilityProxy.d.ts b/packages/chain-events/src/contractTypes/BaseAdminUpgradeabilityProxy.d.ts new file mode 100644 index 00000000000..86280042b0a --- /dev/null +++ b/packages/chain-events/src/contractTypes/BaseAdminUpgradeabilityProxy.d.ts @@ -0,0 +1,361 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface BaseAdminUpgradeabilityProxyInterface extends ethers.utils.Interface { + functions: { + "admin()": FunctionFragment; + "changeAdmin(address)": FunctionFragment; + "implementation()": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData(functionFragment: "changeAdmin", values: [string]): string; + encodeFunctionData( + functionFragment: "implementation", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "upgradeTo", values: [string]): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [string, BytesLike] + ): string; + + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "changeAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "implementation", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; +} + +export class BaseAdminUpgradeabilityProxy extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: BaseAdminUpgradeabilityProxyInterface; + + functions: { + admin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "admin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + changeAdmin( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "changeAdmin(address)"( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + implementation( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "implementation()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "upgradeTo(address)"( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "upgradeToAndCall(address,bytes)"( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; + + admin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "admin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + changeAdmin( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "changeAdmin(address)"( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + implementation( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "implementation()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "upgradeTo(address)"( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "upgradeToAndCall(address,bytes)"( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + callStatic: { + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + changeAdmin(newAdmin: string, overrides?: CallOverrides): Promise; + + "changeAdmin(address)"( + newAdmin: string, + overrides?: CallOverrides + ): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + upgradeTo( + newImplementation: string, + overrides?: CallOverrides + ): Promise; + + "upgradeTo(address)"( + newImplementation: string, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + "upgradeToAndCall(address,bytes)"( + newImplementation: string, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + AdminChanged( + previousAdmin: null, + newAdmin: null + ): TypedEventFilter< + [string, string], + { previousAdmin: string; newAdmin: string } + >; + + Upgraded( + implementation: string | null + ): TypedEventFilter<[string], { implementation: string }>; + }; + + estimateGas: { + admin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "admin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + changeAdmin( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "changeAdmin(address)"( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + implementation( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "implementation()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "upgradeTo(address)"( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "upgradeToAndCall(address,bytes)"( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + admin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "admin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + changeAdmin( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "changeAdmin(address)"( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + implementation( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "implementation()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "upgradeTo(address)"( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "upgradeToAndCall(address,bytes)"( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/BaseUpgradeabilityProxy.d.ts b/packages/chain-events/src/contractTypes/BaseUpgradeabilityProxy.d.ts new file mode 100644 index 00000000000..7df037b9202 --- /dev/null +++ b/packages/chain-events/src/contractTypes/BaseUpgradeabilityProxy.d.ts @@ -0,0 +1,86 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface BaseUpgradeabilityProxyInterface extends ethers.utils.Interface { + functions: {}; + + events: { + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; +} + +export class BaseUpgradeabilityProxy extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: BaseUpgradeabilityProxyInterface; + + functions: {}; + + callStatic: {}; + + filters: { + Upgraded( + implementation: string | null + ): TypedEventFilter<[string], { implementation: string }>; + }; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/chain-events/src/contractTypes/CompInterface.d.ts b/packages/chain-events/src/contractTypes/CompInterface.d.ts new file mode 100644 index 00000000000..734aecb7dad --- /dev/null +++ b/packages/chain-events/src/contractTypes/CompInterface.d.ts @@ -0,0 +1,151 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface CompInterfaceInterface extends ethers.utils.Interface { + functions: { + "getPriorVotes(address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "getPriorVotes", + values: [string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "getPriorVotes", + data: BytesLike + ): Result; + + events: {}; +} + +export class CompInterface extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: CompInterfaceInterface; + + functions: { + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + }; + + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + callStatic: { + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/Context.d.ts b/packages/chain-events/src/contractTypes/Context.d.ts new file mode 100644 index 00000000000..5bd225eae89 --- /dev/null +++ b/packages/chain-events/src/contractTypes/Context.d.ts @@ -0,0 +1,78 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ContextInterface extends ethers.utils.Interface { + functions: {}; + + events: {}; +} + +export class Context extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ContextInterface; + + functions: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/chain-events/src/contractTypes/ERC165.d.ts b/packages/chain-events/src/contractTypes/ERC165.d.ts new file mode 100644 index 00000000000..e6beb984ded --- /dev/null +++ b/packages/chain-events/src/contractTypes/ERC165.d.ts @@ -0,0 +1,141 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ERC165Interface extends ethers.utils.Interface { + functions: { + "supportsInterface(bytes4)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + + events: {}; +} + +export class ERC165 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ERC165Interface; + + functions: { + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + callStatic: { + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ERC20.d.ts b/packages/chain-events/src/contractTypes/ERC20.d.ts new file mode 100644 index 00000000000..a5755d23e18 --- /dev/null +++ b/packages/chain-events/src/contractTypes/ERC20.d.ts @@ -0,0 +1,592 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ERC20Interface extends ethers.utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class ERC20 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ERC20Interface; + + functions: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + owner: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ERC20Permit.d.ts b/packages/chain-events/src/contractTypes/ERC20Permit.d.ts new file mode 100644 index 00000000000..4969d3b2ca3 --- /dev/null +++ b/packages/chain-events/src/contractTypes/ERC20Permit.d.ts @@ -0,0 +1,857 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ERC20PermitInterface extends ethers.utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class ERC20Permit extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ERC20PermitInterface; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + "decimals()"(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"( + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces( + owner: string, + overrides?: CallOverrides + ): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ERC20Votes.d.ts b/packages/chain-events/src/contractTypes/ERC20Votes.d.ts new file mode 100644 index 00000000000..9ac4795f9c0 --- /dev/null +++ b/packages/chain-events/src/contractTypes/ERC20Votes.d.ts @@ -0,0 +1,1377 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ERC20VotesInterface extends ethers.utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "checkpoints(address,uint32)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "delegate(address)": FunctionFragment; + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "delegates(address)": FunctionFragment; + "getPastTotalSupply(uint256)": FunctionFragment; + "getPastVotes(address,uint256)": FunctionFragment; + "getVotes(address)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "numCheckpoints(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "checkpoints", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "delegate", values: [string]): string; + encodeFunctionData( + functionFragment: "delegateBySig", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "delegates", values: [string]): string; + encodeFunctionData( + functionFragment: "getPastTotalSupply", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getPastVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "getVotes", values: [string]): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "numCheckpoints", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "checkpoints", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "delegateBySig", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getPastTotalSupply", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPastVotes", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "numCheckpoints", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "DelegateChanged(address,address,address)": EventFragment; + "DelegateVotesChanged(address,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegateVotesChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class ERC20Votes extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ERC20VotesInterface; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[[number, BigNumber] & { fromBlock: number; votes: BigNumber }]>; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[[number, BigNumber] & { fromBlock: number; votes: BigNumber }]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + "decimals()"(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates(account: string, overrides?: CallOverrides): Promise<[string]>; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[string]>; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getVotes(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + numCheckpoints( + account: string, + overrides?: CallOverrides + ): Promise<[number]>; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[number]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates(account: string, overrides?: CallOverrides): Promise; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotes(account: string, overrides?: CallOverrides): Promise; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints(account: string, overrides?: CallOverrides): Promise; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delegate(delegatee: string, overrides?: CallOverrides): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: CallOverrides + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + delegates(account: string, overrides?: CallOverrides): Promise; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotes(account: string, overrides?: CallOverrides): Promise; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints(account: string, overrides?: CallOverrides): Promise; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + DelegateChanged( + delegator: string | null, + fromDelegate: string | null, + toDelegate: string | null + ): TypedEventFilter< + [string, string, string], + { delegator: string; fromDelegate: string; toDelegate: string } + >; + + DelegateVotesChanged( + delegate: string | null, + previousBalance: null, + newBalance: null + ): TypedEventFilter< + [string, BigNumber, BigNumber], + { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates(account: string, overrides?: CallOverrides): Promise; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotes(account: string, overrides?: CallOverrides): Promise; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints( + account: string, + overrides?: CallOverrides + ): Promise; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"( + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates( + account: string, + overrides?: CallOverrides + ): Promise; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + overrides?: CallOverrides + ): Promise; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces( + owner: string, + overrides?: CallOverrides + ): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints( + account: string, + overrides?: CallOverrides + ): Promise; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ERC20VotesComp.d.ts b/packages/chain-events/src/contractTypes/ERC20VotesComp.d.ts new file mode 100644 index 00000000000..96e188f08a0 --- /dev/null +++ b/packages/chain-events/src/contractTypes/ERC20VotesComp.d.ts @@ -0,0 +1,1505 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ERC20VotesCompInterface extends ethers.utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "checkpoints(address,uint32)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "delegate(address)": FunctionFragment; + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "delegates(address)": FunctionFragment; + "getCurrentVotes(address)": FunctionFragment; + "getPastTotalSupply(uint256)": FunctionFragment; + "getPastVotes(address,uint256)": FunctionFragment; + "getPriorVotes(address,uint256)": FunctionFragment; + "getVotes(address)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "numCheckpoints(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "checkpoints", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "delegate", values: [string]): string; + encodeFunctionData( + functionFragment: "delegateBySig", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "delegates", values: [string]): string; + encodeFunctionData( + functionFragment: "getCurrentVotes", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "getPastTotalSupply", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getPastVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getPriorVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "getVotes", values: [string]): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "numCheckpoints", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "checkpoints", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "delegateBySig", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getCurrentVotes", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPastTotalSupply", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPastVotes", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPriorVotes", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "numCheckpoints", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "DelegateChanged(address,address,address)": EventFragment; + "DelegateVotesChanged(address,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegateVotesChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class ERC20VotesComp extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ERC20VotesCompInterface; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[[number, BigNumber] & { fromBlock: number; votes: BigNumber }]>; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[[number, BigNumber] & { fromBlock: number; votes: BigNumber }]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + "decimals()"(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates(account: string, overrides?: CallOverrides): Promise<[string]>; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[string]>; + + getCurrentVotes( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getCurrentVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getVotes(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + numCheckpoints( + account: string, + overrides?: CallOverrides + ): Promise<[number]>; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[number]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates(account: string, overrides?: CallOverrides): Promise; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getCurrentVotes( + account: string, + overrides?: CallOverrides + ): Promise; + + "getCurrentVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotes(account: string, overrides?: CallOverrides): Promise; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints(account: string, overrides?: CallOverrides): Promise; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delegate(delegatee: string, overrides?: CallOverrides): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: CallOverrides + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + delegates(account: string, overrides?: CallOverrides): Promise; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getCurrentVotes( + account: string, + overrides?: CallOverrides + ): Promise; + + "getCurrentVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotes(account: string, overrides?: CallOverrides): Promise; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints(account: string, overrides?: CallOverrides): Promise; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + DelegateChanged( + delegator: string | null, + fromDelegate: string | null, + toDelegate: string | null + ): TypedEventFilter< + [string, string, string], + { delegator: string; fromDelegate: string; toDelegate: string } + >; + + DelegateVotesChanged( + delegate: string | null, + previousBalance: null, + newBalance: null + ): TypedEventFilter< + [string, BigNumber, BigNumber], + { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates(account: string, overrides?: CallOverrides): Promise; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getCurrentVotes( + account: string, + overrides?: CallOverrides + ): Promise; + + "getCurrentVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotes(account: string, overrides?: CallOverrides): Promise; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints( + account: string, + overrides?: CallOverrides + ): Promise; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"( + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates( + account: string, + overrides?: CallOverrides + ): Promise; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getCurrentVotes( + account: string, + overrides?: CallOverrides + ): Promise; + + "getCurrentVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + overrides?: CallOverrides + ): Promise; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces( + owner: string, + overrides?: CallOverrides + ): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints( + account: string, + overrides?: CallOverrides + ): Promise; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ERC20VotesMock.d.ts b/packages/chain-events/src/contractTypes/ERC20VotesMock.d.ts new file mode 100644 index 00000000000..2734c088d73 --- /dev/null +++ b/packages/chain-events/src/contractTypes/ERC20VotesMock.d.ts @@ -0,0 +1,1535 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ERC20VotesMockInterface extends ethers.utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "burn(address,uint256)": FunctionFragment; + "checkpoints(address,uint32)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "delegate(address)": FunctionFragment; + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "delegates(address)": FunctionFragment; + "getChainId()": FunctionFragment; + "getPastTotalSupply(uint256)": FunctionFragment; + "getPastVotes(address,uint256)": FunctionFragment; + "getVotes(address)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "mint(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "numCheckpoints(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "burn", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "checkpoints", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "delegate", values: [string]): string; + encodeFunctionData( + functionFragment: "delegateBySig", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "delegates", values: [string]): string; + encodeFunctionData( + functionFragment: "getChainId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getPastTotalSupply", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getPastVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "getVotes", values: [string]): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "mint", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "numCheckpoints", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "checkpoints", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "delegateBySig", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getChainId", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getPastTotalSupply", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPastVotes", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "numCheckpoints", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "DelegateChanged(address,address,address)": EventFragment; + "DelegateVotesChanged(address,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegateVotesChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class ERC20VotesMock extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ERC20VotesMockInterface; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + burn( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(address,uint256)"( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[[number, BigNumber] & { fromBlock: number; votes: BigNumber }]>; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[[number, BigNumber] & { fromBlock: number; votes: BigNumber }]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + "decimals()"(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates(account: string, overrides?: CallOverrides): Promise<[string]>; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[string]>; + + getChainId(overrides?: CallOverrides): Promise<[BigNumber]>; + + "getChainId()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getVotes(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "mint(address,uint256)"( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + numCheckpoints( + account: string, + overrides?: CallOverrides + ): Promise<[number]>; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[number]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + burn( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(address,uint256)"( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates(account: string, overrides?: CallOverrides): Promise; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getChainId(overrides?: CallOverrides): Promise; + + "getChainId()"(overrides?: CallOverrides): Promise; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotes(account: string, overrides?: CallOverrides): Promise; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "mint(address,uint256)"( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints(account: string, overrides?: CallOverrides): Promise; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + burn( + account: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "burn(address,uint256)"( + account: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delegate(delegatee: string, overrides?: CallOverrides): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: CallOverrides + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + delegates(account: string, overrides?: CallOverrides): Promise; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getChainId(overrides?: CallOverrides): Promise; + + "getChainId()"(overrides?: CallOverrides): Promise; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotes(account: string, overrides?: CallOverrides): Promise; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + mint( + account: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "mint(address,uint256)"( + account: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints(account: string, overrides?: CallOverrides): Promise; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + DelegateChanged( + delegator: string | null, + fromDelegate: string | null, + toDelegate: string | null + ): TypedEventFilter< + [string, string, string], + { delegator: string; fromDelegate: string; toDelegate: string } + >; + + DelegateVotesChanged( + delegate: string | null, + previousBalance: null, + newBalance: null + ): TypedEventFilter< + [string, BigNumber, BigNumber], + { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + burn( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(address,uint256)"( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates(account: string, overrides?: CallOverrides): Promise; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getChainId(overrides?: CallOverrides): Promise; + + "getChainId()"(overrides?: CallOverrides): Promise; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotes(account: string, overrides?: CallOverrides): Promise; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "mint(address,uint256)"( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints( + account: string, + overrides?: CallOverrides + ): Promise; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"( + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + burn( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(address,uint256)"( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + checkpoints( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "checkpoints(address,uint32)"( + account: string, + pos: BigNumberish, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates( + account: string, + overrides?: CallOverrides + ): Promise; + + "delegates(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getChainId(overrides?: CallOverrides): Promise; + + "getChainId()"(overrides?: CallOverrides): Promise; + + getPastTotalSupply( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastTotalSupply(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPastVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPastVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + overrides?: CallOverrides + ): Promise; + + "getVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + mint( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "mint(address,uint256)"( + account: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces( + owner: string, + overrides?: CallOverrides + ): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints( + account: string, + overrides?: CallOverrides + ): Promise; + + "numCheckpoints(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ERC721.d.ts b/packages/chain-events/src/contractTypes/ERC721.d.ts new file mode 100644 index 00000000000..c579ac04b22 --- /dev/null +++ b/packages/chain-events/src/contractTypes/ERC721.d.ts @@ -0,0 +1,694 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ERC721Interface extends ethers.utils.Interface { + functions: { + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "getApproved(uint256)": FunctionFragment; + "isApprovedForAll(address,address)": FunctionFragment; + "ownerOf(uint256)": FunctionFragment; + "safeTransferFrom(address,address,uint256)": FunctionFragment; + "setApprovalForAll(address,bool)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "getApproved", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isApprovedForAll", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "ownerOf", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "safeTransferFrom", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setApprovalForAll", + values: [string, boolean] + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getApproved", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isApprovedForAll", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ownerOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "safeTransferFrom", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setApprovalForAll", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "ApprovalForAll(address,address,bool)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class ERC721 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ERC721Interface; + + functions: { + approve( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getApproved( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + "getApproved(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + isApprovedForAll( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isApprovedForAll(address,address)"( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ownerOf( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + "ownerOf(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + "safeTransferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "safeTransferFrom(address,address,uint256,bytes)"( + from: string, + to: string, + tokenId: BigNumberish, + _data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setApprovalForAll( + to: string, + approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setApprovalForAll(address,bool)"( + to: string, + approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + approve( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + getApproved( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getApproved(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + "isApprovedForAll(address,address)"( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + + "ownerOf(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "safeTransferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "safeTransferFrom(address,address,uint256,bytes)"( + from: string, + to: string, + tokenId: BigNumberish, + _data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setApprovalForAll( + to: string, + approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setApprovalForAll(address,bool)"( + to: string, + approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + approve( + to: string, + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + to: string, + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + getApproved( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getApproved(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + "isApprovedForAll(address,address)"( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + + "ownerOf(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "safeTransferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "safeTransferFrom(address,address,uint256,bytes)"( + from: string, + to: string, + tokenId: BigNumberish, + _data: BytesLike, + overrides?: CallOverrides + ): Promise; + + setApprovalForAll( + to: string, + approved: boolean, + overrides?: CallOverrides + ): Promise; + + "setApprovalForAll(address,bool)"( + to: string, + approved: boolean, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + approved: string | null, + tokenId: BigNumberish | null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; approved: string; tokenId: BigNumber } + >; + + ApprovalForAll( + owner: string | null, + operator: string | null, + approved: null + ): TypedEventFilter< + [string, string, boolean], + { owner: string; operator: string; approved: boolean } + >; + + Transfer( + from: string | null, + to: string | null, + tokenId: BigNumberish | null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; tokenId: BigNumber } + >; + }; + + estimateGas: { + approve( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + getApproved( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getApproved(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + "isApprovedForAll(address,address)"( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + ownerOf( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "ownerOf(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "safeTransferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "safeTransferFrom(address,address,uint256,bytes)"( + from: string, + to: string, + tokenId: BigNumberish, + _data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setApprovalForAll( + to: string, + approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setApprovalForAll(address,bool)"( + to: string, + approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + approve( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + owner: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + getApproved( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getApproved(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + "isApprovedForAll(address,address)"( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + ownerOf( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "ownerOf(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "safeTransferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "safeTransferFrom(address,address,uint256,bytes)"( + from: string, + to: string, + tokenId: BigNumberish, + _data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setApprovalForAll( + to: string, + approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setApprovalForAll(address,bool)"( + to: string, + approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ERC777.d.ts b/packages/chain-events/src/contractTypes/ERC777.d.ts new file mode 100644 index 00000000000..059fff51d3f --- /dev/null +++ b/packages/chain-events/src/contractTypes/ERC777.d.ts @@ -0,0 +1,1185 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ERC777Interface extends ethers.utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "authorizeOperator(address)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "burn(uint256,bytes)": FunctionFragment; + "decimals()": FunctionFragment; + "defaultOperators()": FunctionFragment; + "granularity()": FunctionFragment; + "isOperatorFor(address,address)": FunctionFragment; + "name()": FunctionFragment; + "operatorBurn(address,uint256,bytes,bytes)": FunctionFragment; + "operatorSend(address,address,uint256,bytes,bytes)": FunctionFragment; + "revokeOperator(address)": FunctionFragment; + "send(address,uint256,bytes)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "authorizeOperator", + values: [string] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "burn", + values: [BigNumberish, BytesLike] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "defaultOperators", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "granularity", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isOperatorFor", + values: [string, string] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "operatorBurn", + values: [string, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "operatorSend", + values: [string, string, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "revokeOperator", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "send", + values: [string, BigNumberish, BytesLike] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "authorizeOperator", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "defaultOperators", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "granularity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isOperatorFor", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "operatorBurn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "operatorSend", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "revokeOperator", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "AuthorizedOperator(address,address)": EventFragment; + "Burned(address,address,uint256,bytes,bytes)": EventFragment; + "Minted(address,address,uint256,bytes,bytes)": EventFragment; + "RevokedOperator(address,address)": EventFragment; + "Sent(address,address,address,uint256,bytes,bytes)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "AuthorizedOperator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Burned"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Minted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RevokedOperator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Sent"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class ERC777 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ERC777Interface; + + functions: { + allowance( + holder: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + holder: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + authorizeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + tokenHolder: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "balanceOf(address)"( + tokenHolder: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + burn( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(uint256,bytes)"( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + "decimals()"(overrides?: CallOverrides): Promise<[number]>; + + defaultOperators(overrides?: CallOverrides): Promise<[string[]]>; + + "defaultOperators()"(overrides?: CallOverrides): Promise<[string[]]>; + + granularity(overrides?: CallOverrides): Promise<[BigNumber]>; + + "granularity()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + isOperatorFor( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isOperatorFor(address,address)"( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + operatorBurn( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorBurn(address,uint256,bytes,bytes)"( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + operatorSend( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorSend(address,address,uint256,bytes,bytes)"( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "send(address,uint256,bytes)"( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + holder: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + holder: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + holder: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + holder: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + authorizeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(tokenHolder: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + burn( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(uint256,bytes)"( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + defaultOperators(overrides?: CallOverrides): Promise; + + "defaultOperators()"(overrides?: CallOverrides): Promise; + + granularity(overrides?: CallOverrides): Promise; + + "granularity()"(overrides?: CallOverrides): Promise; + + isOperatorFor( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + "isOperatorFor(address,address)"( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + operatorBurn( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorBurn(address,uint256,bytes,bytes)"( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + operatorSend( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorSend(address,address,uint256,bytes,bytes)"( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "send(address,uint256,bytes)"( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + holder: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + holder: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + holder: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + holder: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + authorizeOperator( + operator: string, + overrides?: CallOverrides + ): Promise; + + "authorizeOperator(address)"( + operator: string, + overrides?: CallOverrides + ): Promise; + + balanceOf( + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + burn( + amount: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + "burn(uint256,bytes)"( + amount: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + defaultOperators(overrides?: CallOverrides): Promise; + + "defaultOperators()"(overrides?: CallOverrides): Promise; + + granularity(overrides?: CallOverrides): Promise; + + "granularity()"(overrides?: CallOverrides): Promise; + + isOperatorFor( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + "isOperatorFor(address,address)"( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + operatorBurn( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: CallOverrides + ): Promise; + + "operatorBurn(address,uint256,bytes,bytes)"( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: CallOverrides + ): Promise; + + operatorSend( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: CallOverrides + ): Promise; + + "operatorSend(address,address,uint256,bytes,bytes)"( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: CallOverrides + ): Promise; + + revokeOperator(operator: string, overrides?: CallOverrides): Promise; + + "revokeOperator(address)"( + operator: string, + overrides?: CallOverrides + ): Promise; + + send( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + "send(address,uint256,bytes)"( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + holder: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + holder: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + AuthorizedOperator( + operator: string | null, + tokenHolder: string | null + ): TypedEventFilter< + [string, string], + { operator: string; tokenHolder: string } + >; + + Burned( + operator: string | null, + from: string | null, + amount: null, + data: null, + operatorData: null + ): TypedEventFilter< + [string, string, BigNumber, string, string], + { + operator: string; + from: string; + amount: BigNumber; + data: string; + operatorData: string; + } + >; + + Minted( + operator: string | null, + to: string | null, + amount: null, + data: null, + operatorData: null + ): TypedEventFilter< + [string, string, BigNumber, string, string], + { + operator: string; + to: string; + amount: BigNumber; + data: string; + operatorData: string; + } + >; + + RevokedOperator( + operator: string | null, + tokenHolder: string | null + ): TypedEventFilter< + [string, string], + { operator: string; tokenHolder: string } + >; + + Sent( + operator: string | null, + from: string | null, + to: string | null, + amount: null, + data: null, + operatorData: null + ): TypedEventFilter< + [string, string, string, BigNumber, string, string], + { + operator: string; + from: string; + to: string; + amount: BigNumber; + data: string; + operatorData: string; + } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + allowance( + holder: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + holder: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + authorizeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + burn( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(uint256,bytes)"( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + defaultOperators(overrides?: CallOverrides): Promise; + + "defaultOperators()"(overrides?: CallOverrides): Promise; + + granularity(overrides?: CallOverrides): Promise; + + "granularity()"(overrides?: CallOverrides): Promise; + + isOperatorFor( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + "isOperatorFor(address,address)"( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + operatorBurn( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorBurn(address,uint256,bytes,bytes)"( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + operatorSend( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorSend(address,address,uint256,bytes,bytes)"( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "send(address,uint256,bytes)"( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + holder: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + holder: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + holder: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + holder: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + authorizeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + burn( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(uint256,bytes)"( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + defaultOperators(overrides?: CallOverrides): Promise; + + "defaultOperators()"( + overrides?: CallOverrides + ): Promise; + + granularity(overrides?: CallOverrides): Promise; + + "granularity()"(overrides?: CallOverrides): Promise; + + isOperatorFor( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + "isOperatorFor(address,address)"( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + operatorBurn( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorBurn(address,uint256,bytes,bytes)"( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + operatorSend( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorSend(address,address,uint256,bytes,bytes)"( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "send(address,uint256,bytes)"( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + holder: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + holder: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/Executor.d.ts b/packages/chain-events/src/contractTypes/Executor.d.ts new file mode 100644 index 00000000000..f7c84fa9eb1 --- /dev/null +++ b/packages/chain-events/src/contractTypes/Executor.d.ts @@ -0,0 +1,1684 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ExecutorInterface extends ethers.utils.Interface { + functions: { + "GRACE_PERIOD()": FunctionFragment; + "MAXIMUM_DELAY()": FunctionFragment; + "MINIMUM_DELAY()": FunctionFragment; + "MINIMUM_QUORUM()": FunctionFragment; + "ONE_HUNDRED_WITH_PRECISION()": FunctionFragment; + "PROPOSITION_THRESHOLD()": FunctionFragment; + "VOTE_DIFFERENTIAL()": FunctionFragment; + "VOTING_DURATION()": FunctionFragment; + "acceptAdmin()": FunctionFragment; + "cancelTransaction(address,uint256,string,bytes,uint256,bool)": FunctionFragment; + "executeTransaction(address,uint256,string,bytes,uint256,bool)": FunctionFragment; + "getAdmin()": FunctionFragment; + "getDelay()": FunctionFragment; + "getMinimumPropositionPowerNeeded(address,uint256)": FunctionFragment; + "getMinimumVotingPowerNeeded(uint256)": FunctionFragment; + "getPendingAdmin()": FunctionFragment; + "isActionQueued(bytes32)": FunctionFragment; + "isProposalOverGracePeriod(address,uint256)": FunctionFragment; + "isProposalPassed(address,uint256)": FunctionFragment; + "isPropositionPowerEnough(address,address,uint256)": FunctionFragment; + "isQuorumValid(address,uint256)": FunctionFragment; + "isVoteDifferentialValid(address,uint256)": FunctionFragment; + "queueTransaction(address,uint256,string,bytes,uint256,bool)": FunctionFragment; + "setDelay(uint256)": FunctionFragment; + "setPendingAdmin(address)": FunctionFragment; + "validateCreatorOfProposal(address,address,uint256)": FunctionFragment; + "validateProposalCancellation(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "GRACE_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAXIMUM_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MINIMUM_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MINIMUM_QUORUM", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ONE_HUNDRED_WITH_PRECISION", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PROPOSITION_THRESHOLD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "VOTE_DIFFERENTIAL", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "VOTING_DURATION", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "acceptAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "cancelTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "executeTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish, boolean] + ): string; + encodeFunctionData(functionFragment: "getAdmin", values?: undefined): string; + encodeFunctionData(functionFragment: "getDelay", values?: undefined): string; + encodeFunctionData( + functionFragment: "getMinimumPropositionPowerNeeded", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getMinimumVotingPowerNeeded", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getPendingAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isActionQueued", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "isProposalOverGracePeriod", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isProposalPassed", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isPropositionPowerEnough", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isQuorumValid", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isVoteDifferentialValid", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "queueTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "setDelay", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setPendingAdmin", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "validateCreatorOfProposal", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "validateProposalCancellation", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "GRACE_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAXIMUM_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MINIMUM_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MINIMUM_QUORUM", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "ONE_HUNDRED_WITH_PRECISION", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PROPOSITION_THRESHOLD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "VOTE_DIFFERENTIAL", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "VOTING_DURATION", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "cancelTransaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeTransaction", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getAdmin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDelay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getMinimumPropositionPowerNeeded", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getMinimumVotingPowerNeeded", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isActionQueued", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isProposalOverGracePeriod", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isProposalPassed", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isPropositionPowerEnough", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isQuorumValid", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isVoteDifferentialValid", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "queueTransaction", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setDelay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validateCreatorOfProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validateProposalCancellation", + data: BytesLike + ): Result; + + events: { + "CancelledAction(bytes32,address,uint256,string,bytes,uint256,bool)": EventFragment; + "ExecutedAction(bytes32,address,uint256,string,bytes,uint256,bool,bytes)": EventFragment; + "NewAdmin(address)": EventFragment; + "NewDelay(uint256)": EventFragment; + "NewPendingAdmin(address)": EventFragment; + "QueuedAction(bytes32,address,uint256,string,bytes,uint256,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "CancelledAction"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedAction"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewDelay"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewPendingAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "QueuedAction"): EventFragment; +} + +export class Executor extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ExecutorInterface; + + functions: { + GRACE_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MINIMUM_QUORUM(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MINIMUM_QUORUM()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + ONE_HUNDRED_WITH_PRECISION(overrides?: CallOverrides): Promise<[BigNumber]>; + + "ONE_HUNDRED_WITH_PRECISION()"( + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + PROPOSITION_THRESHOLD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "PROPOSITION_THRESHOLD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise<[BigNumber]>; + + "VOTE_DIFFERENTIAL()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + VOTING_DURATION(overrides?: CallOverrides): Promise<[BigNumber]>; + + "VOTING_DURATION()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise<[string]>; + + "getAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + getDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "getDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getPendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + "getPendingAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setDelay( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_QUORUM(overrides?: CallOverrides): Promise; + + "MINIMUM_QUORUM()"(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_WITH_PRECISION(overrides?: CallOverrides): Promise; + + "ONE_HUNDRED_WITH_PRECISION()"(overrides?: CallOverrides): Promise; + + PROPOSITION_THRESHOLD(overrides?: CallOverrides): Promise; + + "PROPOSITION_THRESHOLD()"(overrides?: CallOverrides): Promise; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise; + + "VOTE_DIFFERENTIAL()"(overrides?: CallOverrides): Promise; + + VOTING_DURATION(overrides?: CallOverrides): Promise; + + "VOTING_DURATION()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise; + + "getAdmin()"(overrides?: CallOverrides): Promise; + + getDelay(overrides?: CallOverrides): Promise; + + "getDelay()"(overrides?: CallOverrides): Promise; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPendingAdmin(overrides?: CallOverrides): Promise; + + "getPendingAdmin()"(overrides?: CallOverrides): Promise; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setDelay( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + callStatic: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_QUORUM(overrides?: CallOverrides): Promise; + + "MINIMUM_QUORUM()"(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_WITH_PRECISION(overrides?: CallOverrides): Promise; + + "ONE_HUNDRED_WITH_PRECISION()"( + overrides?: CallOverrides + ): Promise; + + PROPOSITION_THRESHOLD(overrides?: CallOverrides): Promise; + + "PROPOSITION_THRESHOLD()"(overrides?: CallOverrides): Promise; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise; + + "VOTE_DIFFERENTIAL()"(overrides?: CallOverrides): Promise; + + VOTING_DURATION(overrides?: CallOverrides): Promise; + + "VOTING_DURATION()"(overrides?: CallOverrides): Promise; + + acceptAdmin(overrides?: CallOverrides): Promise; + + "acceptAdmin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise; + + "getAdmin()"(overrides?: CallOverrides): Promise; + + getDelay(overrides?: CallOverrides): Promise; + + "getDelay()"(overrides?: CallOverrides): Promise; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPendingAdmin(overrides?: CallOverrides): Promise; + + "getPendingAdmin()"(overrides?: CallOverrides): Promise; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + setDelay(delay: BigNumberish, overrides?: CallOverrides): Promise; + + "setDelay(uint256)"( + delay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + setPendingAdmin( + newPendingAdmin: string, + overrides?: CallOverrides + ): Promise; + + "setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: CallOverrides + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + CancelledAction( + actionHash: null, + target: string | null, + value: null, + signature: null, + data: null, + executionTime: null, + withDelegatecall: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber, boolean], + { + actionHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + executionTime: BigNumber; + withDelegatecall: boolean; + } + >; + + ExecutedAction( + actionHash: null, + target: string | null, + value: null, + signature: null, + data: null, + executionTime: null, + withDelegatecall: null, + resultData: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber, boolean, string], + { + actionHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + executionTime: BigNumber; + withDelegatecall: boolean; + resultData: string; + } + >; + + NewAdmin(newAdmin: null): TypedEventFilter<[string], { newAdmin: string }>; + + NewDelay(delay: null): TypedEventFilter<[BigNumber], { delay: BigNumber }>; + + NewPendingAdmin( + newPendingAdmin: null + ): TypedEventFilter<[string], { newPendingAdmin: string }>; + + QueuedAction( + actionHash: null, + target: string | null, + value: null, + signature: null, + data: null, + executionTime: null, + withDelegatecall: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber, boolean], + { + actionHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + executionTime: BigNumber; + withDelegatecall: boolean; + } + >; + }; + + estimateGas: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_QUORUM(overrides?: CallOverrides): Promise; + + "MINIMUM_QUORUM()"(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_WITH_PRECISION(overrides?: CallOverrides): Promise; + + "ONE_HUNDRED_WITH_PRECISION()"( + overrides?: CallOverrides + ): Promise; + + PROPOSITION_THRESHOLD(overrides?: CallOverrides): Promise; + + "PROPOSITION_THRESHOLD()"(overrides?: CallOverrides): Promise; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise; + + "VOTE_DIFFERENTIAL()"(overrides?: CallOverrides): Promise; + + VOTING_DURATION(overrides?: CallOverrides): Promise; + + "VOTING_DURATION()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise; + + "getAdmin()"(overrides?: CallOverrides): Promise; + + getDelay(overrides?: CallOverrides): Promise; + + "getDelay()"(overrides?: CallOverrides): Promise; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPendingAdmin(overrides?: CallOverrides): Promise; + + "getPendingAdmin()"(overrides?: CallOverrides): Promise; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setDelay( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_QUORUM(overrides?: CallOverrides): Promise; + + "MINIMUM_QUORUM()"( + overrides?: CallOverrides + ): Promise; + + ONE_HUNDRED_WITH_PRECISION( + overrides?: CallOverrides + ): Promise; + + "ONE_HUNDRED_WITH_PRECISION()"( + overrides?: CallOverrides + ): Promise; + + PROPOSITION_THRESHOLD( + overrides?: CallOverrides + ): Promise; + + "PROPOSITION_THRESHOLD()"( + overrides?: CallOverrides + ): Promise; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise; + + "VOTE_DIFFERENTIAL()"( + overrides?: CallOverrides + ): Promise; + + VOTING_DURATION(overrides?: CallOverrides): Promise; + + "VOTING_DURATION()"( + overrides?: CallOverrides + ): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise; + + "getAdmin()"(overrides?: CallOverrides): Promise; + + getDelay(overrides?: CallOverrides): Promise; + + "getDelay()"(overrides?: CallOverrides): Promise; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPendingAdmin(overrides?: CallOverrides): Promise; + + "getPendingAdmin()"( + overrides?: CallOverrides + ): Promise; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setDelay( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ExecutorWithTimelock.d.ts b/packages/chain-events/src/contractTypes/ExecutorWithTimelock.d.ts new file mode 100644 index 00000000000..0411752a86f --- /dev/null +++ b/packages/chain-events/src/contractTypes/ExecutorWithTimelock.d.ts @@ -0,0 +1,947 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ExecutorWithTimelockInterface extends ethers.utils.Interface { + functions: { + "GRACE_PERIOD()": FunctionFragment; + "MAXIMUM_DELAY()": FunctionFragment; + "MINIMUM_DELAY()": FunctionFragment; + "acceptAdmin()": FunctionFragment; + "cancelTransaction(address,uint256,string,bytes,uint256,bool)": FunctionFragment; + "executeTransaction(address,uint256,string,bytes,uint256,bool)": FunctionFragment; + "getAdmin()": FunctionFragment; + "getDelay()": FunctionFragment; + "getPendingAdmin()": FunctionFragment; + "isActionQueued(bytes32)": FunctionFragment; + "isProposalOverGracePeriod(address,uint256)": FunctionFragment; + "queueTransaction(address,uint256,string,bytes,uint256,bool)": FunctionFragment; + "setDelay(uint256)": FunctionFragment; + "setPendingAdmin(address)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "GRACE_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAXIMUM_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MINIMUM_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "acceptAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "cancelTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "executeTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish, boolean] + ): string; + encodeFunctionData(functionFragment: "getAdmin", values?: undefined): string; + encodeFunctionData(functionFragment: "getDelay", values?: undefined): string; + encodeFunctionData( + functionFragment: "getPendingAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isActionQueued", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "isProposalOverGracePeriod", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "queueTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "setDelay", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setPendingAdmin", + values: [string] + ): string; + + decodeFunctionResult( + functionFragment: "GRACE_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAXIMUM_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MINIMUM_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "cancelTransaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeTransaction", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getAdmin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDelay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isActionQueued", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isProposalOverGracePeriod", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "queueTransaction", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setDelay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setPendingAdmin", + data: BytesLike + ): Result; + + events: { + "CancelledAction(bytes32,address,uint256,string,bytes,uint256,bool)": EventFragment; + "ExecutedAction(bytes32,address,uint256,string,bytes,uint256,bool,bytes)": EventFragment; + "NewAdmin(address)": EventFragment; + "NewDelay(uint256)": EventFragment; + "NewPendingAdmin(address)": EventFragment; + "QueuedAction(bytes32,address,uint256,string,bytes,uint256,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "CancelledAction"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedAction"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewDelay"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewPendingAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "QueuedAction"): EventFragment; +} + +export class ExecutorWithTimelock extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ExecutorWithTimelockInterface; + + functions: { + GRACE_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise<[string]>; + + "getAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + getDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "getDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getPendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + "getPendingAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setDelay( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise; + + "getAdmin()"(overrides?: CallOverrides): Promise; + + getDelay(overrides?: CallOverrides): Promise; + + "getDelay()"(overrides?: CallOverrides): Promise; + + getPendingAdmin(overrides?: CallOverrides): Promise; + + "getPendingAdmin()"(overrides?: CallOverrides): Promise; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setDelay( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin(overrides?: CallOverrides): Promise; + + "acceptAdmin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise; + + "getAdmin()"(overrides?: CallOverrides): Promise; + + getDelay(overrides?: CallOverrides): Promise; + + "getDelay()"(overrides?: CallOverrides): Promise; + + getPendingAdmin(overrides?: CallOverrides): Promise; + + "getPendingAdmin()"(overrides?: CallOverrides): Promise; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + setDelay(delay: BigNumberish, overrides?: CallOverrides): Promise; + + "setDelay(uint256)"( + delay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + setPendingAdmin( + newPendingAdmin: string, + overrides?: CallOverrides + ): Promise; + + "setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + CancelledAction( + actionHash: null, + target: string | null, + value: null, + signature: null, + data: null, + executionTime: null, + withDelegatecall: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber, boolean], + { + actionHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + executionTime: BigNumber; + withDelegatecall: boolean; + } + >; + + ExecutedAction( + actionHash: null, + target: string | null, + value: null, + signature: null, + data: null, + executionTime: null, + withDelegatecall: null, + resultData: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber, boolean, string], + { + actionHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + executionTime: BigNumber; + withDelegatecall: boolean; + resultData: string; + } + >; + + NewAdmin(newAdmin: null): TypedEventFilter<[string], { newAdmin: string }>; + + NewDelay(delay: null): TypedEventFilter<[BigNumber], { delay: BigNumber }>; + + NewPendingAdmin( + newPendingAdmin: null + ): TypedEventFilter<[string], { newPendingAdmin: string }>; + + QueuedAction( + actionHash: null, + target: string | null, + value: null, + signature: null, + data: null, + executionTime: null, + withDelegatecall: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber, boolean], + { + actionHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + executionTime: BigNumber; + withDelegatecall: boolean; + } + >; + }; + + estimateGas: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise; + + "getAdmin()"(overrides?: CallOverrides): Promise; + + getDelay(overrides?: CallOverrides): Promise; + + "getDelay()"(overrides?: CallOverrides): Promise; + + getPendingAdmin(overrides?: CallOverrides): Promise; + + "getPendingAdmin()"(overrides?: CallOverrides): Promise; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setDelay( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise; + + "getAdmin()"(overrides?: CallOverrides): Promise; + + getDelay(overrides?: CallOverrides): Promise; + + "getDelay()"(overrides?: CallOverrides): Promise; + + getPendingAdmin(overrides?: CallOverrides): Promise; + + "getPendingAdmin()"( + overrides?: CallOverrides + ): Promise; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setDelay( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/FeiDAO.d.ts b/packages/chain-events/src/contractTypes/FeiDAO.d.ts new file mode 100644 index 00000000000..1fe7d6e6436 --- /dev/null +++ b/packages/chain-events/src/contractTypes/FeiDAO.d.ts @@ -0,0 +1,2473 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface FeiDAOInterface extends ethers.utils.Interface { + functions: { + "BACKUP_GOVERNOR()": FunctionFragment; + "BALLOT_TYPEHASH()": FunctionFragment; + "COUNTING_MODE()": FunctionFragment; + "ROLLBACK_DEADLINE()": FunctionFragment; + "__acceptAdmin()": FunctionFragment; + "__executeRollback()": FunctionFragment; + "__rollback(uint256)": FunctionFragment; + "cancel(uint256)": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getActions(uint256)": FunctionFragment; + "getReceipt(uint256,address)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalEta(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "proposalThreshold()": FunctionFragment; + "proposals(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "queue(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "quorumVotes()": FunctionFragment; + "setProposalThreshold(uint256)": FunctionFragment; + "setQuorum(uint256)": FunctionFragment; + "setVotingDelay(uint256)": FunctionFragment; + "setVotingPeriod(uint256)": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "timelock()": FunctionFragment; + "token()": FunctionFragment; + "updateTimelock(address)": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BACKUP_GOVERNOR", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ROLLBACK_DEADLINE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "__acceptAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "__executeRollback", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "__rollback", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "cancel", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getActions", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getReceipt", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalEta", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalThreshold", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposals", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "queue", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "quorumVotes", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setProposalThreshold", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setQuorum", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setVotingDelay", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setVotingPeriod", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "timelock", values?: undefined): string; + encodeFunctionData(functionFragment: "token", values?: undefined): string; + encodeFunctionData( + functionFragment: "updateTimelock", + values: [string] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BACKUP_GOVERNOR", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "ROLLBACK_DEADLINE", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "__acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "__executeRollback", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "__rollback", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActions", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getReceipt", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalEta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "proposals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "quorumVotes", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setProposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setQuorum", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setVotingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setVotingPeriod", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "timelock", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "token", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updateTimelock", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "ProposalThresholdUpdated(uint256,uint256)": EventFragment; + "QuorumUpdated(uint256,uint256)": EventFragment; + "Rollback()": EventFragment; + "RollbackQueued(uint256)": EventFragment; + "TimelockChange(address,address)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + "VotingDelayUpdated(uint256,uint256)": EventFragment; + "VotingPeriodUpdated(uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalThresholdUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "QuorumUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Rollback"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RollbackQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TimelockChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingDelayUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingPeriodUpdated"): EventFragment; +} + +export class FeiDAO extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: FeiDAOInterface; + + functions: { + BACKUP_GOVERNOR(overrides?: CallOverrides): Promise<[string]>; + + "BACKUP_GOVERNOR()"(overrides?: CallOverrides): Promise<[string]>; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + ROLLBACK_DEADLINE(overrides?: CallOverrides): Promise<[BigNumber]>; + + "ROLLBACK_DEADLINE()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __executeRollback( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__executeRollback()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __rollback( + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__rollback(uint256)"( + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + ] + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + ] + >; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalThreshold()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposals( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum(arg0: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorum(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + quorumVotes(overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorumVotes()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setQuorum( + newQuorum: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setQuorum(uint256)"( + newQuorum: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + timelock(overrides?: CallOverrides): Promise<[string]>; + + "timelock()"(overrides?: CallOverrides): Promise<[string]>; + + token(overrides?: CallOverrides): Promise<[string]>; + + "token()"(overrides?: CallOverrides): Promise<[string]>; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BACKUP_GOVERNOR(overrides?: CallOverrides): Promise; + + "BACKUP_GOVERNOR()"(overrides?: CallOverrides): Promise; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + ROLLBACK_DEADLINE(overrides?: CallOverrides): Promise; + + "ROLLBACK_DEADLINE()"(overrides?: CallOverrides): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __executeRollback( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__executeRollback()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __rollback( + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__rollback(uint256)"( + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + "quorum(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setQuorum( + newQuorum: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setQuorum(uint256)"( + newQuorum: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BACKUP_GOVERNOR(overrides?: CallOverrides): Promise; + + "BACKUP_GOVERNOR()"(overrides?: CallOverrides): Promise; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + ROLLBACK_DEADLINE(overrides?: CallOverrides): Promise; + + "ROLLBACK_DEADLINE()"(overrides?: CallOverrides): Promise; + + __acceptAdmin(overrides?: CallOverrides): Promise; + + "__acceptAdmin()"(overrides?: CallOverrides): Promise; + + __executeRollback(overrides?: CallOverrides): Promise; + + "__executeRollback()"(overrides?: CallOverrides): Promise; + + __rollback(eta: BigNumberish, overrides?: CallOverrides): Promise; + + "__rollback(uint256)"( + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + cancel(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorum(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + "quorum(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: CallOverrides + ): Promise; + + setQuorum( + newQuorum: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "setQuorum(uint256)"( + newQuorum: BigNumberish, + overrides?: CallOverrides + ): Promise; + + setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + updateTimelock( + newTimelock: string, + overrides?: CallOverrides + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalQueued( + proposalId: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { proposalId: BigNumber; eta: BigNumber } + >; + + ProposalThresholdUpdated( + oldProposalThreshold: null, + newProposalThreshold: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldProposalThreshold: BigNumber; newProposalThreshold: BigNumber } + >; + + QuorumUpdated( + oldQuorum: null, + newQuorum: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldQuorum: BigNumber; newQuorum: BigNumber } + >; + + Rollback(): TypedEventFilter<[], {}>; + + RollbackQueued( + eta: null + ): TypedEventFilter<[BigNumber], { eta: BigNumber }>; + + TimelockChange( + oldTimelock: null, + newTimelock: null + ): TypedEventFilter< + [string, string], + { oldTimelock: string; newTimelock: string } + >; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + + VotingDelayUpdated( + oldVotingDelay: null, + newVotingDelay: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldVotingDelay: BigNumber; newVotingDelay: BigNumber } + >; + + VotingPeriodUpdated( + oldVotingPeriod: null, + newVotingPeriod: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldVotingPeriod: BigNumber; newVotingPeriod: BigNumber } + >; + }; + + estimateGas: { + BACKUP_GOVERNOR(overrides?: CallOverrides): Promise; + + "BACKUP_GOVERNOR()"(overrides?: CallOverrides): Promise; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + ROLLBACK_DEADLINE(overrides?: CallOverrides): Promise; + + "ROLLBACK_DEADLINE()"(overrides?: CallOverrides): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __executeRollback( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__executeRollback()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __rollback( + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__rollback(uint256)"( + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + "quorum(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setQuorum( + newQuorum: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setQuorum(uint256)"( + newQuorum: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BACKUP_GOVERNOR(overrides?: CallOverrides): Promise; + + "BACKUP_GOVERNOR()"( + overrides?: CallOverrides + ): Promise; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + ROLLBACK_DEADLINE(overrides?: CallOverrides): Promise; + + "ROLLBACK_DEADLINE()"( + overrides?: CallOverrides + ): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __executeRollback( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__executeRollback()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __rollback( + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__rollback(uint256)"( + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"( + overrides?: CallOverrides + ): Promise; + + proposals( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setQuorum( + newQuorum: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setQuorum(uint256)"( + newQuorum: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/FlashAttacks.d.ts b/packages/chain-events/src/contractTypes/FlashAttacks.d.ts new file mode 100644 index 00000000000..3f850516c1f --- /dev/null +++ b/packages/chain-events/src/contractTypes/FlashAttacks.d.ts @@ -0,0 +1,413 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface FlashAttacksInterface extends ethers.utils.Interface { + functions: { + "flashProposal(uint256,address,address[],uint256[],string[],bytes[],bool[],bytes32)": FunctionFragment; + "flashVote(uint256,uint256,bool)": FunctionFragment; + "flashVotePermit(uint256,uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "flashProposal", + values: [ + BigNumberish, + string, + string[], + BigNumberish[], + string[], + BytesLike[], + boolean[], + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "flashVote", + values: [BigNumberish, BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "flashVotePermit", + values: [ + BigNumberish, + BigNumberish, + boolean, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + + decodeFunctionResult( + functionFragment: "flashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "flashVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "flashVotePermit", + data: BytesLike + ): Result; + + events: {}; +} + +export class FlashAttacks extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: FlashAttacksInterface; + + functions: { + flashProposal( + proposalPower: BigNumberish, + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "flashProposal(uint256,address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + proposalPower: BigNumberish, + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + flashVote( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "flashVote(uint256,uint256,bool)"( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + flashVotePermit( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "flashVotePermit(uint256,uint256,bool,uint8,bytes32,bytes32)"( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + flashProposal( + proposalPower: BigNumberish, + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "flashProposal(uint256,address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + proposalPower: BigNumberish, + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + flashVote( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "flashVote(uint256,uint256,bool)"( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + flashVotePermit( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "flashVotePermit(uint256,uint256,bool,uint8,bytes32,bytes32)"( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + flashProposal( + proposalPower: BigNumberish, + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "flashProposal(uint256,address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + proposalPower: BigNumberish, + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + flashVote( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + overrides?: CallOverrides + ): Promise; + + "flashVote(uint256,uint256,bool)"( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + overrides?: CallOverrides + ): Promise; + + flashVotePermit( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "flashVotePermit(uint256,uint256,bool,uint8,bytes32,bytes32)"( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + flashProposal( + proposalPower: BigNumberish, + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "flashProposal(uint256,address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + proposalPower: BigNumberish, + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + flashVote( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "flashVote(uint256,uint256,bool)"( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + flashVotePermit( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "flashVotePermit(uint256,uint256,bool,uint8,bytes32,bytes32)"( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + flashProposal( + proposalPower: BigNumberish, + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "flashProposal(uint256,address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + proposalPower: BigNumberish, + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + flashVote( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "flashVote(uint256,uint256,bool)"( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + flashVotePermit( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "flashVotePermit(uint256,uint256,bool,uint8,bytes32,bytes32)"( + votePower: BigNumberish, + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernancePowerDelegationERC20.d.ts b/packages/chain-events/src/contractTypes/GovernancePowerDelegationERC20.d.ts new file mode 100644 index 00000000000..9f74dd7c5a4 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernancePowerDelegationERC20.d.ts @@ -0,0 +1,1145 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernancePowerDelegationERC20Interface + extends ethers.utils.Interface { + functions: { + "DELEGATE_BY_TYPE_TYPEHASH()": FunctionFragment; + "DELEGATE_TYPEHASH()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "delegate(address)": FunctionFragment; + "delegateByType(address,uint8)": FunctionFragment; + "getDelegateeByType(address,uint8)": FunctionFragment; + "getPowerAtBlock(address,uint256,uint8)": FunctionFragment; + "getPowerCurrent(address,uint8)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "totalSupplyAt(uint256)": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DELEGATE_BY_TYPE_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "DELEGATE_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "delegate", values: [string]): string; + encodeFunctionData( + functionFragment: "delegateByType", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getDelegateeByType", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getPowerAtBlock", + values: [string, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getPowerCurrent", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "totalSupplyAt", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "DELEGATE_BY_TYPE_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "DELEGATE_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "delegateByType", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getDelegateeByType", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPowerAtBlock", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPowerCurrent", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "totalSupplyAt", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "DelegateChanged(address,address,uint8)": EventFragment; + "DelegatedPowerChanged(address,uint256,uint8)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegatedPowerChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class GovernancePowerDelegationERC20 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernancePowerDelegationERC20Interface; + + functions: { + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DELEGATE_BY_TYPE_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DELEGATE_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + "decimals()"(overrides?: CallOverrides): Promise<[number]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_BY_TYPE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_BY_TYPE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delegate(delegatee: string, overrides?: CallOverrides): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: CallOverrides + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + DelegateChanged( + delegator: string | null, + delegatee: string | null, + delegationType: null + ): TypedEventFilter< + [string, string, number], + { delegator: string; delegatee: string; delegationType: number } + >; + + DelegatedPowerChanged( + user: string | null, + amount: null, + delegationType: null + ): TypedEventFilter< + [string, BigNumber, number], + { user: string; amount: BigNumber; delegationType: number } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + DELEGATE_BY_TYPE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_BY_TYPE_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_TYPEHASH()"(overrides?: CallOverrides): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DELEGATE_BY_TYPE_TYPEHASH( + overrides?: CallOverrides + ): Promise; + + "DELEGATE_BY_TYPE_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DELEGATE_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATE_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegate( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address)"( + delegatee: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateByType( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateByType(address,uint8)"( + delegatee: string, + delegationType: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getDelegateeByType( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getDelegateeByType(address,uint8)"( + delegator: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getPowerCurrent( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerCurrent(address,uint8)"( + user: string, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + totalSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "totalSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernanceStrategy.d.ts b/packages/chain-events/src/contractTypes/GovernanceStrategy.d.ts new file mode 100644 index 00000000000..e73a2f0cbb7 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernanceStrategy.d.ts @@ -0,0 +1,384 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernanceStrategyInterface extends ethers.utils.Interface { + functions: { + "AAVE()": FunctionFragment; + "STK_AAVE()": FunctionFragment; + "getPropositionPowerAt(address,uint256)": FunctionFragment; + "getTotalPropositionSupplyAt(uint256)": FunctionFragment; + "getTotalVotingSupplyAt(uint256)": FunctionFragment; + "getVotingPowerAt(address,uint256)": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "AAVE", values?: undefined): string; + encodeFunctionData(functionFragment: "STK_AAVE", values?: undefined): string; + encodeFunctionData( + functionFragment: "getPropositionPowerAt", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getTotalPropositionSupplyAt", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getTotalVotingSupplyAt", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getVotingPowerAt", + values: [string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "AAVE", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "STK_AAVE", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getPropositionPowerAt", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTotalPropositionSupplyAt", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTotalVotingSupplyAt", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVotingPowerAt", + data: BytesLike + ): Result; + + events: {}; +} + +export class GovernanceStrategy extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernanceStrategyInterface; + + functions: { + AAVE(overrides?: CallOverrides): Promise<[string]>; + + "AAVE()"(overrides?: CallOverrides): Promise<[string]>; + + STK_AAVE(overrides?: CallOverrides): Promise<[string]>; + + "STK_AAVE()"(overrides?: CallOverrides): Promise<[string]>; + + getPropositionPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPropositionPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getTotalPropositionSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getTotalPropositionSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getTotalVotingSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getTotalVotingSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + }; + + AAVE(overrides?: CallOverrides): Promise; + + "AAVE()"(overrides?: CallOverrides): Promise; + + STK_AAVE(overrides?: CallOverrides): Promise; + + "STK_AAVE()"(overrides?: CallOverrides): Promise; + + getPropositionPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPropositionPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalPropositionSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalPropositionSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalVotingSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalVotingSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + callStatic: { + AAVE(overrides?: CallOverrides): Promise; + + "AAVE()"(overrides?: CallOverrides): Promise; + + STK_AAVE(overrides?: CallOverrides): Promise; + + "STK_AAVE()"(overrides?: CallOverrides): Promise; + + getPropositionPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPropositionPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalPropositionSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalPropositionSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalVotingSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalVotingSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + AAVE(overrides?: CallOverrides): Promise; + + "AAVE()"(overrides?: CallOverrides): Promise; + + STK_AAVE(overrides?: CallOverrides): Promise; + + "STK_AAVE()"(overrides?: CallOverrides): Promise; + + getPropositionPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPropositionPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalPropositionSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalPropositionSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalVotingSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalVotingSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + AAVE(overrides?: CallOverrides): Promise; + + "AAVE()"(overrides?: CallOverrides): Promise; + + STK_AAVE(overrides?: CallOverrides): Promise; + + "STK_AAVE()"(overrides?: CallOverrides): Promise; + + getPropositionPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPropositionPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalPropositionSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalPropositionSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalVotingSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalVotingSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/Governor.d.ts b/packages/chain-events/src/contractTypes/Governor.d.ts new file mode 100644 index 00000000000..e192e95336e --- /dev/null +++ b/packages/chain-events/src/contractTypes/Governor.d.ts @@ -0,0 +1,1235 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "COUNTING_MODE()": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class Governor extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorAlpha.d.ts b/packages/chain-events/src/contractTypes/GovernorAlpha.d.ts new file mode 100644 index 00000000000..ceb91ea5c07 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorAlpha.d.ts @@ -0,0 +1,1636 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorAlphaInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "DOMAIN_TYPEHASH()": FunctionFragment; + "MPond()": FunctionFragment; + "__abdicate()": FunctionFragment; + "__acceptAdmin()": FunctionFragment; + "__executeSetTimelockPendingAdmin(address,uint256)": FunctionFragment; + "__queueSetTimelockPendingAdmin(address,uint256)": FunctionFragment; + "cancel(uint256)": FunctionFragment; + "castVote(uint256,bool)": FunctionFragment; + "castVoteBySig(uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "execute(uint256)": FunctionFragment; + "getActions(uint256)": FunctionFragment; + "getReceipt(uint256,address)": FunctionFragment; + "guardian()": FunctionFragment; + "latestProposalIds(address)": FunctionFragment; + "name()": FunctionFragment; + "proposalCount()": FunctionFragment; + "proposalMaxOperations()": FunctionFragment; + "proposalThreshold()": FunctionFragment; + "proposals(uint256)": FunctionFragment; + "propose(address[],uint256[],string[],bytes[],string)": FunctionFragment; + "queue(uint256)": FunctionFragment; + "quorumVotes()": FunctionFragment; + "state(uint256)": FunctionFragment; + "timelock()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "DOMAIN_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "MPond", values?: undefined): string; + encodeFunctionData( + functionFragment: "__abdicate", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "__acceptAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "__executeSetTimelockPendingAdmin", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "__queueSetTimelockPendingAdmin", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "cancel", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, boolean, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getActions", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getReceipt", + values: [BigNumberish, string] + ): string; + encodeFunctionData(functionFragment: "guardian", values?: undefined): string; + encodeFunctionData( + functionFragment: "latestProposalIds", + values: [string] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalMaxOperations", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalThreshold", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposals", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], string[], BytesLike[], string] + ): string; + encodeFunctionData(functionFragment: "queue", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "quorumVotes", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "timelock", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "DOMAIN_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "MPond", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "__abdicate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "__acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "__executeSetTimelockPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "__queueSetTimelockPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActions", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getReceipt", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "guardian", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "latestProposalIds", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalMaxOperations", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "proposals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "quorumVotes", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "timelock", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "VoteCast(address,uint256,bool,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class GovernorAlpha extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorAlphaInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + MPond(overrides?: CallOverrides): Promise<[string]>; + + "MPond()"(overrides?: CallOverrides): Promise<[string]>; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __executeSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__executeSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __queueSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__queueSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, boolean, BigNumber] & { + hasVoted: boolean; + support: boolean; + votes: BigNumber; + } + ] + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, boolean, BigNumber] & { + hasVoted: boolean; + support: boolean; + votes: BigNumber; + } + ] + >; + + guardian(overrides?: CallOverrides): Promise<[string]>; + + "guardian()"(overrides?: CallOverrides): Promise<[string]>; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalCount()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalMaxOperations(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalThreshold()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorumVotes()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + timelock(overrides?: CallOverrides): Promise<[string]>; + + "timelock()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MPond(overrides?: CallOverrides): Promise; + + "MPond()"(overrides?: CallOverrides): Promise; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __executeSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__executeSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __queueSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__queueSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, boolean, BigNumber] & { + hasVoted: boolean; + support: boolean; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, boolean, BigNumber] & { + hasVoted: boolean; + support: boolean; + votes: BigNumber; + } + >; + + guardian(overrides?: CallOverrides): Promise; + + "guardian()"(overrides?: CallOverrides): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MPond(overrides?: CallOverrides): Promise; + + "MPond()"(overrides?: CallOverrides): Promise; + + __abdicate(overrides?: CallOverrides): Promise; + + "__abdicate()"(overrides?: CallOverrides): Promise; + + __acceptAdmin(overrides?: CallOverrides): Promise; + + "__acceptAdmin()"(overrides?: CallOverrides): Promise; + + __executeSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "__executeSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + __queueSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "__queueSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + cancel(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVote( + proposalId: BigNumberish, + support: boolean, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + execute(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, boolean, BigNumber] & { + hasVoted: boolean; + support: boolean; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, boolean, BigNumber] & { + hasVoted: boolean; + support: boolean; + votes: BigNumber; + } + >; + + guardian(overrides?: CallOverrides): Promise; + + "guardian()"(overrides?: CallOverrides): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + queue(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalCreated( + id: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + id: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalQueued( + id: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { id: BigNumber; eta: BigNumber } + >; + + VoteCast( + voter: null, + proposalId: null, + support: null, + votes: null + ): TypedEventFilter< + [string, BigNumber, boolean, BigNumber], + { + voter: string; + proposalId: BigNumber; + support: boolean; + votes: BigNumber; + } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MPond(overrides?: CallOverrides): Promise; + + "MPond()"(overrides?: CallOverrides): Promise; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __executeSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__executeSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __queueSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__queueSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + guardian(overrides?: CallOverrides): Promise; + + "guardian()"(overrides?: CallOverrides): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + MPond(overrides?: CallOverrides): Promise; + + "MPond()"(overrides?: CallOverrides): Promise; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __executeSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__executeSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __queueSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__queueSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + guardian(overrides?: CallOverrides): Promise; + + "guardian()"(overrides?: CallOverrides): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations( + overrides?: CallOverrides + ): Promise; + + "proposalMaxOperations()"( + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"( + overrides?: CallOverrides + ): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorAlphaMock.d.ts b/packages/chain-events/src/contractTypes/GovernorAlphaMock.d.ts new file mode 100644 index 00000000000..a7e5ea68ece --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorAlphaMock.d.ts @@ -0,0 +1,1636 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorAlphaMockInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "DOMAIN_TYPEHASH()": FunctionFragment; + "MPond()": FunctionFragment; + "__abdicate()": FunctionFragment; + "__acceptAdmin()": FunctionFragment; + "__executeSetTimelockPendingAdmin(address,uint256)": FunctionFragment; + "__queueSetTimelockPendingAdmin(address,uint256)": FunctionFragment; + "cancel(uint256)": FunctionFragment; + "castVote(uint256,bool)": FunctionFragment; + "castVoteBySig(uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "execute(uint256)": FunctionFragment; + "getActions(uint256)": FunctionFragment; + "getReceipt(uint256,address)": FunctionFragment; + "guardian()": FunctionFragment; + "latestProposalIds(address)": FunctionFragment; + "name()": FunctionFragment; + "proposalCount()": FunctionFragment; + "proposalMaxOperations()": FunctionFragment; + "proposalThreshold()": FunctionFragment; + "proposals(uint256)": FunctionFragment; + "propose(address[],uint256[],string[],bytes[],string)": FunctionFragment; + "queue(uint256)": FunctionFragment; + "quorumVotes()": FunctionFragment; + "state(uint256)": FunctionFragment; + "timelock()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "DOMAIN_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "MPond", values?: undefined): string; + encodeFunctionData( + functionFragment: "__abdicate", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "__acceptAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "__executeSetTimelockPendingAdmin", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "__queueSetTimelockPendingAdmin", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "cancel", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, boolean, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getActions", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getReceipt", + values: [BigNumberish, string] + ): string; + encodeFunctionData(functionFragment: "guardian", values?: undefined): string; + encodeFunctionData( + functionFragment: "latestProposalIds", + values: [string] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalMaxOperations", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalThreshold", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposals", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], string[], BytesLike[], string] + ): string; + encodeFunctionData(functionFragment: "queue", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "quorumVotes", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "timelock", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "DOMAIN_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "MPond", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "__abdicate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "__acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "__executeSetTimelockPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "__queueSetTimelockPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActions", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getReceipt", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "guardian", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "latestProposalIds", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalMaxOperations", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "proposals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "quorumVotes", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "timelock", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "VoteCast(address,uint256,bool,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class GovernorAlphaMock extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorAlphaMockInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + MPond(overrides?: CallOverrides): Promise<[string]>; + + "MPond()"(overrides?: CallOverrides): Promise<[string]>; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __executeSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__executeSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __queueSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__queueSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, boolean, BigNumber] & { + hasVoted: boolean; + support: boolean; + votes: BigNumber; + } + ] + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, boolean, BigNumber] & { + hasVoted: boolean; + support: boolean; + votes: BigNumber; + } + ] + >; + + guardian(overrides?: CallOverrides): Promise<[string]>; + + "guardian()"(overrides?: CallOverrides): Promise<[string]>; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalCount()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalMaxOperations(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalThreshold()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorumVotes()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + timelock(overrides?: CallOverrides): Promise<[string]>; + + "timelock()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MPond(overrides?: CallOverrides): Promise; + + "MPond()"(overrides?: CallOverrides): Promise; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __executeSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__executeSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __queueSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__queueSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, boolean, BigNumber] & { + hasVoted: boolean; + support: boolean; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, boolean, BigNumber] & { + hasVoted: boolean; + support: boolean; + votes: BigNumber; + } + >; + + guardian(overrides?: CallOverrides): Promise; + + "guardian()"(overrides?: CallOverrides): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MPond(overrides?: CallOverrides): Promise; + + "MPond()"(overrides?: CallOverrides): Promise; + + __abdicate(overrides?: CallOverrides): Promise; + + "__abdicate()"(overrides?: CallOverrides): Promise; + + __acceptAdmin(overrides?: CallOverrides): Promise; + + "__acceptAdmin()"(overrides?: CallOverrides): Promise; + + __executeSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "__executeSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + __queueSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "__queueSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + cancel(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVote( + proposalId: BigNumberish, + support: boolean, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + execute(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, boolean, BigNumber] & { + hasVoted: boolean; + support: boolean; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, boolean, BigNumber] & { + hasVoted: boolean; + support: boolean; + votes: BigNumber; + } + >; + + guardian(overrides?: CallOverrides): Promise; + + "guardian()"(overrides?: CallOverrides): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + queue(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalCreated( + id: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + id: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalQueued( + id: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { id: BigNumber; eta: BigNumber } + >; + + VoteCast( + voter: null, + proposalId: null, + support: null, + votes: null + ): TypedEventFilter< + [string, BigNumber, boolean, BigNumber], + { + voter: string; + proposalId: BigNumber; + support: boolean; + votes: BigNumber; + } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MPond(overrides?: CallOverrides): Promise; + + "MPond()"(overrides?: CallOverrides): Promise; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __executeSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__executeSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __queueSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__queueSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + guardian(overrides?: CallOverrides): Promise; + + "guardian()"(overrides?: CallOverrides): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + MPond(overrides?: CallOverrides): Promise; + + "MPond()"(overrides?: CallOverrides): Promise; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __executeSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__executeSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + __queueSetTimelockPendingAdmin( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__queueSetTimelockPendingAdmin(address,uint256)"( + newPendingAdmin: string, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + guardian(overrides?: CallOverrides): Promise; + + "guardian()"(overrides?: CallOverrides): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations( + overrides?: CallOverrides + ): Promise; + + "proposalMaxOperations()"( + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"( + overrides?: CallOverrides + ): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorBravoDelegate.d.ts b/packages/chain-events/src/contractTypes/GovernorBravoDelegate.d.ts new file mode 100644 index 00000000000..530d483de64 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorBravoDelegate.d.ts @@ -0,0 +1,2222 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorBravoDelegateInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "DOMAIN_TYPEHASH()": FunctionFragment; + "MAX_PROPOSAL_THRESHOLD()": FunctionFragment; + "MAX_VOTING_DELAY()": FunctionFragment; + "MAX_VOTING_PERIOD()": FunctionFragment; + "MIN_PROPOSAL_THRESHOLD()": FunctionFragment; + "MIN_VOTING_DELAY()": FunctionFragment; + "MIN_VOTING_PERIOD()": FunctionFragment; + "_acceptAdmin()": FunctionFragment; + "_setPendingAdmin(address)": FunctionFragment; + "_setProposalThreshold(uint256)": FunctionFragment; + "_setVotingDelay(uint256)": FunctionFragment; + "_setVotingPeriod(uint256)": FunctionFragment; + "admin()": FunctionFragment; + "cancel(uint256)": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "comp()": FunctionFragment; + "execute(uint256)": FunctionFragment; + "getActions(uint256)": FunctionFragment; + "getReceipt(uint256,address)": FunctionFragment; + "implementation()": FunctionFragment; + "initialProposalId()": FunctionFragment; + "initialize(address,address,uint256,uint256,uint256)": FunctionFragment; + "latestProposalIds(address)": FunctionFragment; + "name()": FunctionFragment; + "pendingAdmin()": FunctionFragment; + "proposalCount()": FunctionFragment; + "proposalMaxOperations()": FunctionFragment; + "proposalThreshold()": FunctionFragment; + "proposals(uint256)": FunctionFragment; + "propose(address[],uint256[],string[],bytes[],string)": FunctionFragment; + "queue(uint256)": FunctionFragment; + "quorumVotes()": FunctionFragment; + "state(uint256)": FunctionFragment; + "timelock()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "DOMAIN_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAX_PROPOSAL_THRESHOLD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAX_VOTING_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAX_VOTING_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MIN_PROPOSAL_THRESHOLD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MIN_VOTING_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MIN_VOTING_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "_acceptAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "_setPendingAdmin", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "_setProposalThreshold", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "_setVotingDelay", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "_setVotingPeriod", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData( + functionFragment: "cancel", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData(functionFragment: "comp", values?: undefined): string; + encodeFunctionData( + functionFragment: "execute", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getActions", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getReceipt", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "implementation", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "initialProposalId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [string, string, BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "latestProposalIds", + values: [string] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "pendingAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalMaxOperations", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalThreshold", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposals", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], string[], BytesLike[], string] + ): string; + encodeFunctionData(functionFragment: "queue", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "quorumVotes", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "timelock", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "DOMAIN_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAX_PROPOSAL_THRESHOLD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAX_VOTING_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAX_VOTING_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MIN_PROPOSAL_THRESHOLD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MIN_VOTING_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MIN_VOTING_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_setPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_setProposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_setVotingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_setVotingPeriod", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "comp", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActions", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getReceipt", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "implementation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "initialProposalId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "latestProposalIds", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "pendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalMaxOperations", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "proposals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "quorumVotes", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "timelock", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "NewAdmin(address,address)": EventFragment; + "NewImplementation(address,address)": EventFragment; + "NewPendingAdmin(address,address)": EventFragment; + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "ProposalThresholdSet(uint256,uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + "VotingDelaySet(uint256,uint256)": EventFragment; + "VotingPeriodSet(uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "NewAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewImplementation"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewPendingAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalThresholdSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingDelaySet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingPeriodSet"): EventFragment; +} + +export class GovernorBravoDelegate extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorBravoDelegateInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + MAX_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAX_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAX_VOTING_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAX_VOTING_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MIN_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MIN_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MIN_VOTING_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MIN_VOTING_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + _acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise<[string]>; + + "admin()"(overrides?: CallOverrides): Promise<[string]>; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + comp(overrides?: CallOverrides): Promise<[string]>; + + "comp()"(overrides?: CallOverrides): Promise<[string]>; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + ] + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + ] + >; + + implementation(overrides?: CallOverrides): Promise<[string]>; + + "implementation()"(overrides?: CallOverrides): Promise<[string]>; + + initialProposalId(overrides?: CallOverrides): Promise<[BigNumber]>; + + "initialProposalId()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + pendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + "pendingAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + proposalCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalCount()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalMaxOperations(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalThreshold()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorumVotes()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + timelock(overrides?: CallOverrides): Promise<[string]>; + + "timelock()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MAX_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MAX_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MAX_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MAX_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + MIN_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MIN_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MIN_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MIN_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + _acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"(overrides?: CallOverrides): Promise; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MAX_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MAX_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MAX_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MAX_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + MIN_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MIN_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MIN_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MIN_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + _acceptAdmin(overrides?: CallOverrides): Promise; + + "_acceptAdmin()"(overrides?: CallOverrides): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: CallOverrides + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: CallOverrides + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: CallOverrides + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancel(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + execute(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"(overrides?: CallOverrides): Promise; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: CallOverrides + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + queue(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + NewAdmin( + oldAdmin: null, + newAdmin: null + ): TypedEventFilter< + [string, string], + { oldAdmin: string; newAdmin: string } + >; + + NewImplementation( + oldImplementation: null, + newImplementation: null + ): TypedEventFilter< + [string, string], + { oldImplementation: string; newImplementation: string } + >; + + NewPendingAdmin( + oldPendingAdmin: null, + newPendingAdmin: null + ): TypedEventFilter< + [string, string], + { oldPendingAdmin: string; newPendingAdmin: string } + >; + + ProposalCanceled( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalCreated( + id: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + id: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalQueued( + id: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { id: BigNumber; eta: BigNumber } + >; + + ProposalThresholdSet( + oldProposalThreshold: null, + newProposalThreshold: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldProposalThreshold: BigNumber; newProposalThreshold: BigNumber } + >; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + votes: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + votes: BigNumber; + reason: string; + } + >; + + VotingDelaySet( + oldVotingDelay: null, + newVotingDelay: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldVotingDelay: BigNumber; newVotingDelay: BigNumber } + >; + + VotingPeriodSet( + oldVotingPeriod: null, + newVotingPeriod: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldVotingPeriod: BigNumber; newVotingPeriod: BigNumber } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MAX_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MAX_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MAX_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MAX_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + MIN_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MIN_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MIN_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MIN_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + _acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"(overrides?: CallOverrides): Promise; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + MAX_PROPOSAL_THRESHOLD( + overrides?: CallOverrides + ): Promise; + + "MAX_PROPOSAL_THRESHOLD()"( + overrides?: CallOverrides + ): Promise; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MAX_VOTING_DELAY()"( + overrides?: CallOverrides + ): Promise; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MAX_VOTING_PERIOD()"( + overrides?: CallOverrides + ): Promise; + + MIN_PROPOSAL_THRESHOLD( + overrides?: CallOverrides + ): Promise; + + "MIN_PROPOSAL_THRESHOLD()"( + overrides?: CallOverrides + ): Promise; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MIN_VOTING_DELAY()"( + overrides?: CallOverrides + ): Promise; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MIN_VOTING_PERIOD()"( + overrides?: CallOverrides + ): Promise; + + _acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"( + overrides?: CallOverrides + ): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"( + overrides?: CallOverrides + ): Promise; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations( + overrides?: CallOverrides + ): Promise; + + "proposalMaxOperations()"( + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"( + overrides?: CallOverrides + ): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorBravoDelegateMock.d.ts b/packages/chain-events/src/contractTypes/GovernorBravoDelegateMock.d.ts new file mode 100644 index 00000000000..00e867cd3c8 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorBravoDelegateMock.d.ts @@ -0,0 +1,2267 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorBravoDelegateMockInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "DOMAIN_TYPEHASH()": FunctionFragment; + "MAX_PROPOSAL_THRESHOLD()": FunctionFragment; + "MAX_VOTING_DELAY()": FunctionFragment; + "MAX_VOTING_PERIOD()": FunctionFragment; + "MIN_PROPOSAL_THRESHOLD()": FunctionFragment; + "MIN_VOTING_DELAY()": FunctionFragment; + "MIN_VOTING_PERIOD()": FunctionFragment; + "_acceptAdmin()": FunctionFragment; + "_setPendingAdmin(address)": FunctionFragment; + "_setProposalThreshold(uint256)": FunctionFragment; + "_setVotingDelay(uint256)": FunctionFragment; + "_setVotingPeriod(uint256)": FunctionFragment; + "admin()": FunctionFragment; + "cancel(uint256)": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "comp()": FunctionFragment; + "execute(uint256)": FunctionFragment; + "getActions(uint256)": FunctionFragment; + "getReceipt(uint256,address)": FunctionFragment; + "implementation()": FunctionFragment; + "initialProposalId()": FunctionFragment; + "initialize(address,address,uint256,uint256,uint256)": FunctionFragment; + "latestProposalIds(address)": FunctionFragment; + "name()": FunctionFragment; + "pendingAdmin()": FunctionFragment; + "proposalCount()": FunctionFragment; + "proposalMaxOperations()": FunctionFragment; + "proposalThreshold()": FunctionFragment; + "proposals(uint256)": FunctionFragment; + "propose(address[],uint256[],string[],bytes[],string)": FunctionFragment; + "queue(uint256)": FunctionFragment; + "quorumVotes()": FunctionFragment; + "setInitialProposalId()": FunctionFragment; + "state(uint256)": FunctionFragment; + "timelock()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "DOMAIN_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAX_PROPOSAL_THRESHOLD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAX_VOTING_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAX_VOTING_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MIN_PROPOSAL_THRESHOLD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MIN_VOTING_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MIN_VOTING_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "_acceptAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "_setPendingAdmin", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "_setProposalThreshold", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "_setVotingDelay", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "_setVotingPeriod", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData( + functionFragment: "cancel", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData(functionFragment: "comp", values?: undefined): string; + encodeFunctionData( + functionFragment: "execute", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getActions", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getReceipt", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "implementation", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "initialProposalId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [string, string, BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "latestProposalIds", + values: [string] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "pendingAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalMaxOperations", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalThreshold", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposals", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], string[], BytesLike[], string] + ): string; + encodeFunctionData(functionFragment: "queue", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "quorumVotes", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setInitialProposalId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "timelock", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "DOMAIN_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAX_PROPOSAL_THRESHOLD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAX_VOTING_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAX_VOTING_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MIN_PROPOSAL_THRESHOLD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MIN_VOTING_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MIN_VOTING_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_setPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_setProposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_setVotingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_setVotingPeriod", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "comp", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActions", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getReceipt", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "implementation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "initialProposalId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "latestProposalIds", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "pendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalMaxOperations", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "proposals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "quorumVotes", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setInitialProposalId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "timelock", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "NewAdmin(address,address)": EventFragment; + "NewImplementation(address,address)": EventFragment; + "NewPendingAdmin(address,address)": EventFragment; + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "ProposalThresholdSet(uint256,uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + "VotingDelaySet(uint256,uint256)": EventFragment; + "VotingPeriodSet(uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "NewAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewImplementation"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewPendingAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalThresholdSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingDelaySet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingPeriodSet"): EventFragment; +} + +export class GovernorBravoDelegateMock extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorBravoDelegateMockInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + MAX_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAX_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAX_VOTING_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAX_VOTING_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MIN_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MIN_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MIN_VOTING_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MIN_VOTING_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + _acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise<[string]>; + + "admin()"(overrides?: CallOverrides): Promise<[string]>; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + comp(overrides?: CallOverrides): Promise<[string]>; + + "comp()"(overrides?: CallOverrides): Promise<[string]>; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + ] + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + ] + >; + + implementation(overrides?: CallOverrides): Promise<[string]>; + + "implementation()"(overrides?: CallOverrides): Promise<[string]>; + + initialProposalId(overrides?: CallOverrides): Promise<[BigNumber]>; + + "initialProposalId()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + pendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + "pendingAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + proposalCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalCount()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalMaxOperations(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalThreshold()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorumVotes()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + setInitialProposalId( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setInitialProposalId()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + timelock(overrides?: CallOverrides): Promise<[string]>; + + "timelock()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MAX_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MAX_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MAX_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MAX_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + MIN_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MIN_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MIN_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MIN_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + _acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"(overrides?: CallOverrides): Promise; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + setInitialProposalId( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setInitialProposalId()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MAX_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MAX_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MAX_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MAX_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + MIN_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MIN_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MIN_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MIN_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + _acceptAdmin(overrides?: CallOverrides): Promise; + + "_acceptAdmin()"(overrides?: CallOverrides): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: CallOverrides + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: CallOverrides + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: CallOverrides + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancel(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + execute(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"(overrides?: CallOverrides): Promise; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: CallOverrides + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + queue(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + setInitialProposalId(overrides?: CallOverrides): Promise; + + "setInitialProposalId()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + NewAdmin( + oldAdmin: null, + newAdmin: null + ): TypedEventFilter< + [string, string], + { oldAdmin: string; newAdmin: string } + >; + + NewImplementation( + oldImplementation: null, + newImplementation: null + ): TypedEventFilter< + [string, string], + { oldImplementation: string; newImplementation: string } + >; + + NewPendingAdmin( + oldPendingAdmin: null, + newPendingAdmin: null + ): TypedEventFilter< + [string, string], + { oldPendingAdmin: string; newPendingAdmin: string } + >; + + ProposalCanceled( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalCreated( + id: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + id: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalQueued( + id: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { id: BigNumber; eta: BigNumber } + >; + + ProposalThresholdSet( + oldProposalThreshold: null, + newProposalThreshold: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldProposalThreshold: BigNumber; newProposalThreshold: BigNumber } + >; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + votes: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + votes: BigNumber; + reason: string; + } + >; + + VotingDelaySet( + oldVotingDelay: null, + newVotingDelay: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldVotingDelay: BigNumber; newVotingDelay: BigNumber } + >; + + VotingPeriodSet( + oldVotingPeriod: null, + newVotingPeriod: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldVotingPeriod: BigNumber; newVotingPeriod: BigNumber } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MAX_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MAX_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MAX_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MAX_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + MIN_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MIN_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MIN_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MIN_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + _acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"(overrides?: CallOverrides): Promise; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + setInitialProposalId( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setInitialProposalId()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + MAX_PROPOSAL_THRESHOLD( + overrides?: CallOverrides + ): Promise; + + "MAX_PROPOSAL_THRESHOLD()"( + overrides?: CallOverrides + ): Promise; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MAX_VOTING_DELAY()"( + overrides?: CallOverrides + ): Promise; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MAX_VOTING_PERIOD()"( + overrides?: CallOverrides + ): Promise; + + MIN_PROPOSAL_THRESHOLD( + overrides?: CallOverrides + ): Promise; + + "MIN_PROPOSAL_THRESHOLD()"( + overrides?: CallOverrides + ): Promise; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MIN_VOTING_DELAY()"( + overrides?: CallOverrides + ): Promise; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MIN_VOTING_PERIOD()"( + overrides?: CallOverrides + ): Promise; + + _acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"( + overrides?: CallOverrides + ): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"( + overrides?: CallOverrides + ): Promise; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations( + overrides?: CallOverrides + ): Promise; + + "proposalMaxOperations()"( + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"( + overrides?: CallOverrides + ): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + setInitialProposalId( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setInitialProposalId()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorBravoDelegateStorageV1.d.ts b/packages/chain-events/src/contractTypes/GovernorBravoDelegateStorageV1.d.ts new file mode 100644 index 00000000000..5a3d6dd45d6 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorBravoDelegateStorageV1.d.ts @@ -0,0 +1,620 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorBravoDelegateStorageV1Interface + extends ethers.utils.Interface { + functions: { + "admin()": FunctionFragment; + "comp()": FunctionFragment; + "implementation()": FunctionFragment; + "initialProposalId()": FunctionFragment; + "latestProposalIds(address)": FunctionFragment; + "pendingAdmin()": FunctionFragment; + "proposalCount()": FunctionFragment; + "proposalThreshold()": FunctionFragment; + "proposals(uint256)": FunctionFragment; + "timelock()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData(functionFragment: "comp", values?: undefined): string; + encodeFunctionData( + functionFragment: "implementation", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "initialProposalId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "latestProposalIds", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "pendingAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalThreshold", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposals", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "timelock", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "comp", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "implementation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "initialProposalId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "latestProposalIds", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "pendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "proposals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "timelock", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: {}; +} + +export class GovernorBravoDelegateStorageV1 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorBravoDelegateStorageV1Interface; + + functions: { + admin(overrides?: CallOverrides): Promise<[string]>; + + "admin()"(overrides?: CallOverrides): Promise<[string]>; + + comp(overrides?: CallOverrides): Promise<[string]>; + + "comp()"(overrides?: CallOverrides): Promise<[string]>; + + implementation(overrides?: CallOverrides): Promise<[string]>; + + "implementation()"(overrides?: CallOverrides): Promise<[string]>; + + initialProposalId(overrides?: CallOverrides): Promise<[BigNumber]>; + + "initialProposalId()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + pendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + "pendingAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + proposalCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalCount()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalThreshold()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + timelock(overrides?: CallOverrides): Promise<[string]>; + + "timelock()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"(overrides?: CallOverrides): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"(overrides?: CallOverrides): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: {}; + + estimateGas: { + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"(overrides?: CallOverrides): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"( + overrides?: CallOverrides + ): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"( + overrides?: CallOverrides + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"( + overrides?: CallOverrides + ): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorBravoDelegator.d.ts b/packages/chain-events/src/contractTypes/GovernorBravoDelegator.d.ts new file mode 100644 index 00000000000..d5f264a7803 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorBravoDelegator.d.ts @@ -0,0 +1,365 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorBravoDelegatorInterface extends ethers.utils.Interface { + functions: { + "_setImplementation(address)": FunctionFragment; + "admin()": FunctionFragment; + "implementation()": FunctionFragment; + "pendingAdmin()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "_setImplementation", + values: [string] + ): string; + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData( + functionFragment: "implementation", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "pendingAdmin", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "_setImplementation", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "implementation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "pendingAdmin", + data: BytesLike + ): Result; + + events: { + "NewAdmin(address,address)": EventFragment; + "NewImplementation(address,address)": EventFragment; + "NewPendingAdmin(address,address)": EventFragment; + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "ProposalThresholdSet(uint256,uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + "VotingDelaySet(uint256,uint256)": EventFragment; + "VotingPeriodSet(uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "NewAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewImplementation"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewPendingAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalThresholdSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingDelaySet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingPeriodSet"): EventFragment; +} + +export class GovernorBravoDelegator extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorBravoDelegatorInterface; + + functions: { + _setImplementation( + implementation_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setImplementation(address)"( + implementation_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise<[string]>; + + "admin()"(overrides?: CallOverrides): Promise<[string]>; + + implementation(overrides?: CallOverrides): Promise<[string]>; + + "implementation()"(overrides?: CallOverrides): Promise<[string]>; + + pendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + "pendingAdmin()"(overrides?: CallOverrides): Promise<[string]>; + }; + + _setImplementation( + implementation_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setImplementation(address)"( + implementation_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + callStatic: { + _setImplementation( + implementation_: string, + overrides?: CallOverrides + ): Promise; + + "_setImplementation(address)"( + implementation_: string, + overrides?: CallOverrides + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + }; + + filters: { + NewAdmin( + oldAdmin: null, + newAdmin: null + ): TypedEventFilter< + [string, string], + { oldAdmin: string; newAdmin: string } + >; + + NewImplementation( + oldImplementation: null, + newImplementation: null + ): TypedEventFilter< + [string, string], + { oldImplementation: string; newImplementation: string } + >; + + NewPendingAdmin( + oldPendingAdmin: null, + newPendingAdmin: null + ): TypedEventFilter< + [string, string], + { oldPendingAdmin: string; newPendingAdmin: string } + >; + + ProposalCanceled( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalCreated( + id: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + id: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalQueued( + id: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { id: BigNumber; eta: BigNumber } + >; + + ProposalThresholdSet( + oldProposalThreshold: null, + newProposalThreshold: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldProposalThreshold: BigNumber; newProposalThreshold: BigNumber } + >; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + votes: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + votes: BigNumber; + reason: string; + } + >; + + VotingDelaySet( + oldVotingDelay: null, + newVotingDelay: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldVotingDelay: BigNumber; newVotingDelay: BigNumber } + >; + + VotingPeriodSet( + oldVotingPeriod: null, + newVotingPeriod: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldVotingPeriod: BigNumber; newVotingPeriod: BigNumber } + >; + }; + + estimateGas: { + _setImplementation( + implementation_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setImplementation(address)"( + implementation_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + _setImplementation( + implementation_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setImplementation(address)"( + implementation_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"( + overrides?: CallOverrides + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorBravoDelegatorStorage.d.ts b/packages/chain-events/src/contractTypes/GovernorBravoDelegatorStorage.d.ts new file mode 100644 index 00000000000..54ad88673c4 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorBravoDelegatorStorage.d.ts @@ -0,0 +1,166 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorBravoDelegatorStorageInterface + extends ethers.utils.Interface { + functions: { + "admin()": FunctionFragment; + "implementation()": FunctionFragment; + "pendingAdmin()": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData( + functionFragment: "implementation", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "pendingAdmin", + values?: undefined + ): string; + + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "implementation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "pendingAdmin", + data: BytesLike + ): Result; + + events: {}; +} + +export class GovernorBravoDelegatorStorage extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorBravoDelegatorStorageInterface; + + functions: { + admin(overrides?: CallOverrides): Promise<[string]>; + + "admin()"(overrides?: CallOverrides): Promise<[string]>; + + implementation(overrides?: CallOverrides): Promise<[string]>; + + "implementation()"(overrides?: CallOverrides): Promise<[string]>; + + pendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + "pendingAdmin()"(overrides?: CallOverrides): Promise<[string]>; + }; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + callStatic: { + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + }; + + filters: {}; + + estimateGas: { + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"( + overrides?: CallOverrides + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorBravoEvents.d.ts b/packages/chain-events/src/contractTypes/GovernorBravoEvents.d.ts new file mode 100644 index 00000000000..220ea816444 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorBravoEvents.d.ts @@ -0,0 +1,218 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorBravoEventsInterface extends ethers.utils.Interface { + functions: {}; + + events: { + "NewAdmin(address,address)": EventFragment; + "NewImplementation(address,address)": EventFragment; + "NewPendingAdmin(address,address)": EventFragment; + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "ProposalThresholdSet(uint256,uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + "VotingDelaySet(uint256,uint256)": EventFragment; + "VotingPeriodSet(uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "NewAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewImplementation"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewPendingAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalThresholdSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingDelaySet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingPeriodSet"): EventFragment; +} + +export class GovernorBravoEvents extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorBravoEventsInterface; + + functions: {}; + + callStatic: {}; + + filters: { + NewAdmin( + oldAdmin: null, + newAdmin: null + ): TypedEventFilter< + [string, string], + { oldAdmin: string; newAdmin: string } + >; + + NewImplementation( + oldImplementation: null, + newImplementation: null + ): TypedEventFilter< + [string, string], + { oldImplementation: string; newImplementation: string } + >; + + NewPendingAdmin( + oldPendingAdmin: null, + newPendingAdmin: null + ): TypedEventFilter< + [string, string], + { oldPendingAdmin: string; newPendingAdmin: string } + >; + + ProposalCanceled( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalCreated( + id: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + id: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalQueued( + id: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { id: BigNumber; eta: BigNumber } + >; + + ProposalThresholdSet( + oldProposalThreshold: null, + newProposalThreshold: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldProposalThreshold: BigNumber; newProposalThreshold: BigNumber } + >; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + votes: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + votes: BigNumber; + reason: string; + } + >; + + VotingDelaySet( + oldVotingDelay: null, + newVotingDelay: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldVotingDelay: BigNumber; newVotingDelay: BigNumber } + >; + + VotingPeriodSet( + oldVotingPeriod: null, + newVotingPeriod: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldVotingPeriod: BigNumber; newVotingPeriod: BigNumber } + >; + }; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/chain-events/src/contractTypes/GovernorBravoImmutable.d.ts b/packages/chain-events/src/contractTypes/GovernorBravoImmutable.d.ts new file mode 100644 index 00000000000..87221a3a7d5 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorBravoImmutable.d.ts @@ -0,0 +1,2306 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorBravoImmutableInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "DOMAIN_TYPEHASH()": FunctionFragment; + "MAX_PROPOSAL_THRESHOLD()": FunctionFragment; + "MAX_VOTING_DELAY()": FunctionFragment; + "MAX_VOTING_PERIOD()": FunctionFragment; + "MIN_PROPOSAL_THRESHOLD()": FunctionFragment; + "MIN_VOTING_DELAY()": FunctionFragment; + "MIN_VOTING_PERIOD()": FunctionFragment; + "_acceptAdmin()": FunctionFragment; + "_initiate()": FunctionFragment; + "_setPendingAdmin(address)": FunctionFragment; + "_setProposalThreshold(uint256)": FunctionFragment; + "_setVotingDelay(uint256)": FunctionFragment; + "_setVotingPeriod(uint256)": FunctionFragment; + "admin()": FunctionFragment; + "cancel(uint256)": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "comp()": FunctionFragment; + "execute(uint256)": FunctionFragment; + "getActions(uint256)": FunctionFragment; + "getReceipt(uint256,address)": FunctionFragment; + "implementation()": FunctionFragment; + "initialProposalId()": FunctionFragment; + "initialize(address,address,uint256,uint256,uint256)": FunctionFragment; + "latestProposalIds(address)": FunctionFragment; + "name()": FunctionFragment; + "pendingAdmin()": FunctionFragment; + "proposalCount()": FunctionFragment; + "proposalMaxOperations()": FunctionFragment; + "proposalThreshold()": FunctionFragment; + "proposals(uint256)": FunctionFragment; + "propose(address[],uint256[],string[],bytes[],string)": FunctionFragment; + "queue(uint256)": FunctionFragment; + "quorumVotes()": FunctionFragment; + "setInitialProposalId()": FunctionFragment; + "state(uint256)": FunctionFragment; + "timelock()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "DOMAIN_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAX_PROPOSAL_THRESHOLD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAX_VOTING_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAX_VOTING_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MIN_PROPOSAL_THRESHOLD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MIN_VOTING_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MIN_VOTING_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "_acceptAdmin", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "_initiate", values?: undefined): string; + encodeFunctionData( + functionFragment: "_setPendingAdmin", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "_setProposalThreshold", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "_setVotingDelay", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "_setVotingPeriod", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData( + functionFragment: "cancel", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData(functionFragment: "comp", values?: undefined): string; + encodeFunctionData( + functionFragment: "execute", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getActions", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getReceipt", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "implementation", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "initialProposalId", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [string, string, BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "latestProposalIds", + values: [string] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "pendingAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalMaxOperations", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalThreshold", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposals", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], string[], BytesLike[], string] + ): string; + encodeFunctionData(functionFragment: "queue", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "quorumVotes", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setInitialProposalId", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData(functionFragment: "timelock", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "DOMAIN_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAX_PROPOSAL_THRESHOLD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAX_VOTING_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAX_VOTING_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MIN_PROPOSAL_THRESHOLD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MIN_VOTING_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MIN_VOTING_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "_initiate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "_setPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_setProposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_setVotingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "_setVotingPeriod", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "comp", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActions", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getReceipt", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "implementation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "initialProposalId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "latestProposalIds", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "pendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalMaxOperations", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "proposals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "quorumVotes", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setInitialProposalId", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "timelock", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "NewAdmin(address,address)": EventFragment; + "NewImplementation(address,address)": EventFragment; + "NewPendingAdmin(address,address)": EventFragment; + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "ProposalThresholdSet(uint256,uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + "VotingDelaySet(uint256,uint256)": EventFragment; + "VotingPeriodSet(uint256,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "NewAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewImplementation"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewPendingAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalThresholdSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingDelaySet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingPeriodSet"): EventFragment; +} + +export class GovernorBravoImmutable extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorBravoImmutableInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + MAX_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAX_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAX_VOTING_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAX_VOTING_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MIN_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MIN_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MIN_VOTING_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MIN_VOTING_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + _acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _initiate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_initiate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise<[string]>; + + "admin()"(overrides?: CallOverrides): Promise<[string]>; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + comp(overrides?: CallOverrides): Promise<[string]>; + + "comp()"(overrides?: CallOverrides): Promise<[string]>; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + ] + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + ] + >; + + implementation(overrides?: CallOverrides): Promise<[string]>; + + "implementation()"(overrides?: CallOverrides): Promise<[string]>; + + initialProposalId(overrides?: CallOverrides): Promise<[BigNumber]>; + + "initialProposalId()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + pendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + "pendingAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + proposalCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalCount()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalMaxOperations(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalThreshold()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorumVotes()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + setInitialProposalId( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setInitialProposalId()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + timelock(overrides?: CallOverrides): Promise<[string]>; + + "timelock()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MAX_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MAX_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MAX_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MAX_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + MIN_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MIN_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MIN_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MIN_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + _acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _initiate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_initiate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"(overrides?: CallOverrides): Promise; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + setInitialProposalId( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setInitialProposalId()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MAX_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MAX_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MAX_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MAX_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + MIN_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MIN_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MIN_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MIN_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + _acceptAdmin(overrides?: CallOverrides): Promise; + + "_acceptAdmin()"(overrides?: CallOverrides): Promise; + + _initiate(overrides?: CallOverrides): Promise; + + "_initiate()"(overrides?: CallOverrides): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: CallOverrides + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: CallOverrides + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: CallOverrides + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancel(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + execute(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"(overrides?: CallOverrides): Promise; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: CallOverrides + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + queue(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + setInitialProposalId(overrides?: CallOverrides): Promise; + + "setInitialProposalId()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + NewAdmin( + oldAdmin: null, + newAdmin: null + ): TypedEventFilter< + [string, string], + { oldAdmin: string; newAdmin: string } + >; + + NewImplementation( + oldImplementation: null, + newImplementation: null + ): TypedEventFilter< + [string, string], + { oldImplementation: string; newImplementation: string } + >; + + NewPendingAdmin( + oldPendingAdmin: null, + newPendingAdmin: null + ): TypedEventFilter< + [string, string], + { oldPendingAdmin: string; newPendingAdmin: string } + >; + + ProposalCanceled( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalCreated( + id: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + id: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalQueued( + id: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { id: BigNumber; eta: BigNumber } + >; + + ProposalThresholdSet( + oldProposalThreshold: null, + newProposalThreshold: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldProposalThreshold: BigNumber; newProposalThreshold: BigNumber } + >; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + votes: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + votes: BigNumber; + reason: string; + } + >; + + VotingDelaySet( + oldVotingDelay: null, + newVotingDelay: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldVotingDelay: BigNumber; newVotingDelay: BigNumber } + >; + + VotingPeriodSet( + oldVotingPeriod: null, + newVotingPeriod: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldVotingPeriod: BigNumber; newVotingPeriod: BigNumber } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + MAX_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MAX_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MAX_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MAX_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + MIN_PROPOSAL_THRESHOLD(overrides?: CallOverrides): Promise; + + "MIN_PROPOSAL_THRESHOLD()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MIN_VOTING_DELAY()"(overrides?: CallOverrides): Promise; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MIN_VOTING_PERIOD()"(overrides?: CallOverrides): Promise; + + _acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _initiate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_initiate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"(overrides?: CallOverrides): Promise; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations(overrides?: CallOverrides): Promise; + + "proposalMaxOperations()"(overrides?: CallOverrides): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + setInitialProposalId( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setInitialProposalId()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + MAX_PROPOSAL_THRESHOLD( + overrides?: CallOverrides + ): Promise; + + "MAX_PROPOSAL_THRESHOLD()"( + overrides?: CallOverrides + ): Promise; + + MAX_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MAX_VOTING_DELAY()"( + overrides?: CallOverrides + ): Promise; + + MAX_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MAX_VOTING_PERIOD()"( + overrides?: CallOverrides + ): Promise; + + MIN_PROPOSAL_THRESHOLD( + overrides?: CallOverrides + ): Promise; + + "MIN_PROPOSAL_THRESHOLD()"( + overrides?: CallOverrides + ): Promise; + + MIN_VOTING_DELAY(overrides?: CallOverrides): Promise; + + "MIN_VOTING_DELAY()"( + overrides?: CallOverrides + ): Promise; + + MIN_VOTING_PERIOD(overrides?: CallOverrides): Promise; + + "MIN_VOTING_PERIOD()"( + overrides?: CallOverrides + ): Promise; + + _acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _initiate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_initiate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setPendingAdmin( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setPendingAdmin(address)"( + newPendingAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setProposalThreshold( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setProposalThreshold(uint256)"( + newProposalThreshold: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingDelay( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingDelay(uint256)"( + newVotingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + _setVotingPeriod( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "_setVotingPeriod(uint256)"( + newVotingPeriod: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + comp(overrides?: CallOverrides): Promise; + + "comp()"(overrides?: CallOverrides): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"( + overrides?: CallOverrides + ): Promise; + + initialProposalId(overrides?: CallOverrides): Promise; + + "initialProposalId()"( + overrides?: CallOverrides + ): Promise; + + initialize( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,uint256,uint256,uint256)"( + timelock_: string, + comp_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + latestProposalIds( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "latestProposalIds(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalMaxOperations( + overrides?: CallOverrides + ): Promise; + + "proposalMaxOperations()"( + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"( + overrides?: CallOverrides + ): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + setInitialProposalId( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setInitialProposalId()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorCompatibilityBravo.d.ts b/packages/chain-events/src/contractTypes/GovernorCompatibilityBravo.d.ts new file mode 100644 index 00000000000..7374ccc54aa --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorCompatibilityBravo.d.ts @@ -0,0 +1,1905 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorCompatibilityBravoInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "COUNTING_MODE()": FunctionFragment; + "cancel(uint256)": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getActions(uint256)": FunctionFragment; + "getReceipt(uint256,address)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalEta(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "proposalThreshold()": FunctionFragment; + "proposals(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "queue(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "quorumVotes()": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "timelock()": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "cancel", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getActions", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getReceipt", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalEta", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalThreshold", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposals", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "queue", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "quorumVotes", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "timelock", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActions", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getReceipt", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalEta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "proposals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "quorumVotes", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "timelock", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class GovernorCompatibilityBravo extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorCompatibilityBravoInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + ] + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + ] + >; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalThreshold()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposals( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + quorumVotes(overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorumVotes()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + timelock(overrides?: CallOverrides): Promise<[string]>; + + "timelock()"(overrides?: CallOverrides): Promise<[string]>; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + cancel(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalQueued( + proposalId: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { proposalId: BigNumber; eta: BigNumber } + >; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"( + overrides?: CallOverrides + ): Promise; + + proposals( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorCountingSimple.d.ts b/packages/chain-events/src/contractTypes/GovernorCountingSimple.d.ts new file mode 100644 index 00000000000..126c94c0ba4 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorCountingSimple.d.ts @@ -0,0 +1,1330 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorCountingSimpleInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "COUNTING_MODE()": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "proposalVotes(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalVotes", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalVotes", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class GovernorCountingSimple extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorCountingSimpleInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalVotes( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + againstVotes: BigNumber; + forVotes: BigNumber; + abstainVotes: BigNumber; + } + >; + + "proposalVotes(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + againstVotes: BigNumber; + forVotes: BigNumber; + abstainVotes: BigNumber; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalVotes( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + againstVotes: BigNumber; + forVotes: BigNumber; + abstainVotes: BigNumber; + } + >; + + "proposalVotes(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + againstVotes: BigNumber; + forVotes: BigNumber; + abstainVotes: BigNumber; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalVotes( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + againstVotes: BigNumber; + forVotes: BigNumber; + abstainVotes: BigNumber; + } + >; + + "proposalVotes(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + againstVotes: BigNumber; + forVotes: BigNumber; + abstainVotes: BigNumber; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalVotes( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalVotes(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalVotes( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalVotes(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorMock.d.ts b/packages/chain-events/src/contractTypes/GovernorMock.d.ts new file mode 100644 index 00000000000..a3b40c84486 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorMock.d.ts @@ -0,0 +1,1848 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorMockInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "COUNTING_MODE()": FunctionFragment; + "cancel(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalEta(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "proposalThreshold()": FunctionFragment; + "proposalVotes(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "queue(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "quorumDenominator()": FunctionFragment; + "quorumNumerator()": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "timelock()": FunctionFragment; + "token()": FunctionFragment; + "updateQuorumNumerator(uint256)": FunctionFragment; + "updateTimelock(address)": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "cancel", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalEta", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalThreshold", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalVotes", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "queue", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "quorumDenominator", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "quorumNumerator", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "timelock", values?: undefined): string; + encodeFunctionData(functionFragment: "token", values?: undefined): string; + encodeFunctionData( + functionFragment: "updateQuorumNumerator", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "updateTimelock", + values: [string] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalEta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalVotes", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "quorumDenominator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "quorumNumerator", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "timelock", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "token", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updateQuorumNumerator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateTimelock", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "QuorumNumeratorUpdated(uint256,uint256)": EventFragment; + "TimelockChange(address,address)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "QuorumNumeratorUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TimelockChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class GovernorMock extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorMockInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + cancel( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalThreshold()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalVotes( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + againstVotes: BigNumber; + forVotes: BigNumber; + abstainVotes: BigNumber; + } + >; + + "proposalVotes(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + againstVotes: BigNumber; + forVotes: BigNumber; + abstainVotes: BigNumber; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + quorumDenominator(overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorumDenominator()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + quorumNumerator(overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorumNumerator()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + timelock(overrides?: CallOverrides): Promise<[string]>; + + "timelock()"(overrides?: CallOverrides): Promise<[string]>; + + token(overrides?: CallOverrides): Promise<[string]>; + + "token()"(overrides?: CallOverrides): Promise<[string]>; + + updateQuorumNumerator( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateQuorumNumerator(uint256)"( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + cancel( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposalVotes( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + againstVotes: BigNumber; + forVotes: BigNumber; + abstainVotes: BigNumber; + } + >; + + "proposalVotes(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + againstVotes: BigNumber; + forVotes: BigNumber; + abstainVotes: BigNumber; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumDenominator(overrides?: CallOverrides): Promise; + + "quorumDenominator()"(overrides?: CallOverrides): Promise; + + quorumNumerator(overrides?: CallOverrides): Promise; + + "quorumNumerator()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + updateQuorumNumerator( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateQuorumNumerator(uint256)"( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + cancel( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "cancel(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposalVotes( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + againstVotes: BigNumber; + forVotes: BigNumber; + abstainVotes: BigNumber; + } + >; + + "proposalVotes(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, BigNumber] & { + againstVotes: BigNumber; + forVotes: BigNumber; + abstainVotes: BigNumber; + } + >; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumDenominator(overrides?: CallOverrides): Promise; + + "quorumDenominator()"(overrides?: CallOverrides): Promise; + + quorumNumerator(overrides?: CallOverrides): Promise; + + "quorumNumerator()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + updateQuorumNumerator( + newQuorumNumerator: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "updateQuorumNumerator(uint256)"( + newQuorumNumerator: BigNumberish, + overrides?: CallOverrides + ): Promise; + + updateTimelock( + newTimelock: string, + overrides?: CallOverrides + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalQueued( + proposalId: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { proposalId: BigNumber; eta: BigNumber } + >; + + QuorumNumeratorUpdated( + oldQuorumNumerator: null, + newQuorumNumerator: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldQuorumNumerator: BigNumber; newQuorumNumerator: BigNumber } + >; + + TimelockChange( + oldTimelock: null, + newTimelock: null + ): TypedEventFilter< + [string, string], + { oldTimelock: string; newTimelock: string } + >; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + cancel( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposalVotes( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalVotes(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumDenominator(overrides?: CallOverrides): Promise; + + "quorumDenominator()"(overrides?: CallOverrides): Promise; + + quorumNumerator(overrides?: CallOverrides): Promise; + + "quorumNumerator()"(overrides?: CallOverrides): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + updateQuorumNumerator( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateQuorumNumerator(uint256)"( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + cancel( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"( + overrides?: CallOverrides + ): Promise; + + proposalVotes( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalVotes(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumDenominator(overrides?: CallOverrides): Promise; + + "quorumDenominator()"( + overrides?: CallOverrides + ): Promise; + + quorumNumerator(overrides?: CallOverrides): Promise; + + "quorumNumerator()"( + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + updateQuorumNumerator( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateQuorumNumerator(uint256)"( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorProposalThreshold.d.ts b/packages/chain-events/src/contractTypes/GovernorProposalThreshold.d.ts new file mode 100644 index 00000000000..d0918ea65d5 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorProposalThreshold.d.ts @@ -0,0 +1,1266 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorProposalThresholdInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "COUNTING_MODE()": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "proposalThreshold()": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalThreshold", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class GovernorProposalThreshold extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorProposalThresholdInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalThreshold()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"( + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorTimelockCompound.d.ts b/packages/chain-events/src/contractTypes/GovernorTimelockCompound.d.ts new file mode 100644 index 00000000000..6fdddf1696d --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorTimelockCompound.d.ts @@ -0,0 +1,1527 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorTimelockCompoundInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "COUNTING_MODE()": FunctionFragment; + "__acceptAdmin()": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalEta(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "queue(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "timelock()": FunctionFragment; + "updateTimelock(address)": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "__acceptAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalEta", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "queue", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "timelock", values?: undefined): string; + encodeFunctionData( + functionFragment: "updateTimelock", + values: [string] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "__acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalEta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "timelock", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updateTimelock", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "TimelockChange(address,address)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TimelockChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class GovernorTimelockCompound extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorTimelockCompoundInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + timelock(overrides?: CallOverrides): Promise<[string]>; + + "timelock()"(overrides?: CallOverrides): Promise<[string]>; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + __acceptAdmin(overrides?: CallOverrides): Promise; + + "__acceptAdmin()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + updateTimelock( + newTimelock: string, + overrides?: CallOverrides + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalQueued( + proposalId: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { proposalId: BigNumber; eta: BigNumber } + >; + + TimelockChange( + oldTimelock: null, + newTimelock: null + ): TypedEventFilter< + [string, string], + { oldTimelock: string; newTimelock: string } + >; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + __acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorTimelockControl.d.ts b/packages/chain-events/src/contractTypes/GovernorTimelockControl.d.ts new file mode 100644 index 00000000000..dc01d77ca6c --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorTimelockControl.d.ts @@ -0,0 +1,1482 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorTimelockControlInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "COUNTING_MODE()": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalEta(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "queue(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "timelock()": FunctionFragment; + "updateTimelock(address)": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalEta", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "queue", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "timelock", values?: undefined): string; + encodeFunctionData( + functionFragment: "updateTimelock", + values: [string] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalEta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "timelock", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updateTimelock", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "TimelockChange(address,address)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "TimelockChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class GovernorTimelockControl extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorTimelockControlInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + timelock(overrides?: CallOverrides): Promise<[string]>; + + "timelock()"(overrides?: CallOverrides): Promise<[string]>; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + updateTimelock( + newTimelock: string, + overrides?: CallOverrides + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalQueued( + proposalId: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { proposalId: BigNumber; eta: BigNumber } + >; + + TimelockChange( + oldTimelock: null, + newTimelock: null + ): TypedEventFilter< + [string, string], + { oldTimelock: string; newTimelock: string } + >; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + updateTimelock( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateTimelock(address)"( + newTimelock: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorVotes.d.ts b/packages/chain-events/src/contractTypes/GovernorVotes.d.ts new file mode 100644 index 00000000000..d960471c87b --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorVotes.d.ts @@ -0,0 +1,1258 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorVotesInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "COUNTING_MODE()": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "token()": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "token", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "token", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class GovernorVotes extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorVotesInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + token(overrides?: CallOverrides): Promise<[string]>; + + "token()"(overrides?: CallOverrides): Promise<[string]>; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorVotesComp.d.ts b/packages/chain-events/src/contractTypes/GovernorVotesComp.d.ts new file mode 100644 index 00000000000..726068d351b --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorVotesComp.d.ts @@ -0,0 +1,1258 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorVotesCompInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "COUNTING_MODE()": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "token()": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "token", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "token", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class GovernorVotesComp extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorVotesCompInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + token(overrides?: CallOverrides): Promise<[string]>; + + "token()"(overrides?: CallOverrides): Promise<[string]>; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GovernorVotesQuorumFraction.d.ts b/packages/chain-events/src/contractTypes/GovernorVotesQuorumFraction.d.ts new file mode 100644 index 00000000000..dde1c365fa8 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GovernorVotesQuorumFraction.d.ts @@ -0,0 +1,1389 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GovernorVotesQuorumFractionInterface extends ethers.utils.Interface { + functions: { + "BALLOT_TYPEHASH()": FunctionFragment; + "COUNTING_MODE()": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "quorumDenominator()": FunctionFragment; + "quorumNumerator()": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "token()": FunctionFragment; + "updateQuorumNumerator(uint256)": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "BALLOT_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "quorumDenominator", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "quorumNumerator", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "token", values?: undefined): string; + encodeFunctionData( + functionFragment: "updateQuorumNumerator", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "BALLOT_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "quorumDenominator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "quorumNumerator", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "token", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updateQuorumNumerator", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "QuorumNumeratorUpdated(uint256,uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "QuorumNumeratorUpdated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class GovernorVotesQuorumFraction extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GovernorVotesQuorumFractionInterface; + + functions: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + quorumDenominator(overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorumDenominator()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + quorumNumerator(overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorumNumerator()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + token(overrides?: CallOverrides): Promise<[string]>; + + "token()"(overrides?: CallOverrides): Promise<[string]>; + + updateQuorumNumerator( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateQuorumNumerator(uint256)"( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumDenominator(overrides?: CallOverrides): Promise; + + "quorumDenominator()"(overrides?: CallOverrides): Promise; + + quorumNumerator(overrides?: CallOverrides): Promise; + + "quorumNumerator()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + updateQuorumNumerator( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateQuorumNumerator(uint256)"( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumDenominator(overrides?: CallOverrides): Promise; + + "quorumDenominator()"(overrides?: CallOverrides): Promise; + + quorumNumerator(overrides?: CallOverrides): Promise; + + "quorumNumerator()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + updateQuorumNumerator( + newQuorumNumerator: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "updateQuorumNumerator(uint256)"( + newQuorumNumerator: BigNumberish, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + QuorumNumeratorUpdated( + oldQuorumNumerator: null, + newQuorumNumerator: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldQuorumNumerator: BigNumber; newQuorumNumerator: BigNumber } + >; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"(overrides?: CallOverrides): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumDenominator(overrides?: CallOverrides): Promise; + + "quorumDenominator()"(overrides?: CallOverrides): Promise; + + quorumNumerator(overrides?: CallOverrides): Promise; + + "quorumNumerator()"(overrides?: CallOverrides): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + updateQuorumNumerator( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateQuorumNumerator(uint256)"( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + BALLOT_TYPEHASH(overrides?: CallOverrides): Promise; + + "BALLOT_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumDenominator(overrides?: CallOverrides): Promise; + + "quorumDenominator()"( + overrides?: CallOverrides + ): Promise; + + quorumNumerator(overrides?: CallOverrides): Promise; + + "quorumNumerator()"( + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + token(overrides?: CallOverrides): Promise; + + "token()"(overrides?: CallOverrides): Promise; + + updateQuorumNumerator( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateQuorumNumerator(uint256)"( + newQuorumNumerator: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GuildBank1.d.ts b/packages/chain-events/src/contractTypes/GuildBank1.d.ts new file mode 100644 index 00000000000..330db79da44 --- /dev/null +++ b/packages/chain-events/src/contractTypes/GuildBank1.d.ts @@ -0,0 +1,360 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GuildBank1Interface extends ethers.utils.Interface { + functions: { + "approvedToken()": FunctionFragment; + "isOwner()": FunctionFragment; + "owner()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "withdraw(address,uint256,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "approvedToken", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "isOwner", values?: undefined): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [string, BigNumberish, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "approvedToken", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + + events: { + "OwnershipTransferred(address,address)": EventFragment; + "Withdrawal(address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdrawal"): EventFragment; +} + +export class GuildBank1 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GuildBank1Interface; + + functions: { + approvedToken(overrides?: CallOverrides): Promise<[string]>; + + "approvedToken()"(overrides?: CallOverrides): Promise<[string]>; + + isOwner(overrides?: CallOverrides): Promise<[boolean]>; + + "isOwner()"(overrides?: CallOverrides): Promise<[boolean]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + "owner()"(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdraw( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "withdraw(address,uint256,uint256)"( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + approvedToken(overrides?: CallOverrides): Promise; + + "approvedToken()"(overrides?: CallOverrides): Promise; + + isOwner(overrides?: CallOverrides): Promise; + + "isOwner()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdraw( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "withdraw(address,uint256,uint256)"( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + approvedToken(overrides?: CallOverrides): Promise; + + "approvedToken()"(overrides?: CallOverrides): Promise; + + isOwner(overrides?: CallOverrides): Promise; + + "isOwner()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + "renounceOwnership()"(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: CallOverrides + ): Promise; + + withdraw( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "withdraw(address,uint256,uint256)"( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + OwnershipTransferred( + previousOwner: string | null, + newOwner: string | null + ): TypedEventFilter< + [string, string], + { previousOwner: string; newOwner: string } + >; + + Withdrawal( + receiver: string | null, + amount: null + ): TypedEventFilter< + [string, BigNumber], + { receiver: string; amount: BigNumber } + >; + }; + + estimateGas: { + approvedToken(overrides?: CallOverrides): Promise; + + "approvedToken()"(overrides?: CallOverrides): Promise; + + isOwner(overrides?: CallOverrides): Promise; + + "isOwner()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdraw( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "withdraw(address,uint256,uint256)"( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + approvedToken(overrides?: CallOverrides): Promise; + + "approvedToken()"(overrides?: CallOverrides): Promise; + + isOwner(overrides?: CallOverrides): Promise; + + "isOwner()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdraw( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "withdraw(address,uint256,uint256)"( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/GuildBank2.d.ts b/packages/chain-events/src/contractTypes/GuildBank2.d.ts new file mode 100644 index 00000000000..ab2c2b4558e --- /dev/null +++ b/packages/chain-events/src/contractTypes/GuildBank2.d.ts @@ -0,0 +1,421 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface GuildBank2Interface extends ethers.utils.Interface { + functions: { + "isOwner()": FunctionFragment; + "owner()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + "withdraw(address,uint256,uint256,address[])": FunctionFragment; + "withdrawToken(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "isOwner", values?: undefined): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [string, BigNumberish, BigNumberish, string[]] + ): string; + encodeFunctionData( + functionFragment: "withdrawToken", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "isOwner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "withdrawToken", + data: BytesLike + ): Result; + + events: { + "OwnershipTransferred(address,address)": EventFragment; + "Withdrawal(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdrawal"): EventFragment; +} + +export class GuildBank2 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: GuildBank2Interface; + + functions: { + isOwner(overrides?: CallOverrides): Promise<[boolean]>; + + "isOwner()"(overrides?: CallOverrides): Promise<[boolean]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + "owner()"(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdraw( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + _approvedTokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "withdraw(address,uint256,uint256,address[])"( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + _approvedTokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdrawToken( + token: string, + receiver: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "withdrawToken(address,address,uint256)"( + token: string, + receiver: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + isOwner(overrides?: CallOverrides): Promise; + + "isOwner()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdraw( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + _approvedTokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "withdraw(address,uint256,uint256,address[])"( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + _approvedTokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdrawToken( + token: string, + receiver: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "withdrawToken(address,address,uint256)"( + token: string, + receiver: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + isOwner(overrides?: CallOverrides): Promise; + + "isOwner()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + "renounceOwnership()"(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: CallOverrides + ): Promise; + + withdraw( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + _approvedTokens: string[], + overrides?: CallOverrides + ): Promise; + + "withdraw(address,uint256,uint256,address[])"( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + _approvedTokens: string[], + overrides?: CallOverrides + ): Promise; + + withdrawToken( + token: string, + receiver: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "withdrawToken(address,address,uint256)"( + token: string, + receiver: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + OwnershipTransferred( + previousOwner: string | null, + newOwner: string | null + ): TypedEventFilter< + [string, string], + { previousOwner: string; newOwner: string } + >; + + Withdrawal( + receiver: string | null, + tokenAddress: string | null, + amount: null + ): TypedEventFilter< + [string, string, BigNumber], + { receiver: string; tokenAddress: string; amount: BigNumber } + >; + }; + + estimateGas: { + isOwner(overrides?: CallOverrides): Promise; + + "isOwner()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdraw( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + _approvedTokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "withdraw(address,uint256,uint256,address[])"( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + _approvedTokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdrawToken( + token: string, + receiver: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "withdrawToken(address,address,uint256)"( + token: string, + receiver: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + isOwner(overrides?: CallOverrides): Promise; + + "isOwner()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdraw( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + _approvedTokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "withdraw(address,uint256,uint256,address[])"( + receiver: string, + shares: BigNumberish, + totalShares: BigNumberish, + _approvedTokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + withdrawToken( + token: string, + receiver: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "withdrawToken(address,address,uint256)"( + token: string, + receiver: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/Helper.d.ts b/packages/chain-events/src/contractTypes/Helper.d.ts new file mode 100644 index 00000000000..fffe5838631 --- /dev/null +++ b/packages/chain-events/src/contractTypes/Helper.d.ts @@ -0,0 +1,78 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface HelperInterface extends ethers.utils.Interface { + functions: {}; + + events: {}; +} + +export class Helper extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: HelperInterface; + + functions: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/chain-events/src/contractTypes/IAaveGovernanceV2.d.ts b/packages/chain-events/src/contractTypes/IAaveGovernanceV2.d.ts new file mode 100644 index 00000000000..3c91a54a53a --- /dev/null +++ b/packages/chain-events/src/contractTypes/IAaveGovernanceV2.d.ts @@ -0,0 +1,1540 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IAaveGovernanceV2Interface extends ethers.utils.Interface { + functions: { + "__abdicate()": FunctionFragment; + "authorizeExecutors(address[])": FunctionFragment; + "cancel(uint256)": FunctionFragment; + "create(address,address[],uint256[],string[],bytes[],bool[],bytes32)": FunctionFragment; + "execute(uint256)": FunctionFragment; + "getGovernanceStrategy()": FunctionFragment; + "getGuardian()": FunctionFragment; + "getProposalById(uint256)": FunctionFragment; + "getProposalState(uint256)": FunctionFragment; + "getProposalsCount()": FunctionFragment; + "getVoteOnProposal(uint256,address)": FunctionFragment; + "getVotingDelay()": FunctionFragment; + "isExecutorAuthorized(address)": FunctionFragment; + "queue(uint256)": FunctionFragment; + "setGovernanceStrategy(address)": FunctionFragment; + "setVotingDelay(uint256)": FunctionFragment; + "submitVote(uint256,bool)": FunctionFragment; + "submitVoteBySignature(uint256,bool,uint8,bytes32,bytes32)": FunctionFragment; + "unauthorizeExecutors(address[])": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "__abdicate", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "authorizeExecutors", + values: [string[]] + ): string; + encodeFunctionData( + functionFragment: "cancel", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "create", + values: [ + string, + string[], + BigNumberish[], + string[], + BytesLike[], + boolean[], + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getGovernanceStrategy", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getGuardian", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getProposalById", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getProposalState", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getProposalsCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getVoteOnProposal", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "getVotingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isExecutorAuthorized", + values: [string] + ): string; + encodeFunctionData(functionFragment: "queue", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "setGovernanceStrategy", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "setVotingDelay", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "submitVote", + values: [BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "submitVoteBySignature", + values: [BigNumberish, boolean, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "unauthorizeExecutors", + values: [string[]] + ): string; + + decodeFunctionResult(functionFragment: "__abdicate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "authorizeExecutors", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getGovernanceStrategy", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getGuardian", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposalById", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposalState", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposalsCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVoteOnProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVotingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isExecutorAuthorized", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setGovernanceStrategy", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setVotingDelay", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "submitVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "submitVoteBySignature", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "unauthorizeExecutors", + data: BytesLike + ): Result; + + events: { + "ExecutorAuthorized(address)": EventFragment; + "ExecutorUnauthorized(address)": EventFragment; + "GovernanceStrategyChanged(address,address)": EventFragment; + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address,address[],uint256[],string[],bytes[],bool[],uint256,uint256,address,bytes32)": EventFragment; + "ProposalExecuted(uint256,address)": EventFragment; + "ProposalQueued(uint256,uint256,address)": EventFragment; + "VoteEmitted(uint256,address,bool,uint256)": EventFragment; + "VotingDelayChanged(uint256,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ExecutorAuthorized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutorUnauthorized"): EventFragment; + getEvent(nameOrSignatureOrTopic: "GovernanceStrategyChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteEmitted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VotingDelayChanged"): EventFragment; +} + +export class IAaveGovernanceV2 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IAaveGovernanceV2Interface; + + functions: { + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + authorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + create( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "create(address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getGovernanceStrategy(overrides?: CallOverrides): Promise<[string]>; + + "getGovernanceStrategy()"(overrides?: CallOverrides): Promise<[string]>; + + getGuardian(overrides?: CallOverrides): Promise<[string]>; + + "getGuardian()"(overrides?: CallOverrides): Promise<[string]>; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + string, + string + ] & { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + executionTime: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + executed: boolean; + canceled: boolean; + strategy: string; + ipfsHash: string; + } + ] + >; + + "getProposalById(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + string, + string + ] & { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + executionTime: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + executed: boolean; + canceled: boolean; + strategy: string; + ipfsHash: string; + } + ] + >; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "getProposalState(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + getProposalsCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + "getProposalsCount()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getVoteOnProposal( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [[boolean, BigNumber] & { support: boolean; votingPower: BigNumber }] + >; + + "getVoteOnProposal(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [[boolean, BigNumber] & { support: boolean; votingPower: BigNumber }] + >; + + getVotingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "getVotingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + isExecutorAuthorized( + executor: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isExecutorAuthorized(address)"( + executor: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setGovernanceStrategy( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setGovernanceStrategy(address)"( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingDelay( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingDelay(uint256)"( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVoteBySignature(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + unauthorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "unauthorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + authorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + create( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "create(address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getGovernanceStrategy(overrides?: CallOverrides): Promise; + + "getGovernanceStrategy()"(overrides?: CallOverrides): Promise; + + getGuardian(overrides?: CallOverrides): Promise; + + "getGuardian()"(overrides?: CallOverrides): Promise; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + string, + string + ] & { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + executionTime: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + executed: boolean; + canceled: boolean; + strategy: string; + ipfsHash: string; + } + >; + + "getProposalById(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + string, + string + ] & { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + executionTime: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + executed: boolean; + canceled: boolean; + strategy: string; + ipfsHash: string; + } + >; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getProposalState(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalsCount(overrides?: CallOverrides): Promise; + + "getProposalsCount()"(overrides?: CallOverrides): Promise; + + getVoteOnProposal( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, BigNumber] & { support: boolean; votingPower: BigNumber } + >; + + "getVoteOnProposal(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, BigNumber] & { support: boolean; votingPower: BigNumber } + >; + + getVotingDelay(overrides?: CallOverrides): Promise; + + "getVotingDelay()"(overrides?: CallOverrides): Promise; + + isExecutorAuthorized( + executor: string, + overrides?: CallOverrides + ): Promise; + + "isExecutorAuthorized(address)"( + executor: string, + overrides?: CallOverrides + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setGovernanceStrategy( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setGovernanceStrategy(address)"( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingDelay( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingDelay(uint256)"( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVoteBySignature(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + unauthorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "unauthorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + __abdicate(overrides?: CallOverrides): Promise; + + "__abdicate()"(overrides?: CallOverrides): Promise; + + authorizeExecutors( + executors: string[], + overrides?: CallOverrides + ): Promise; + + "authorizeExecutors(address[])"( + executors: string[], + overrides?: CallOverrides + ): Promise; + + cancel(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + create( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "create(address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + execute(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getGovernanceStrategy(overrides?: CallOverrides): Promise; + + "getGovernanceStrategy()"(overrides?: CallOverrides): Promise; + + getGuardian(overrides?: CallOverrides): Promise; + + "getGuardian()"(overrides?: CallOverrides): Promise; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + string, + string + ] & { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + executionTime: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + executed: boolean; + canceled: boolean; + strategy: string; + ipfsHash: string; + } + >; + + "getProposalById(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + string, + string + ] & { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + executionTime: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + executed: boolean; + canceled: boolean; + strategy: string; + ipfsHash: string; + } + >; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getProposalState(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalsCount(overrides?: CallOverrides): Promise; + + "getProposalsCount()"(overrides?: CallOverrides): Promise; + + getVoteOnProposal( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, BigNumber] & { support: boolean; votingPower: BigNumber } + >; + + "getVoteOnProposal(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, BigNumber] & { support: boolean; votingPower: BigNumber } + >; + + getVotingDelay(overrides?: CallOverrides): Promise; + + "getVotingDelay()"(overrides?: CallOverrides): Promise; + + isExecutorAuthorized( + executor: string, + overrides?: CallOverrides + ): Promise; + + "isExecutorAuthorized(address)"( + executor: string, + overrides?: CallOverrides + ): Promise; + + queue(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + setGovernanceStrategy( + governanceStrategy: string, + overrides?: CallOverrides + ): Promise; + + "setGovernanceStrategy(address)"( + governanceStrategy: string, + overrides?: CallOverrides + ): Promise; + + setVotingDelay( + votingDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "setVotingDelay(uint256)"( + votingDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + overrides?: CallOverrides + ): Promise; + + "submitVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: CallOverrides + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "submitVoteBySignature(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + unauthorizeExecutors( + executors: string[], + overrides?: CallOverrides + ): Promise; + + "unauthorizeExecutors(address[])"( + executors: string[], + overrides?: CallOverrides + ): Promise; + }; + + filters: { + ExecutorAuthorized( + executor: null + ): TypedEventFilter<[string], { executor: string }>; + + ExecutorUnauthorized( + executor: null + ): TypedEventFilter<[string], { executor: string }>; + + GovernanceStrategyChanged( + newStrategy: string | null, + initiatorChange: string | null + ): TypedEventFilter< + [string, string], + { newStrategy: string; initiatorChange: string } + >; + + ProposalCanceled( + id: null + ): TypedEventFilter<[BigNumber], { id: BigNumber }>; + + ProposalCreated( + id: null, + creator: string | null, + executor: string | null, + targets: null, + values: null, + signatures: null, + calldatas: null, + withDelegatecalls: null, + startBlock: null, + endBlock: null, + strategy: null, + ipfsHash: null + ): TypedEventFilter< + [ + BigNumber, + string, + string, + string[], + BigNumber[], + string[], + string[], + boolean[], + BigNumber, + BigNumber, + string, + string + ], + { + id: BigNumber; + creator: string; + executor: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + withDelegatecalls: boolean[]; + startBlock: BigNumber; + endBlock: BigNumber; + strategy: string; + ipfsHash: string; + } + >; + + ProposalExecuted( + id: null, + initiatorExecution: string | null + ): TypedEventFilter< + [BigNumber, string], + { id: BigNumber; initiatorExecution: string } + >; + + ProposalQueued( + id: null, + executionTime: null, + initiatorQueueing: string | null + ): TypedEventFilter< + [BigNumber, BigNumber, string], + { id: BigNumber; executionTime: BigNumber; initiatorQueueing: string } + >; + + VoteEmitted( + id: null, + voter: string | null, + support: null, + votingPower: null + ): TypedEventFilter< + [BigNumber, string, boolean, BigNumber], + { id: BigNumber; voter: string; support: boolean; votingPower: BigNumber } + >; + + VotingDelayChanged( + newVotingDelay: null, + initiatorChange: string | null + ): TypedEventFilter< + [BigNumber, string], + { newVotingDelay: BigNumber; initiatorChange: string } + >; + }; + + estimateGas: { + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + authorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + create( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "create(address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getGovernanceStrategy(overrides?: CallOverrides): Promise; + + "getGovernanceStrategy()"(overrides?: CallOverrides): Promise; + + getGuardian(overrides?: CallOverrides): Promise; + + "getGuardian()"(overrides?: CallOverrides): Promise; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getProposalById(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getProposalState(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalsCount(overrides?: CallOverrides): Promise; + + "getProposalsCount()"(overrides?: CallOverrides): Promise; + + getVoteOnProposal( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getVoteOnProposal(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + getVotingDelay(overrides?: CallOverrides): Promise; + + "getVotingDelay()"(overrides?: CallOverrides): Promise; + + isExecutorAuthorized( + executor: string, + overrides?: CallOverrides + ): Promise; + + "isExecutorAuthorized(address)"( + executor: string, + overrides?: CallOverrides + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setGovernanceStrategy( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setGovernanceStrategy(address)"( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingDelay( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingDelay(uint256)"( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVoteBySignature(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + unauthorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "unauthorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + __abdicate( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "__abdicate()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + authorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + create( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "create(address,address[],uint256[],string[],bytes[],bool[],bytes32)"( + executor: string, + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + withDelegatecalls: boolean[], + ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getGovernanceStrategy( + overrides?: CallOverrides + ): Promise; + + "getGovernanceStrategy()"( + overrides?: CallOverrides + ): Promise; + + getGuardian(overrides?: CallOverrides): Promise; + + "getGuardian()"(overrides?: CallOverrides): Promise; + + getProposalById( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getProposalById(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalState( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getProposalState(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalsCount(overrides?: CallOverrides): Promise; + + "getProposalsCount()"( + overrides?: CallOverrides + ): Promise; + + getVoteOnProposal( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getVoteOnProposal(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + getVotingDelay(overrides?: CallOverrides): Promise; + + "getVotingDelay()"( + overrides?: CallOverrides + ): Promise; + + isExecutorAuthorized( + executor: string, + overrides?: CallOverrides + ): Promise; + + "isExecutorAuthorized(address)"( + executor: string, + overrides?: CallOverrides + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setGovernanceStrategy( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setGovernanceStrategy(address)"( + governanceStrategy: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setVotingDelay( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setVotingDelay(uint256)"( + votingDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,bool)"( + proposalId: BigNumberish, + support: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVoteBySignature( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVoteBySignature(uint256,bool,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: boolean, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + unauthorizeExecutors( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "unauthorizeExecutors(address[])"( + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IAccessControl.d.ts b/packages/chain-events/src/contractTypes/IAccessControl.d.ts new file mode 100644 index 00000000000..0c9c255cf59 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IAccessControl.d.ts @@ -0,0 +1,435 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IAccessControlInterface extends ethers.utils.Interface { + functions: { + "getRoleAdmin(bytes32)": FunctionFragment; + "grantRole(bytes32,address)": FunctionFragment; + "hasRole(bytes32,address)": FunctionFragment; + "renounceRole(bytes32,address)": FunctionFragment; + "revokeRole(bytes32,address)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [BytesLike, string] + ): string; + + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + + events: { + "RoleAdminChanged(bytes32,bytes32,bytes32)": EventFragment; + "RoleGranted(bytes32,address,address)": EventFragment; + "RoleRevoked(bytes32,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; +} + +export class IAccessControl extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IAccessControlInterface; + + functions: { + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<[string]>; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise<[string]>; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + RoleAdminChanged( + role: BytesLike | null, + previousAdminRole: BytesLike | null, + newAdminRole: BytesLike | null + ): TypedEventFilter< + [string, string, string], + { role: string; previousAdminRole: string; newAdminRole: string } + >; + + RoleGranted( + role: BytesLike | null, + account: string | null, + sender: string | null + ): TypedEventFilter< + [string, string, string], + { role: string; account: string; sender: string } + >; + + RoleRevoked( + role: BytesLike | null, + account: string | null, + sender: string | null + ): TypedEventFilter< + [string, string, string], + { role: string; account: string; sender: string } + >; + }; + + estimateGas: { + getRoleAdmin( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + getRoleAdmin( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ICompoundTimelock.d.ts b/packages/chain-events/src/contractTypes/ICompoundTimelock.d.ts new file mode 100644 index 00000000000..1449a47a1bd --- /dev/null +++ b/packages/chain-events/src/contractTypes/ICompoundTimelock.d.ts @@ -0,0 +1,756 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ICompoundTimelockInterface extends ethers.utils.Interface { + functions: { + "GRACE_PERIOD()": FunctionFragment; + "MAXIMUM_DELAY()": FunctionFragment; + "MINIMUM_DELAY()": FunctionFragment; + "acceptAdmin()": FunctionFragment; + "admin()": FunctionFragment; + "cancelTransaction(address,uint256,string,bytes,uint256)": FunctionFragment; + "delay()": FunctionFragment; + "executeTransaction(address,uint256,string,bytes,uint256)": FunctionFragment; + "pendingAdmin()": FunctionFragment; + "queueTransaction(address,uint256,string,bytes,uint256)": FunctionFragment; + "queuedTransactions(bytes32)": FunctionFragment; + "setDelay(uint256)": FunctionFragment; + "setPendingAdmin(address)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "GRACE_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAXIMUM_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MINIMUM_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "acceptAdmin", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData( + functionFragment: "cancelTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "delay", values?: undefined): string; + encodeFunctionData( + functionFragment: "executeTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "pendingAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "queueTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "queuedTransactions", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "setDelay", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setPendingAdmin", + values: [string] + ): string; + + decodeFunctionResult( + functionFragment: "GRACE_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAXIMUM_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MINIMUM_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "cancelTransaction", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeTransaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "pendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "queueTransaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "queuedTransactions", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setDelay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setPendingAdmin", + data: BytesLike + ): Result; + + events: {}; +} + +export class ICompoundTimelock extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ICompoundTimelockInterface; + + functions: { + GRACE_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise<[string]>; + + "admin()"(overrides?: CallOverrides): Promise<[string]>; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "delay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + "pendingAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + setDelay( + arg0: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + arg0: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDelay( + arg0: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + arg0: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin(overrides?: CallOverrides): Promise; + + "acceptAdmin()"(overrides?: CallOverrides): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDelay(arg0: BigNumberish, overrides?: CallOverrides): Promise; + + "setDelay(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + setPendingAdmin(arg0: string, overrides?: CallOverrides): Promise; + + "setPendingAdmin(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDelay( + arg0: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + arg0: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDelay( + arg0: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + arg0: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + arg0: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ICuratedProject.d.ts b/packages/chain-events/src/contractTypes/ICuratedProject.d.ts new file mode 100644 index 00000000000..00dfd87d47f --- /dev/null +++ b/packages/chain-events/src/contractTypes/ICuratedProject.d.ts @@ -0,0 +1,1211 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ICuratedProjectInterface extends ethers.utils.Interface { + functions: { + "bToken()": FunctionFragment; + "back(uint256)": FunctionFragment; + "backersWithdraw()": FunctionFragment; + "beneficiaryWithdraw()": FunctionFragment; + "cToken()": FunctionFragment; + "curate(uint256)": FunctionFragment; + "curatorFee()": FunctionFragment; + "curatorsWithdraw()": FunctionFragment; + "funded()": FunctionFragment; + "initialize(tuple,tuple,tuple,uint256,address,address)": FunctionFragment; + "lockedWithdraw()": FunctionFragment; + "metaData()": FunctionFragment; + "projectData()": FunctionFragment; + "protocolData()": FunctionFragment; + "setIpfsHash(bytes32)": FunctionFragment; + "setName(bytes32)": FunctionFragment; + "setUrl(bytes32)": FunctionFragment; + "totalCuratorFunding()": FunctionFragment; + "totalFunding()": FunctionFragment; + "withdrawRemaining()": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "bToken", values?: undefined): string; + encodeFunctionData(functionFragment: "back", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "backersWithdraw", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "beneficiaryWithdraw", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "cToken", values?: undefined): string; + encodeFunctionData( + functionFragment: "curate", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "curatorFee", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "curatorsWithdraw", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "funded", values?: undefined): string; + encodeFunctionData( + functionFragment: "initialize", + values: [ + { + id: BigNumberish; + name: BytesLike; + ipfsHash: BytesLike; + url: BytesLike; + creator: string; + }, + { + threshold: BigNumberish; + deadline: BigNumberish; + beneficiary: string; + acceptedToken: string; + }, + { fee: BigNumberish; feeTo: string }, + BigNumberish, + string, + string + ] + ): string; + encodeFunctionData( + functionFragment: "lockedWithdraw", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "metaData", values?: undefined): string; + encodeFunctionData( + functionFragment: "projectData", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "protocolData", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setIpfsHash", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "setName", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "setUrl", values: [BytesLike]): string; + encodeFunctionData( + functionFragment: "totalCuratorFunding", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "totalFunding", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "withdrawRemaining", + values?: undefined + ): string; + + decodeFunctionResult(functionFragment: "bToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "back", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "backersWithdraw", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "beneficiaryWithdraw", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "curate", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "curatorFee", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "curatorsWithdraw", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "funded", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "lockedWithdraw", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "metaData", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "projectData", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "protocolData", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setIpfsHash", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setName", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setUrl", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalCuratorFunding", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "totalFunding", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "withdrawRemaining", + data: BytesLike + ): Result; + + events: { + "Back(address,address,uint256)": EventFragment; + "Curate(address,address,uint256)": EventFragment; + "Failed()": EventFragment; + "ProjectDataChange(bytes32,bytes32,bytes32)": EventFragment; + "Succeeded(uint256,uint256)": EventFragment; + "Withdraw(address,address,uint256,bytes32)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Back"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Curate"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Failed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProjectDataChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Succeeded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdraw"): EventFragment; +} + +export class ICuratedProject extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ICuratedProjectInterface; + + functions: { + bToken(overrides?: CallOverrides): Promise<[string]>; + + "bToken()"(overrides?: CallOverrides): Promise<[string]>; + + back( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "back(uint256)"( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + backersWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "backersWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + beneficiaryWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "beneficiaryWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cToken(overrides?: CallOverrides): Promise<[string]>; + + "cToken()"(overrides?: CallOverrides): Promise<[string]>; + + curate( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "curate(uint256)"( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + curatorFee(overrides?: CallOverrides): Promise<[BigNumber]>; + + "curatorFee()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + curatorsWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "curatorsWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + funded(overrides?: CallOverrides): Promise<[boolean]>; + + "funded()"(overrides?: CallOverrides): Promise<[boolean]>; + + initialize( + _metaData: { + id: BigNumberish; + name: BytesLike; + ipfsHash: BytesLike; + url: BytesLike; + creator: string; + }, + _projectData: { + threshold: BigNumberish; + deadline: BigNumberish; + beneficiary: string; + acceptedToken: string; + }, + _protocolData: { fee: BigNumberish; feeTo: string }, + _curatorFee: BigNumberish, + _bToken: string, + _cToken: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize((uint256,bytes32,bytes32,bytes32,address),(uint256,uint256,address,address),(uint8,address),uint256,address,address)"( + _metaData: { + id: BigNumberish; + name: BytesLike; + ipfsHash: BytesLike; + url: BytesLike; + creator: string; + }, + _projectData: { + threshold: BigNumberish; + deadline: BigNumberish; + beneficiary: string; + acceptedToken: string; + }, + _protocolData: { fee: BigNumberish; feeTo: string }, + _curatorFee: BigNumberish, + _bToken: string, + _cToken: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + lockedWithdraw(overrides?: CallOverrides): Promise<[boolean]>; + + "lockedWithdraw()"(overrides?: CallOverrides): Promise<[boolean]>; + + metaData( + overrides?: CallOverrides + ): Promise< + [ + [BigNumber, string, string, string, string] & { + id: BigNumber; + name: string; + ipfsHash: string; + url: string; + creator: string; + } + ] + >; + + "metaData()"( + overrides?: CallOverrides + ): Promise< + [ + [BigNumber, string, string, string, string] & { + id: BigNumber; + name: string; + ipfsHash: string; + url: string; + creator: string; + } + ] + >; + + projectData( + overrides?: CallOverrides + ): Promise< + [ + [BigNumber, BigNumber, string, string] & { + threshold: BigNumber; + deadline: BigNumber; + beneficiary: string; + acceptedToken: string; + } + ] + >; + + "projectData()"( + overrides?: CallOverrides + ): Promise< + [ + [BigNumber, BigNumber, string, string] & { + threshold: BigNumber; + deadline: BigNumber; + beneficiary: string; + acceptedToken: string; + } + ] + >; + + protocolData( + overrides?: CallOverrides + ): Promise<[[number, string] & { fee: number; feeTo: string }]>; + + "protocolData()"( + overrides?: CallOverrides + ): Promise<[[number, string] & { fee: number; feeTo: string }]>; + + setIpfsHash( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setIpfsHash(bytes32)"( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setName( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setName(bytes32)"( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setUrl( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setUrl(bytes32)"( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalCuratorFunding(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalCuratorFunding()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + totalFunding(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalFunding()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + withdrawRemaining(overrides?: CallOverrides): Promise<[BigNumber]>; + + "withdrawRemaining()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + bToken(overrides?: CallOverrides): Promise; + + "bToken()"(overrides?: CallOverrides): Promise; + + back( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "back(uint256)"( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + backersWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "backersWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + beneficiaryWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "beneficiaryWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cToken(overrides?: CallOverrides): Promise; + + "cToken()"(overrides?: CallOverrides): Promise; + + curate( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "curate(uint256)"( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + curatorFee(overrides?: CallOverrides): Promise; + + "curatorFee()"(overrides?: CallOverrides): Promise; + + curatorsWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "curatorsWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + funded(overrides?: CallOverrides): Promise; + + "funded()"(overrides?: CallOverrides): Promise; + + initialize( + _metaData: { + id: BigNumberish; + name: BytesLike; + ipfsHash: BytesLike; + url: BytesLike; + creator: string; + }, + _projectData: { + threshold: BigNumberish; + deadline: BigNumberish; + beneficiary: string; + acceptedToken: string; + }, + _protocolData: { fee: BigNumberish; feeTo: string }, + _curatorFee: BigNumberish, + _bToken: string, + _cToken: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize((uint256,bytes32,bytes32,bytes32,address),(uint256,uint256,address,address),(uint8,address),uint256,address,address)"( + _metaData: { + id: BigNumberish; + name: BytesLike; + ipfsHash: BytesLike; + url: BytesLike; + creator: string; + }, + _projectData: { + threshold: BigNumberish; + deadline: BigNumberish; + beneficiary: string; + acceptedToken: string; + }, + _protocolData: { fee: BigNumberish; feeTo: string }, + _curatorFee: BigNumberish, + _bToken: string, + _cToken: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + lockedWithdraw(overrides?: CallOverrides): Promise; + + "lockedWithdraw()"(overrides?: CallOverrides): Promise; + + metaData( + overrides?: CallOverrides + ): Promise< + [BigNumber, string, string, string, string] & { + id: BigNumber; + name: string; + ipfsHash: string; + url: string; + creator: string; + } + >; + + "metaData()"( + overrides?: CallOverrides + ): Promise< + [BigNumber, string, string, string, string] & { + id: BigNumber; + name: string; + ipfsHash: string; + url: string; + creator: string; + } + >; + + projectData( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, string, string] & { + threshold: BigNumber; + deadline: BigNumber; + beneficiary: string; + acceptedToken: string; + } + >; + + "projectData()"( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, string, string] & { + threshold: BigNumber; + deadline: BigNumber; + beneficiary: string; + acceptedToken: string; + } + >; + + protocolData( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + "protocolData()"( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + setIpfsHash( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setIpfsHash(bytes32)"( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setName( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setName(bytes32)"( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setUrl( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setUrl(bytes32)"( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalCuratorFunding(overrides?: CallOverrides): Promise; + + "totalCuratorFunding()"(overrides?: CallOverrides): Promise; + + totalFunding(overrides?: CallOverrides): Promise; + + "totalFunding()"(overrides?: CallOverrides): Promise; + + withdrawRemaining(overrides?: CallOverrides): Promise; + + "withdrawRemaining()"(overrides?: CallOverrides): Promise; + + callStatic: { + bToken(overrides?: CallOverrides): Promise; + + "bToken()"(overrides?: CallOverrides): Promise; + + back(_amount: BigNumberish, overrides?: CallOverrides): Promise; + + "back(uint256)"( + _amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + backersWithdraw(overrides?: CallOverrides): Promise; + + "backersWithdraw()"(overrides?: CallOverrides): Promise; + + beneficiaryWithdraw(overrides?: CallOverrides): Promise; + + "beneficiaryWithdraw()"(overrides?: CallOverrides): Promise; + + cToken(overrides?: CallOverrides): Promise; + + "cToken()"(overrides?: CallOverrides): Promise; + + curate(_amount: BigNumberish, overrides?: CallOverrides): Promise; + + "curate(uint256)"( + _amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + curatorFee(overrides?: CallOverrides): Promise; + + "curatorFee()"(overrides?: CallOverrides): Promise; + + curatorsWithdraw(overrides?: CallOverrides): Promise; + + "curatorsWithdraw()"(overrides?: CallOverrides): Promise; + + funded(overrides?: CallOverrides): Promise; + + "funded()"(overrides?: CallOverrides): Promise; + + initialize( + _metaData: { + id: BigNumberish; + name: BytesLike; + ipfsHash: BytesLike; + url: BytesLike; + creator: string; + }, + _projectData: { + threshold: BigNumberish; + deadline: BigNumberish; + beneficiary: string; + acceptedToken: string; + }, + _protocolData: { fee: BigNumberish; feeTo: string }, + _curatorFee: BigNumberish, + _bToken: string, + _cToken: string, + overrides?: CallOverrides + ): Promise; + + "initialize((uint256,bytes32,bytes32,bytes32,address),(uint256,uint256,address,address),(uint8,address),uint256,address,address)"( + _metaData: { + id: BigNumberish; + name: BytesLike; + ipfsHash: BytesLike; + url: BytesLike; + creator: string; + }, + _projectData: { + threshold: BigNumberish; + deadline: BigNumberish; + beneficiary: string; + acceptedToken: string; + }, + _protocolData: { fee: BigNumberish; feeTo: string }, + _curatorFee: BigNumberish, + _bToken: string, + _cToken: string, + overrides?: CallOverrides + ): Promise; + + lockedWithdraw(overrides?: CallOverrides): Promise; + + "lockedWithdraw()"(overrides?: CallOverrides): Promise; + + metaData( + overrides?: CallOverrides + ): Promise< + [BigNumber, string, string, string, string] & { + id: BigNumber; + name: string; + ipfsHash: string; + url: string; + creator: string; + } + >; + + "metaData()"( + overrides?: CallOverrides + ): Promise< + [BigNumber, string, string, string, string] & { + id: BigNumber; + name: string; + ipfsHash: string; + url: string; + creator: string; + } + >; + + projectData( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, string, string] & { + threshold: BigNumber; + deadline: BigNumber; + beneficiary: string; + acceptedToken: string; + } + >; + + "projectData()"( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, string, string] & { + threshold: BigNumber; + deadline: BigNumber; + beneficiary: string; + acceptedToken: string; + } + >; + + protocolData( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + "protocolData()"( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + setIpfsHash(_ipfsHash: BytesLike, overrides?: CallOverrides): Promise; + + "setIpfsHash(bytes32)"( + _ipfsHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + setName(_name: BytesLike, overrides?: CallOverrides): Promise; + + "setName(bytes32)"( + _name: BytesLike, + overrides?: CallOverrides + ): Promise; + + setUrl(_url: BytesLike, overrides?: CallOverrides): Promise; + + "setUrl(bytes32)"( + _url: BytesLike, + overrides?: CallOverrides + ): Promise; + + totalCuratorFunding(overrides?: CallOverrides): Promise; + + "totalCuratorFunding()"(overrides?: CallOverrides): Promise; + + totalFunding(overrides?: CallOverrides): Promise; + + "totalFunding()"(overrides?: CallOverrides): Promise; + + withdrawRemaining(overrides?: CallOverrides): Promise; + + "withdrawRemaining()"(overrides?: CallOverrides): Promise; + }; + + filters: { + Back( + sender: string | null, + token: string | null, + amount: null + ): TypedEventFilter< + [string, string, BigNumber], + { sender: string; token: string; amount: BigNumber } + >; + + Curate( + sender: string | null, + token: string | null, + amount: null + ): TypedEventFilter< + [string, string, BigNumber], + { sender: string; token: string; amount: BigNumber } + >; + + Failed(): TypedEventFilter<[], {}>; + + ProjectDataChange( + name: null, + oldData: null, + newData: null + ): TypedEventFilter< + [string, string, string], + { name: string; oldData: string; newData: string } + >; + + Succeeded( + timestamp: null, + amount: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { timestamp: BigNumber; amount: BigNumber } + >; + + Withdraw( + sender: string | null, + token: string | null, + amount: null, + withdrawalType: null + ): TypedEventFilter< + [string, string, BigNumber, string], + { + sender: string; + token: string; + amount: BigNumber; + withdrawalType: string; + } + >; + }; + + estimateGas: { + bToken(overrides?: CallOverrides): Promise; + + "bToken()"(overrides?: CallOverrides): Promise; + + back( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "back(uint256)"( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + backersWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "backersWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + beneficiaryWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "beneficiaryWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cToken(overrides?: CallOverrides): Promise; + + "cToken()"(overrides?: CallOverrides): Promise; + + curate( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "curate(uint256)"( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + curatorFee(overrides?: CallOverrides): Promise; + + "curatorFee()"(overrides?: CallOverrides): Promise; + + curatorsWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "curatorsWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + funded(overrides?: CallOverrides): Promise; + + "funded()"(overrides?: CallOverrides): Promise; + + initialize( + _metaData: { + id: BigNumberish; + name: BytesLike; + ipfsHash: BytesLike; + url: BytesLike; + creator: string; + }, + _projectData: { + threshold: BigNumberish; + deadline: BigNumberish; + beneficiary: string; + acceptedToken: string; + }, + _protocolData: { fee: BigNumberish; feeTo: string }, + _curatorFee: BigNumberish, + _bToken: string, + _cToken: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize((uint256,bytes32,bytes32,bytes32,address),(uint256,uint256,address,address),(uint8,address),uint256,address,address)"( + _metaData: { + id: BigNumberish; + name: BytesLike; + ipfsHash: BytesLike; + url: BytesLike; + creator: string; + }, + _projectData: { + threshold: BigNumberish; + deadline: BigNumberish; + beneficiary: string; + acceptedToken: string; + }, + _protocolData: { fee: BigNumberish; feeTo: string }, + _curatorFee: BigNumberish, + _bToken: string, + _cToken: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + lockedWithdraw(overrides?: CallOverrides): Promise; + + "lockedWithdraw()"(overrides?: CallOverrides): Promise; + + metaData(overrides?: CallOverrides): Promise; + + "metaData()"(overrides?: CallOverrides): Promise; + + projectData(overrides?: CallOverrides): Promise; + + "projectData()"(overrides?: CallOverrides): Promise; + + protocolData(overrides?: CallOverrides): Promise; + + "protocolData()"(overrides?: CallOverrides): Promise; + + setIpfsHash( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setIpfsHash(bytes32)"( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setName( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setName(bytes32)"( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setUrl( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setUrl(bytes32)"( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalCuratorFunding(overrides?: CallOverrides): Promise; + + "totalCuratorFunding()"(overrides?: CallOverrides): Promise; + + totalFunding(overrides?: CallOverrides): Promise; + + "totalFunding()"(overrides?: CallOverrides): Promise; + + withdrawRemaining(overrides?: CallOverrides): Promise; + + "withdrawRemaining()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + bToken(overrides?: CallOverrides): Promise; + + "bToken()"(overrides?: CallOverrides): Promise; + + back( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "back(uint256)"( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + backersWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "backersWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + beneficiaryWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "beneficiaryWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cToken(overrides?: CallOverrides): Promise; + + "cToken()"(overrides?: CallOverrides): Promise; + + curate( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "curate(uint256)"( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + curatorFee(overrides?: CallOverrides): Promise; + + "curatorFee()"(overrides?: CallOverrides): Promise; + + curatorsWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "curatorsWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + funded(overrides?: CallOverrides): Promise; + + "funded()"(overrides?: CallOverrides): Promise; + + initialize( + _metaData: { + id: BigNumberish; + name: BytesLike; + ipfsHash: BytesLike; + url: BytesLike; + creator: string; + }, + _projectData: { + threshold: BigNumberish; + deadline: BigNumberish; + beneficiary: string; + acceptedToken: string; + }, + _protocolData: { fee: BigNumberish; feeTo: string }, + _curatorFee: BigNumberish, + _bToken: string, + _cToken: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize((uint256,bytes32,bytes32,bytes32,address),(uint256,uint256,address,address),(uint8,address),uint256,address,address)"( + _metaData: { + id: BigNumberish; + name: BytesLike; + ipfsHash: BytesLike; + url: BytesLike; + creator: string; + }, + _projectData: { + threshold: BigNumberish; + deadline: BigNumberish; + beneficiary: string; + acceptedToken: string; + }, + _protocolData: { fee: BigNumberish; feeTo: string }, + _curatorFee: BigNumberish, + _bToken: string, + _cToken: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + lockedWithdraw(overrides?: CallOverrides): Promise; + + "lockedWithdraw()"( + overrides?: CallOverrides + ): Promise; + + metaData(overrides?: CallOverrides): Promise; + + "metaData()"(overrides?: CallOverrides): Promise; + + projectData(overrides?: CallOverrides): Promise; + + "projectData()"(overrides?: CallOverrides): Promise; + + protocolData(overrides?: CallOverrides): Promise; + + "protocolData()"(overrides?: CallOverrides): Promise; + + setIpfsHash( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setIpfsHash(bytes32)"( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setName( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setName(bytes32)"( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setUrl( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setUrl(bytes32)"( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalCuratorFunding( + overrides?: CallOverrides + ): Promise; + + "totalCuratorFunding()"( + overrides?: CallOverrides + ): Promise; + + totalFunding(overrides?: CallOverrides): Promise; + + "totalFunding()"(overrides?: CallOverrides): Promise; + + withdrawRemaining(overrides?: CallOverrides): Promise; + + "withdrawRemaining()"( + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ICuratedProjectFactory.d.ts b/packages/chain-events/src/contractTypes/ICuratedProjectFactory.d.ts new file mode 100644 index 00000000000..42d7c4176d1 --- /dev/null +++ b/packages/chain-events/src/contractTypes/ICuratedProjectFactory.d.ts @@ -0,0 +1,775 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ICuratedProjectFactoryInterface extends ethers.utils.Interface { + functions: { + "addAcceptedTokens(address[])": FunctionFragment; + "createProject(bytes32,bytes32,bytes32,address,address,uint256,uint256,uint256)": FunctionFragment; + "isAcceptedToken(address)": FunctionFragment; + "numProjects()": FunctionFragment; + "owner()": FunctionFragment; + "projectImp()": FunctionFragment; + "projects(uint32)": FunctionFragment; + "protocolData()": FunctionFragment; + "setCmnProjTokenImpl(address)": FunctionFragment; + "setFeeTo(address)": FunctionFragment; + "setProjectImpl(address)": FunctionFragment; + "setProtocolFee(uint8)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "addAcceptedTokens", + values: [string[]] + ): string; + encodeFunctionData( + functionFragment: "createProject", + values: [ + BytesLike, + BytesLike, + BytesLike, + string, + string, + BigNumberish, + BigNumberish, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "isAcceptedToken", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "numProjects", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "projectImp", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "projects", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "protocolData", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setCmnProjTokenImpl", + values: [string] + ): string; + encodeFunctionData(functionFragment: "setFeeTo", values: [string]): string; + encodeFunctionData( + functionFragment: "setProjectImpl", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "setProtocolFee", + values: [BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "addAcceptedTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "createProject", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isAcceptedToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "numProjects", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "projectImp", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "projects", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "protocolData", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setCmnProjTokenImpl", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setFeeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setProjectImpl", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setProtocolFee", + data: BytesLike + ): Result; + + events: { + "ProjectCreated(uint256,address)": EventFragment; + "ProjectImplChange(address,address)": EventFragment; + "ProtocolFeeChange(uint8,uint8)": EventFragment; + "ProtocolFeeToChange(address,address)": EventFragment; + "ProtocolTokenImplChange(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProjectCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProjectImplChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProtocolFeeChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProtocolFeeToChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProtocolTokenImplChange"): EventFragment; +} + +export class ICuratedProjectFactory extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ICuratedProjectFactoryInterface; + + functions: { + addAcceptedTokens( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "addAcceptedTokens(address[])"( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + createProject( + _name: BytesLike, + _ipfsHash: BytesLike, + _url: BytesLike, + _beneficiary: string, + _acceptedToken: string, + _threshold: BigNumberish, + _deadline: BigNumberish, + _curatorFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "createProject(bytes32,bytes32,bytes32,address,address,uint256,uint256,uint256)"( + _name: BytesLike, + _ipfsHash: BytesLike, + _url: BytesLike, + _beneficiary: string, + _acceptedToken: string, + _threshold: BigNumberish, + _deadline: BigNumberish, + _curatorFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + isAcceptedToken( + token: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isAcceptedToken(address)"( + token: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + numProjects(overrides?: CallOverrides): Promise<[number]>; + + "numProjects()"(overrides?: CallOverrides): Promise<[number]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + "owner()"(overrides?: CallOverrides): Promise<[string]>; + + projectImp(overrides?: CallOverrides): Promise<[string]>; + + "projectImp()"(overrides?: CallOverrides): Promise<[string]>; + + projects( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + "projects(uint32)"( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + protocolData( + overrides?: CallOverrides + ): Promise<[[number, string] & { fee: number; feeTo: string }]>; + + "protocolData()"( + overrides?: CallOverrides + ): Promise<[[number, string] & { fee: number; feeTo: string }]>; + + setCmnProjTokenImpl( + _cmnProjTokenImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setCmnProjTokenImpl(address)"( + _cmnProjTokenImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setFeeTo( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setFeeTo(address)"( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProjectImpl( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProjectImpl(address)"( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProtocolFee( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProtocolFee(uint8)"( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + addAcceptedTokens( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "addAcceptedTokens(address[])"( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + createProject( + _name: BytesLike, + _ipfsHash: BytesLike, + _url: BytesLike, + _beneficiary: string, + _acceptedToken: string, + _threshold: BigNumberish, + _deadline: BigNumberish, + _curatorFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "createProject(bytes32,bytes32,bytes32,address,address,uint256,uint256,uint256)"( + _name: BytesLike, + _ipfsHash: BytesLike, + _url: BytesLike, + _beneficiary: string, + _acceptedToken: string, + _threshold: BigNumberish, + _deadline: BigNumberish, + _curatorFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + isAcceptedToken(token: string, overrides?: CallOverrides): Promise; + + "isAcceptedToken(address)"( + token: string, + overrides?: CallOverrides + ): Promise; + + numProjects(overrides?: CallOverrides): Promise; + + "numProjects()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + projectImp(overrides?: CallOverrides): Promise; + + "projectImp()"(overrides?: CallOverrides): Promise; + + projects( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "projects(uint32)"( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + protocolData( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + "protocolData()"( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + setCmnProjTokenImpl( + _cmnProjTokenImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setCmnProjTokenImpl(address)"( + _cmnProjTokenImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setFeeTo( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setFeeTo(address)"( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProjectImpl( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProjectImpl(address)"( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProtocolFee( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProtocolFee(uint8)"( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + addAcceptedTokens( + _tokens: string[], + overrides?: CallOverrides + ): Promise; + + "addAcceptedTokens(address[])"( + _tokens: string[], + overrides?: CallOverrides + ): Promise; + + createProject( + _name: BytesLike, + _ipfsHash: BytesLike, + _url: BytesLike, + _beneficiary: string, + _acceptedToken: string, + _threshold: BigNumberish, + _deadline: BigNumberish, + _curatorFee: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "createProject(bytes32,bytes32,bytes32,address,address,uint256,uint256,uint256)"( + _name: BytesLike, + _ipfsHash: BytesLike, + _url: BytesLike, + _beneficiary: string, + _acceptedToken: string, + _threshold: BigNumberish, + _deadline: BigNumberish, + _curatorFee: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isAcceptedToken(token: string, overrides?: CallOverrides): Promise; + + "isAcceptedToken(address)"( + token: string, + overrides?: CallOverrides + ): Promise; + + numProjects(overrides?: CallOverrides): Promise; + + "numProjects()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + projectImp(overrides?: CallOverrides): Promise; + + "projectImp()"(overrides?: CallOverrides): Promise; + + projects( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "projects(uint32)"( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + protocolData( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + "protocolData()"( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + setCmnProjTokenImpl( + _cmnProjTokenImpl: string, + overrides?: CallOverrides + ): Promise; + + "setCmnProjTokenImpl(address)"( + _cmnProjTokenImpl: string, + overrides?: CallOverrides + ): Promise; + + setFeeTo(_feeTo: string, overrides?: CallOverrides): Promise; + + "setFeeTo(address)"( + _feeTo: string, + overrides?: CallOverrides + ): Promise; + + setProjectImpl( + _projectImpl: string, + overrides?: CallOverrides + ): Promise; + + "setProjectImpl(address)"( + _projectImpl: string, + overrides?: CallOverrides + ): Promise; + + setProtocolFee( + _protocolFee: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "setProtocolFee(uint8)"( + _protocolFee: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + ProjectCreated( + projectIndex: null, + projectAddress: null + ): TypedEventFilter< + [BigNumber, string], + { projectIndex: BigNumber; projectAddress: string } + >; + + ProjectImplChange( + oldAddr: null, + newAddr: null + ): TypedEventFilter<[string, string], { oldAddr: string; newAddr: string }>; + + ProtocolFeeChange( + oldFee: null, + newFee: null + ): TypedEventFilter<[number, number], { oldFee: number; newFee: number }>; + + ProtocolFeeToChange( + oldAddr: null, + newAddr: null + ): TypedEventFilter<[string, string], { oldAddr: string; newAddr: string }>; + + ProtocolTokenImplChange( + oldAddr: null, + newAddr: null + ): TypedEventFilter<[string, string], { oldAddr: string; newAddr: string }>; + }; + + estimateGas: { + addAcceptedTokens( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "addAcceptedTokens(address[])"( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + createProject( + _name: BytesLike, + _ipfsHash: BytesLike, + _url: BytesLike, + _beneficiary: string, + _acceptedToken: string, + _threshold: BigNumberish, + _deadline: BigNumberish, + _curatorFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "createProject(bytes32,bytes32,bytes32,address,address,uint256,uint256,uint256)"( + _name: BytesLike, + _ipfsHash: BytesLike, + _url: BytesLike, + _beneficiary: string, + _acceptedToken: string, + _threshold: BigNumberish, + _deadline: BigNumberish, + _curatorFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + isAcceptedToken( + token: string, + overrides?: CallOverrides + ): Promise; + + "isAcceptedToken(address)"( + token: string, + overrides?: CallOverrides + ): Promise; + + numProjects(overrides?: CallOverrides): Promise; + + "numProjects()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + projectImp(overrides?: CallOverrides): Promise; + + "projectImp()"(overrides?: CallOverrides): Promise; + + projects( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "projects(uint32)"( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + protocolData(overrides?: CallOverrides): Promise; + + "protocolData()"(overrides?: CallOverrides): Promise; + + setCmnProjTokenImpl( + _cmnProjTokenImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setCmnProjTokenImpl(address)"( + _cmnProjTokenImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setFeeTo( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setFeeTo(address)"( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProjectImpl( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProjectImpl(address)"( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProtocolFee( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProtocolFee(uint8)"( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + addAcceptedTokens( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "addAcceptedTokens(address[])"( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + createProject( + _name: BytesLike, + _ipfsHash: BytesLike, + _url: BytesLike, + _beneficiary: string, + _acceptedToken: string, + _threshold: BigNumberish, + _deadline: BigNumberish, + _curatorFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "createProject(bytes32,bytes32,bytes32,address,address,uint256,uint256,uint256)"( + _name: BytesLike, + _ipfsHash: BytesLike, + _url: BytesLike, + _beneficiary: string, + _acceptedToken: string, + _threshold: BigNumberish, + _deadline: BigNumberish, + _curatorFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + isAcceptedToken( + token: string, + overrides?: CallOverrides + ): Promise; + + "isAcceptedToken(address)"( + token: string, + overrides?: CallOverrides + ): Promise; + + numProjects(overrides?: CallOverrides): Promise; + + "numProjects()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + projectImp(overrides?: CallOverrides): Promise; + + "projectImp()"(overrides?: CallOverrides): Promise; + + projects( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "projects(uint32)"( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + protocolData(overrides?: CallOverrides): Promise; + + "protocolData()"(overrides?: CallOverrides): Promise; + + setCmnProjTokenImpl( + _cmnProjTokenImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setCmnProjTokenImpl(address)"( + _cmnProjTokenImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setFeeTo( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setFeeTo(address)"( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProjectImpl( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProjectImpl(address)"( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProtocolFee( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProtocolFee(uint8)"( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IERC165.d.ts b/packages/chain-events/src/contractTypes/IERC165.d.ts new file mode 100644 index 00000000000..f0ed2b932e3 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IERC165.d.ts @@ -0,0 +1,141 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IERC165Interface extends ethers.utils.Interface { + functions: { + "supportsInterface(bytes4)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + + events: {}; +} + +export class IERC165 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IERC165Interface; + + functions: { + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + callStatic: { + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IERC1820Registry.d.ts b/packages/chain-events/src/contractTypes/IERC1820Registry.d.ts new file mode 100644 index 00000000000..4e84b84c428 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IERC1820Registry.d.ts @@ -0,0 +1,627 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IERC1820RegistryInterface extends ethers.utils.Interface { + functions: { + "getInterfaceImplementer(address,bytes32)": FunctionFragment; + "getManager(address)": FunctionFragment; + "implementsERC165Interface(address,bytes4)": FunctionFragment; + "implementsERC165InterfaceNoCache(address,bytes4)": FunctionFragment; + "interfaceHash(string)": FunctionFragment; + "setInterfaceImplementer(address,bytes32,address)": FunctionFragment; + "setManager(address,address)": FunctionFragment; + "updateERC165Cache(address,bytes4)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "getInterfaceImplementer", + values: [string, BytesLike] + ): string; + encodeFunctionData(functionFragment: "getManager", values: [string]): string; + encodeFunctionData( + functionFragment: "implementsERC165Interface", + values: [string, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "implementsERC165InterfaceNoCache", + values: [string, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "interfaceHash", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "setInterfaceImplementer", + values: [string, BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "setManager", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "updateERC165Cache", + values: [string, BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "getInterfaceImplementer", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getManager", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "implementsERC165Interface", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "implementsERC165InterfaceNoCache", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "interfaceHash", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setInterfaceImplementer", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setManager", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "updateERC165Cache", + data: BytesLike + ): Result; + + events: { + "InterfaceImplementerSet(address,bytes32,address)": EventFragment; + "ManagerChanged(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "InterfaceImplementerSet"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ManagerChanged"): EventFragment; +} + +export class IERC1820Registry extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IERC1820RegistryInterface; + + functions: { + getInterfaceImplementer( + account: string, + interfaceHash: BytesLike, + overrides?: CallOverrides + ): Promise<[string]>; + + "getInterfaceImplementer(address,bytes32)"( + account: string, + interfaceHash: BytesLike, + overrides?: CallOverrides + ): Promise<[string]>; + + getManager(account: string, overrides?: CallOverrides): Promise<[string]>; + + "getManager(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[string]>; + + implementsERC165Interface( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "implementsERC165Interface(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + implementsERC165InterfaceNoCache( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "implementsERC165InterfaceNoCache(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + interfaceHash( + interfaceName: string, + overrides?: CallOverrides + ): Promise<[string]>; + + "interfaceHash(string)"( + interfaceName: string, + overrides?: CallOverrides + ): Promise<[string]>; + + setInterfaceImplementer( + account: string, + interfaceHash: BytesLike, + implementer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setInterfaceImplementer(address,bytes32,address)"( + account: string, + interfaceHash: BytesLike, + implementer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setManager( + account: string, + newManager: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setManager(address,address)"( + account: string, + newManager: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateERC165Cache( + account: string, + interfaceId: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateERC165Cache(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + getInterfaceImplementer( + account: string, + interfaceHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "getInterfaceImplementer(address,bytes32)"( + account: string, + interfaceHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getManager(account: string, overrides?: CallOverrides): Promise; + + "getManager(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + implementsERC165Interface( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "implementsERC165Interface(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + implementsERC165InterfaceNoCache( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "implementsERC165InterfaceNoCache(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + interfaceHash( + interfaceName: string, + overrides?: CallOverrides + ): Promise; + + "interfaceHash(string)"( + interfaceName: string, + overrides?: CallOverrides + ): Promise; + + setInterfaceImplementer( + account: string, + interfaceHash: BytesLike, + implementer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setInterfaceImplementer(address,bytes32,address)"( + account: string, + interfaceHash: BytesLike, + implementer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setManager( + account: string, + newManager: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setManager(address,address)"( + account: string, + newManager: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateERC165Cache( + account: string, + interfaceId: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateERC165Cache(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + getInterfaceImplementer( + account: string, + interfaceHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "getInterfaceImplementer(address,bytes32)"( + account: string, + interfaceHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getManager(account: string, overrides?: CallOverrides): Promise; + + "getManager(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + implementsERC165Interface( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "implementsERC165Interface(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + implementsERC165InterfaceNoCache( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "implementsERC165InterfaceNoCache(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + interfaceHash( + interfaceName: string, + overrides?: CallOverrides + ): Promise; + + "interfaceHash(string)"( + interfaceName: string, + overrides?: CallOverrides + ): Promise; + + setInterfaceImplementer( + account: string, + interfaceHash: BytesLike, + implementer: string, + overrides?: CallOverrides + ): Promise; + + "setInterfaceImplementer(address,bytes32,address)"( + account: string, + interfaceHash: BytesLike, + implementer: string, + overrides?: CallOverrides + ): Promise; + + setManager( + account: string, + newManager: string, + overrides?: CallOverrides + ): Promise; + + "setManager(address,address)"( + account: string, + newManager: string, + overrides?: CallOverrides + ): Promise; + + updateERC165Cache( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "updateERC165Cache(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + InterfaceImplementerSet( + account: string | null, + interfaceHash: BytesLike | null, + implementer: string | null + ): TypedEventFilter< + [string, string, string], + { account: string; interfaceHash: string; implementer: string } + >; + + ManagerChanged( + account: string | null, + newManager: string | null + ): TypedEventFilter< + [string, string], + { account: string; newManager: string } + >; + }; + + estimateGas: { + getInterfaceImplementer( + account: string, + interfaceHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "getInterfaceImplementer(address,bytes32)"( + account: string, + interfaceHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getManager(account: string, overrides?: CallOverrides): Promise; + + "getManager(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + implementsERC165Interface( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "implementsERC165Interface(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + implementsERC165InterfaceNoCache( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "implementsERC165InterfaceNoCache(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + interfaceHash( + interfaceName: string, + overrides?: CallOverrides + ): Promise; + + "interfaceHash(string)"( + interfaceName: string, + overrides?: CallOverrides + ): Promise; + + setInterfaceImplementer( + account: string, + interfaceHash: BytesLike, + implementer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setInterfaceImplementer(address,bytes32,address)"( + account: string, + interfaceHash: BytesLike, + implementer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setManager( + account: string, + newManager: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setManager(address,address)"( + account: string, + newManager: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateERC165Cache( + account: string, + interfaceId: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateERC165Cache(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + getInterfaceImplementer( + account: string, + interfaceHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "getInterfaceImplementer(address,bytes32)"( + account: string, + interfaceHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getManager( + account: string, + overrides?: CallOverrides + ): Promise; + + "getManager(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + implementsERC165Interface( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "implementsERC165Interface(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + implementsERC165InterfaceNoCache( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "implementsERC165InterfaceNoCache(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + interfaceHash( + interfaceName: string, + overrides?: CallOverrides + ): Promise; + + "interfaceHash(string)"( + interfaceName: string, + overrides?: CallOverrides + ): Promise; + + setInterfaceImplementer( + account: string, + interfaceHash: BytesLike, + implementer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setInterfaceImplementer(address,bytes32,address)"( + account: string, + interfaceHash: BytesLike, + implementer: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setManager( + account: string, + newManager: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setManager(address,address)"( + account: string, + newManager: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + updateERC165Cache( + account: string, + interfaceId: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateERC165Cache(address,bytes4)"( + account: string, + interfaceId: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IERC20.d.ts b/packages/chain-events/src/contractTypes/IERC20.d.ts new file mode 100644 index 00000000000..ad60ebdeccc --- /dev/null +++ b/packages/chain-events/src/contractTypes/IERC20.d.ts @@ -0,0 +1,454 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IERC20Interface extends ethers.utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class IERC20 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IERC20Interface; + + functions: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(who: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + who: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(who: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + who: string, + overrides?: CallOverrides + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(who: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + who: string, + overrides?: CallOverrides + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(who: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + who: string, + overrides?: CallOverrides + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + who: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + who: string, + overrides?: CallOverrides + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IERC20Metadata.d.ts b/packages/chain-events/src/contractTypes/IERC20Metadata.d.ts new file mode 100644 index 00000000000..48279e4ac68 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IERC20Metadata.d.ts @@ -0,0 +1,523 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IERC20MetadataInterface extends ethers.utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decimals()": FunctionFragment; + "name()": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class IERC20Metadata extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IERC20MetadataInterface; + + functions: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + "decimals()"(overrides?: CallOverrides): Promise<[number]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IERC20Permit.d.ts b/packages/chain-events/src/contractTypes/IERC20Permit.d.ts new file mode 100644 index 00000000000..14e1d3da683 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IERC20Permit.d.ts @@ -0,0 +1,279 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IERC20PermitInterface extends ethers.utils.Interface { + functions: { + "DOMAIN_SEPARATOR()": FunctionFragment; + "nonces(address)": FunctionFragment; + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DOMAIN_SEPARATOR", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "permit", + values: [ + string, + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike + ] + ): string; + + decodeFunctionResult( + functionFragment: "DOMAIN_SEPARATOR", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "permit", data: BytesLike): Result; + + events: {}; +} + +export class IERC20Permit extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IERC20PermitInterface; + + functions: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise<[string]>; + + nonces(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"(overrides?: CallOverrides): Promise; + + nonces(owner: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DOMAIN_SEPARATOR(overrides?: CallOverrides): Promise; + + "DOMAIN_SEPARATOR()"( + overrides?: CallOverrides + ): Promise; + + nonces( + owner: string, + overrides?: CallOverrides + ): Promise; + + "nonces(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + permit( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "permit(address,address,uint256,uint256,uint8,bytes32,bytes32)"( + owner: string, + spender: string, + value: BigNumberish, + deadline: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IERC721.d.ts b/packages/chain-events/src/contractTypes/IERC721.d.ts new file mode 100644 index 00000000000..2e9e89cfae3 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IERC721.d.ts @@ -0,0 +1,697 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IERC721Interface extends ethers.utils.Interface { + functions: { + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "getApproved(uint256)": FunctionFragment; + "isApprovedForAll(address,address)": FunctionFragment; + "ownerOf(uint256)": FunctionFragment; + "safeTransferFrom(address,address,uint256)": FunctionFragment; + "setApprovalForAll(address,bool)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "getApproved", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isApprovedForAll", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "ownerOf", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "safeTransferFrom", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setApprovalForAll", + values: [string, boolean] + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getApproved", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isApprovedForAll", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ownerOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "safeTransferFrom", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setApprovalForAll", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "ApprovalForAll(address,address,bool)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ApprovalForAll"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class IERC721 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IERC721Interface; + + functions: { + approve( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + owner: string, + overrides?: CallOverrides + ): Promise<[BigNumber] & { balance: BigNumber }>; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise<[BigNumber] & { balance: BigNumber }>; + + getApproved( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string] & { operator: string }>; + + "getApproved(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string] & { operator: string }>; + + isApprovedForAll( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isApprovedForAll(address,address)"( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ownerOf( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string] & { owner: string }>; + + "ownerOf(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise<[string] & { owner: string }>; + + "safeTransferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "safeTransferFrom(address,address,uint256,bytes)"( + from: string, + to: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setApprovalForAll( + operator: string, + _approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setApprovalForAll(address,bool)"( + operator: string, + _approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + approve( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + getApproved( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getApproved(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + "isApprovedForAll(address,address)"( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + + "ownerOf(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "safeTransferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "safeTransferFrom(address,address,uint256,bytes)"( + from: string, + to: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setApprovalForAll( + operator: string, + _approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setApprovalForAll(address,bool)"( + operator: string, + _approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + approve( + to: string, + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + to: string, + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + getApproved( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getApproved(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + "isApprovedForAll(address,address)"( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + ownerOf(tokenId: BigNumberish, overrides?: CallOverrides): Promise; + + "ownerOf(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "safeTransferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "safeTransferFrom(address,address,uint256,bytes)"( + from: string, + to: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + setApprovalForAll( + operator: string, + _approved: boolean, + overrides?: CallOverrides + ): Promise; + + "setApprovalForAll(address,bool)"( + operator: string, + _approved: boolean, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + approved: string | null, + tokenId: BigNumberish | null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; approved: string; tokenId: BigNumber } + >; + + ApprovalForAll( + owner: string | null, + operator: string | null, + approved: null + ): TypedEventFilter< + [string, string, boolean], + { owner: string; operator: string; approved: boolean } + >; + + Transfer( + from: string | null, + to: string | null, + tokenId: BigNumberish | null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; tokenId: BigNumber } + >; + }; + + estimateGas: { + approve( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + getApproved( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getApproved(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + "isApprovedForAll(address,address)"( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + ownerOf( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "ownerOf(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "safeTransferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "safeTransferFrom(address,address,uint256,bytes)"( + from: string, + to: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setApprovalForAll( + operator: string, + _approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setApprovalForAll(address,bool)"( + operator: string, + _approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + approve( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + owner: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + getApproved( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getApproved(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isApprovedForAll( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + "isApprovedForAll(address,address)"( + owner: string, + operator: string, + overrides?: CallOverrides + ): Promise; + + ownerOf( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "ownerOf(uint256)"( + tokenId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "safeTransferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "safeTransferFrom(address,address,uint256,bytes)"( + from: string, + to: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setApprovalForAll( + operator: string, + _approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setApprovalForAll(address,bool)"( + operator: string, + _approved: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + tokenId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IERC721Receiver.d.ts b/packages/chain-events/src/contractTypes/IERC721Receiver.d.ts new file mode 100644 index 00000000000..6f4f72e0f66 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IERC721Receiver.d.ts @@ -0,0 +1,172 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IERC721ReceiverInterface extends ethers.utils.Interface { + functions: { + "onERC721Received(address,address,uint256,bytes)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "onERC721Received", + values: [string, string, BigNumberish, BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "onERC721Received", + data: BytesLike + ): Result; + + events: {}; +} + +export class IERC721Receiver extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IERC721ReceiverInterface; + + functions: { + onERC721Received( + operator: string, + from: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "onERC721Received(address,address,uint256,bytes)"( + operator: string, + from: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + onERC721Received( + operator: string, + from: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "onERC721Received(address,address,uint256,bytes)"( + operator: string, + from: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + onERC721Received( + operator: string, + from: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + "onERC721Received(address,address,uint256,bytes)"( + operator: string, + from: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + onERC721Received( + operator: string, + from: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "onERC721Received(address,address,uint256,bytes)"( + operator: string, + from: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + onERC721Received( + operator: string, + from: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "onERC721Received(address,address,uint256,bytes)"( + operator: string, + from: string, + tokenId: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IERC777.d.ts b/packages/chain-events/src/contractTypes/IERC777.d.ts new file mode 100644 index 00000000000..ce70a41d721 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IERC777.d.ts @@ -0,0 +1,854 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IERC777Interface extends ethers.utils.Interface { + functions: { + "authorizeOperator(address)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "burn(uint256,bytes)": FunctionFragment; + "defaultOperators()": FunctionFragment; + "granularity()": FunctionFragment; + "isOperatorFor(address,address)": FunctionFragment; + "name()": FunctionFragment; + "operatorBurn(address,uint256,bytes,bytes)": FunctionFragment; + "operatorSend(address,address,uint256,bytes,bytes)": FunctionFragment; + "revokeOperator(address)": FunctionFragment; + "send(address,uint256,bytes)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "authorizeOperator", + values: [string] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "burn", + values: [BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "defaultOperators", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "granularity", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isOperatorFor", + values: [string, string] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "operatorBurn", + values: [string, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "operatorSend", + values: [string, string, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "revokeOperator", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "send", + values: [string, BigNumberish, BytesLike] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "authorizeOperator", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "burn", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "defaultOperators", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "granularity", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isOperatorFor", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "operatorBurn", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "operatorSend", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "revokeOperator", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "send", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + + events: { + "AuthorizedOperator(address,address)": EventFragment; + "Burned(address,address,uint256,bytes,bytes)": EventFragment; + "Minted(address,address,uint256,bytes,bytes)": EventFragment; + "RevokedOperator(address,address)": EventFragment; + "Sent(address,address,address,uint256,bytes,bytes)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AuthorizedOperator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Burned"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Minted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RevokedOperator"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Sent"): EventFragment; +} + +export class IERC777 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IERC777Interface; + + functions: { + authorizeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + burn( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(uint256,bytes)"( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + defaultOperators(overrides?: CallOverrides): Promise<[string[]]>; + + "defaultOperators()"(overrides?: CallOverrides): Promise<[string[]]>; + + granularity(overrides?: CallOverrides): Promise<[BigNumber]>; + + "granularity()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + isOperatorFor( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isOperatorFor(address,address)"( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + operatorBurn( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorBurn(address,uint256,bytes,bytes)"( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + operatorSend( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorSend(address,address,uint256,bytes,bytes)"( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "send(address,uint256,bytes)"( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + authorizeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + burn( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(uint256,bytes)"( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + defaultOperators(overrides?: CallOverrides): Promise; + + "defaultOperators()"(overrides?: CallOverrides): Promise; + + granularity(overrides?: CallOverrides): Promise; + + "granularity()"(overrides?: CallOverrides): Promise; + + isOperatorFor( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + "isOperatorFor(address,address)"( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + operatorBurn( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorBurn(address,uint256,bytes,bytes)"( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + operatorSend( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorSend(address,address,uint256,bytes,bytes)"( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "send(address,uint256,bytes)"( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + callStatic: { + authorizeOperator( + operator: string, + overrides?: CallOverrides + ): Promise; + + "authorizeOperator(address)"( + operator: string, + overrides?: CallOverrides + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + burn( + amount: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + "burn(uint256,bytes)"( + amount: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + defaultOperators(overrides?: CallOverrides): Promise; + + "defaultOperators()"(overrides?: CallOverrides): Promise; + + granularity(overrides?: CallOverrides): Promise; + + "granularity()"(overrides?: CallOverrides): Promise; + + isOperatorFor( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + "isOperatorFor(address,address)"( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + operatorBurn( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: CallOverrides + ): Promise; + + "operatorBurn(address,uint256,bytes,bytes)"( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: CallOverrides + ): Promise; + + operatorSend( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: CallOverrides + ): Promise; + + "operatorSend(address,address,uint256,bytes,bytes)"( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: CallOverrides + ): Promise; + + revokeOperator(operator: string, overrides?: CallOverrides): Promise; + + "revokeOperator(address)"( + operator: string, + overrides?: CallOverrides + ): Promise; + + send( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + "send(address,uint256,bytes)"( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + }; + + filters: { + AuthorizedOperator( + operator: string | null, + tokenHolder: string | null + ): TypedEventFilter< + [string, string], + { operator: string; tokenHolder: string } + >; + + Burned( + operator: string | null, + from: string | null, + amount: null, + data: null, + operatorData: null + ): TypedEventFilter< + [string, string, BigNumber, string, string], + { + operator: string; + from: string; + amount: BigNumber; + data: string; + operatorData: string; + } + >; + + Minted( + operator: string | null, + to: string | null, + amount: null, + data: null, + operatorData: null + ): TypedEventFilter< + [string, string, BigNumber, string, string], + { + operator: string; + to: string; + amount: BigNumber; + data: string; + operatorData: string; + } + >; + + RevokedOperator( + operator: string | null, + tokenHolder: string | null + ): TypedEventFilter< + [string, string], + { operator: string; tokenHolder: string } + >; + + Sent( + operator: string | null, + from: string | null, + to: string | null, + amount: null, + data: null, + operatorData: null + ): TypedEventFilter< + [string, string, string, BigNumber, string, string], + { + operator: string; + from: string; + to: string; + amount: BigNumber; + data: string; + operatorData: string; + } + >; + }; + + estimateGas: { + authorizeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + burn( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(uint256,bytes)"( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + defaultOperators(overrides?: CallOverrides): Promise; + + "defaultOperators()"(overrides?: CallOverrides): Promise; + + granularity(overrides?: CallOverrides): Promise; + + "granularity()"(overrides?: CallOverrides): Promise; + + isOperatorFor( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + "isOperatorFor(address,address)"( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + operatorBurn( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorBurn(address,uint256,bytes,bytes)"( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + operatorSend( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorSend(address,address,uint256,bytes,bytes)"( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "send(address,uint256,bytes)"( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + authorizeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "authorizeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + owner: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + burn( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "burn(uint256,bytes)"( + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + defaultOperators(overrides?: CallOverrides): Promise; + + "defaultOperators()"( + overrides?: CallOverrides + ): Promise; + + granularity(overrides?: CallOverrides): Promise; + + "granularity()"(overrides?: CallOverrides): Promise; + + isOperatorFor( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + "isOperatorFor(address,address)"( + operator: string, + tokenHolder: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + operatorBurn( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorBurn(address,uint256,bytes,bytes)"( + account: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + operatorSend( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "operatorSend(address,address,uint256,bytes,bytes)"( + sender: string, + recipient: string, + amount: BigNumberish, + data: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeOperator( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeOperator(address)"( + operator: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + send( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "send(address,uint256,bytes)"( + recipient: string, + amount: BigNumberish, + data: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IERC777Recipient.d.ts b/packages/chain-events/src/contractTypes/IERC777Recipient.d.ts new file mode 100644 index 00000000000..ec9cb74ea11 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IERC777Recipient.d.ts @@ -0,0 +1,192 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IERC777RecipientInterface extends ethers.utils.Interface { + functions: { + "tokensReceived(address,address,address,uint256,bytes,bytes)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "tokensReceived", + values: [string, string, string, BigNumberish, BytesLike, BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "tokensReceived", + data: BytesLike + ): Result; + + events: {}; +} + +export class IERC777Recipient extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IERC777RecipientInterface; + + functions: { + tokensReceived( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "tokensReceived(address,address,address,uint256,bytes,bytes)"( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + tokensReceived( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "tokensReceived(address,address,address,uint256,bytes,bytes)"( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + tokensReceived( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: CallOverrides + ): Promise; + + "tokensReceived(address,address,address,uint256,bytes,bytes)"( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + tokensReceived( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "tokensReceived(address,address,address,uint256,bytes,bytes)"( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + tokensReceived( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "tokensReceived(address,address,address,uint256,bytes,bytes)"( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IERC777Sender.d.ts b/packages/chain-events/src/contractTypes/IERC777Sender.d.ts new file mode 100644 index 00000000000..f8c7ba18dce --- /dev/null +++ b/packages/chain-events/src/contractTypes/IERC777Sender.d.ts @@ -0,0 +1,192 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IERC777SenderInterface extends ethers.utils.Interface { + functions: { + "tokensToSend(address,address,address,uint256,bytes,bytes)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "tokensToSend", + values: [string, string, string, BigNumberish, BytesLike, BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "tokensToSend", + data: BytesLike + ): Result; + + events: {}; +} + +export class IERC777Sender extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IERC777SenderInterface; + + functions: { + tokensToSend( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "tokensToSend(address,address,address,uint256,bytes,bytes)"( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + tokensToSend( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "tokensToSend(address,address,address,uint256,bytes,bytes)"( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + tokensToSend( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: CallOverrides + ): Promise; + + "tokensToSend(address,address,address,uint256,bytes,bytes)"( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + tokensToSend( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "tokensToSend(address,address,address,uint256,bytes,bytes)"( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + tokensToSend( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "tokensToSend(address,address,address,uint256,bytes,bytes)"( + operator: string, + from: string, + to: string, + amount: BigNumberish, + userData: BytesLike, + operatorData: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IExecutorWithTimelock.d.ts b/packages/chain-events/src/contractTypes/IExecutorWithTimelock.d.ts new file mode 100644 index 00000000000..52d33a85732 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IExecutorWithTimelock.d.ts @@ -0,0 +1,790 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IExecutorWithTimelockInterface extends ethers.utils.Interface { + functions: { + "GRACE_PERIOD()": FunctionFragment; + "MAXIMUM_DELAY()": FunctionFragment; + "MINIMUM_DELAY()": FunctionFragment; + "cancelTransaction(address,uint256,string,bytes,uint256,bool)": FunctionFragment; + "executeTransaction(address,uint256,string,bytes,uint256,bool)": FunctionFragment; + "getAdmin()": FunctionFragment; + "getDelay()": FunctionFragment; + "getPendingAdmin()": FunctionFragment; + "isActionQueued(bytes32)": FunctionFragment; + "isProposalOverGracePeriod(address,uint256)": FunctionFragment; + "queueTransaction(address,uint256,string,bytes,uint256,bool)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "GRACE_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAXIMUM_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MINIMUM_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "cancelTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish, boolean] + ): string; + encodeFunctionData( + functionFragment: "executeTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish, boolean] + ): string; + encodeFunctionData(functionFragment: "getAdmin", values?: undefined): string; + encodeFunctionData(functionFragment: "getDelay", values?: undefined): string; + encodeFunctionData( + functionFragment: "getPendingAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isActionQueued", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "isProposalOverGracePeriod", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "queueTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish, boolean] + ): string; + + decodeFunctionResult( + functionFragment: "GRACE_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAXIMUM_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MINIMUM_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "cancelTransaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeTransaction", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getAdmin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getDelay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isActionQueued", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isProposalOverGracePeriod", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "queueTransaction", + data: BytesLike + ): Result; + + events: { + "CancelledAction(bytes32,address,uint256,string,bytes,uint256,bool)": EventFragment; + "ExecutedAction(bytes32,address,uint256,string,bytes,uint256,bool,bytes)": EventFragment; + "NewAdmin(address)": EventFragment; + "NewDelay(uint256)": EventFragment; + "NewPendingAdmin(address)": EventFragment; + "QueuedAction(bytes32,address,uint256,string,bytes,uint256,bool)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "CancelledAction"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecutedAction"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewDelay"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewPendingAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "QueuedAction"): EventFragment; +} + +export class IExecutorWithTimelock extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IExecutorWithTimelockInterface; + + functions: { + GRACE_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise<[string]>; + + "getAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + getDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "getDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getPendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + "getPendingAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise; + + "getAdmin()"(overrides?: CallOverrides): Promise; + + getDelay(overrides?: CallOverrides): Promise; + + "getDelay()"(overrides?: CallOverrides): Promise; + + getPendingAdmin(overrides?: CallOverrides): Promise; + + "getPendingAdmin()"(overrides?: CallOverrides): Promise; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise; + + "getAdmin()"(overrides?: CallOverrides): Promise; + + getDelay(overrides?: CallOverrides): Promise; + + "getDelay()"(overrides?: CallOverrides): Promise; + + getPendingAdmin(overrides?: CallOverrides): Promise; + + "getPendingAdmin()"(overrides?: CallOverrides): Promise; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + CancelledAction( + actionHash: null, + target: string | null, + value: null, + signature: null, + data: null, + executionTime: null, + withDelegatecall: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber, boolean], + { + actionHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + executionTime: BigNumber; + withDelegatecall: boolean; + } + >; + + ExecutedAction( + actionHash: null, + target: string | null, + value: null, + signature: null, + data: null, + executionTime: null, + withDelegatecall: null, + resultData: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber, boolean, string], + { + actionHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + executionTime: BigNumber; + withDelegatecall: boolean; + resultData: string; + } + >; + + NewAdmin(newAdmin: null): TypedEventFilter<[string], { newAdmin: string }>; + + NewDelay(delay: null): TypedEventFilter<[BigNumber], { delay: BigNumber }>; + + NewPendingAdmin( + newPendingAdmin: null + ): TypedEventFilter<[string], { newPendingAdmin: string }>; + + QueuedAction( + actionHash: null, + target: string | null, + value: null, + signature: null, + data: null, + executionTime: null, + withDelegatecall: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber, boolean], + { + actionHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + executionTime: BigNumber; + withDelegatecall: boolean; + } + >; + }; + + estimateGas: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise; + + "getAdmin()"(overrides?: CallOverrides): Promise; + + getDelay(overrides?: CallOverrides): Promise; + + "getDelay()"(overrides?: CallOverrides): Promise; + + getPendingAdmin(overrides?: CallOverrides): Promise; + + "getPendingAdmin()"(overrides?: CallOverrides): Promise; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getAdmin(overrides?: CallOverrides): Promise; + + "getAdmin()"(overrides?: CallOverrides): Promise; + + getDelay(overrides?: CallOverrides): Promise; + + "getDelay()"(overrides?: CallOverrides): Promise; + + getPendingAdmin(overrides?: CallOverrides): Promise; + + "getPendingAdmin()"( + overrides?: CallOverrides + ): Promise; + + isActionQueued( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isActionQueued(bytes32)"( + actionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + isProposalOverGracePeriod( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalOverGracePeriod(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256,bool)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + executionTime: BigNumberish, + withDelegatecall: boolean, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IGovernancePowerDelegationToken.d.ts b/packages/chain-events/src/contractTypes/IGovernancePowerDelegationToken.d.ts new file mode 100644 index 00000000000..17525f58b4b --- /dev/null +++ b/packages/chain-events/src/contractTypes/IGovernancePowerDelegationToken.d.ts @@ -0,0 +1,162 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IGovernancePowerDelegationTokenInterface + extends ethers.utils.Interface { + functions: { + "getPowerAtBlock(address,uint256,uint8)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "getPowerAtBlock", + values: [string, BigNumberish, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "getPowerAtBlock", + data: BytesLike + ): Result; + + events: {}; +} + +export class IGovernancePowerDelegationToken extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IGovernancePowerDelegationTokenInterface; + + functions: { + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + }; + + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + callStatic: { + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + getPowerAtBlock( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPowerAtBlock(address,uint256,uint8)"( + user: string, + blockNumber: BigNumberish, + delegationType: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IGovernanceStrategy.d.ts b/packages/chain-events/src/contractTypes/IGovernanceStrategy.d.ts new file mode 100644 index 00000000000..1f5e2b48196 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IGovernanceStrategy.d.ts @@ -0,0 +1,338 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IGovernanceStrategyInterface extends ethers.utils.Interface { + functions: { + "getPropositionPowerAt(address,uint256)": FunctionFragment; + "getTotalPropositionSupplyAt(uint256)": FunctionFragment; + "getTotalVotingSupplyAt(uint256)": FunctionFragment; + "getVotingPowerAt(address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "getPropositionPowerAt", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getTotalPropositionSupplyAt", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getTotalVotingSupplyAt", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getVotingPowerAt", + values: [string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "getPropositionPowerAt", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTotalPropositionSupplyAt", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTotalVotingSupplyAt", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVotingPowerAt", + data: BytesLike + ): Result; + + events: {}; +} + +export class IGovernanceStrategy extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IGovernanceStrategyInterface; + + functions: { + getPropositionPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPropositionPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getTotalPropositionSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getTotalPropositionSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getTotalVotingSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getTotalVotingSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + }; + + getPropositionPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPropositionPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalPropositionSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalPropositionSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalVotingSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalVotingSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + callStatic: { + getPropositionPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPropositionPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalPropositionSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalPropositionSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalVotingSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalVotingSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + getPropositionPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPropositionPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalPropositionSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalPropositionSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalVotingSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalVotingSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + getPropositionPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPropositionPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalPropositionSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalPropositionSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getTotalVotingSupplyAt( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getTotalVotingSupplyAt(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IGovernor.d.ts b/packages/chain-events/src/contractTypes/IGovernor.d.ts new file mode 100644 index 00000000000..ebffab14676 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IGovernor.d.ts @@ -0,0 +1,1204 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IGovernorInterface extends ethers.utils.Interface { + functions: { + "COUNTING_MODE()": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class IGovernor extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IGovernorInterface; + + functions: { + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IGovernorCompatibilityBravo.d.ts b/packages/chain-events/src/contractTypes/IGovernorCompatibilityBravo.d.ts new file mode 100644 index 00000000000..b99f18bb0a4 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IGovernorCompatibilityBravo.d.ts @@ -0,0 +1,1761 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IGovernorCompatibilityBravoInterface extends ethers.utils.Interface { + functions: { + "COUNTING_MODE()": FunctionFragment; + "cancel(uint256)": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getActions(uint256)": FunctionFragment; + "getReceipt(uint256,address)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "proposalThreshold()": FunctionFragment; + "proposals(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "queue(uint256)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "quorumVotes()": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "cancel", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getActions", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getReceipt", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalThreshold", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposals", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData(functionFragment: "queue", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "quorumVotes", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getActions", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getReceipt", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalThreshold", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "proposals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "quorumVotes", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class IGovernorCompatibilityBravo extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IGovernorCompatibilityBravoInterface; + + functions: { + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + ] + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [ + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + ] + >; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalThreshold(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalThreshold()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + quorumVotes(overrides?: CallOverrides): Promise<[BigNumber]>; + + "quorumVotes()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + cancel(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise< + [string[], BigNumber[], string[], string[]] & { + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + } + >; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise< + [boolean, number, BigNumber] & { + hasVoted: boolean; + support: number; + votes: BigNumber; + } + >; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean + ] & { + id: BigNumber; + proposer: string; + eta: BigNumber; + startBlock: BigNumber; + endBlock: BigNumber; + forVotes: BigNumber; + againstVotes: BigNumber; + abstainVotes: BigNumber; + canceled: boolean; + executed: boolean; + } + >; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + queue(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"(overrides?: CallOverrides): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + cancel( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(uint256)"( + proposalId: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getActions( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getActions(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getReceipt( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + "getReceipt(uint256,address)"( + proposalId: BigNumberish, + voter: string, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalThreshold(overrides?: CallOverrides): Promise; + + "proposalThreshold()"( + overrides?: CallOverrides + ): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],string[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + signatures: string[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + quorumVotes(overrides?: CallOverrides): Promise; + + "quorumVotes()"(overrides?: CallOverrides): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IGovernorTimelock.d.ts b/packages/chain-events/src/contractTypes/IGovernorTimelock.d.ts new file mode 100644 index 00000000000..cb551bea0cf --- /dev/null +++ b/packages/chain-events/src/contractTypes/IGovernorTimelock.d.ts @@ -0,0 +1,1382 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IGovernorTimelockInterface extends ethers.utils.Interface { + functions: { + "COUNTING_MODE()": FunctionFragment; + "castVote(uint256,uint8)": FunctionFragment; + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)": FunctionFragment; + "castVoteWithReason(uint256,uint8,string)": FunctionFragment; + "execute(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "getVotes(address,uint256)": FunctionFragment; + "hasVoted(uint256,address)": FunctionFragment; + "hashProposal(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "name()": FunctionFragment; + "proposalDeadline(uint256)": FunctionFragment; + "proposalEta(uint256)": FunctionFragment; + "proposalSnapshot(uint256)": FunctionFragment; + "propose(address[],uint256[],bytes[],string)": FunctionFragment; + "queue(address[],uint256[],bytes[],bytes32)": FunctionFragment; + "quorum(uint256)": FunctionFragment; + "state(uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "timelock()": FunctionFragment; + "version()": FunctionFragment; + "votingDelay()": FunctionFragment; + "votingPeriod()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "COUNTING_MODE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "castVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "castVoteBySig", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "castVoteWithReason", + values: [BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "execute", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "hasVoted", + values: [BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "hashProposal", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData( + functionFragment: "proposalDeadline", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalEta", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposalSnapshot", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "propose", + values: [string[], BigNumberish[], BytesLike[], string] + ): string; + encodeFunctionData( + functionFragment: "queue", + values: [string[], BigNumberish[], BytesLike[], BytesLike] + ): string; + encodeFunctionData( + functionFragment: "quorum", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "state", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "timelock", values?: undefined): string; + encodeFunctionData(functionFragment: "version", values?: undefined): string; + encodeFunctionData( + functionFragment: "votingDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "votingPeriod", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "COUNTING_MODE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "castVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "castVoteBySig", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "castVoteWithReason", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "getVotes", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasVoted", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposalDeadline", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalEta", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalSnapshot", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "propose", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "queue", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "state", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "timelock", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "version", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "votingDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriod", + data: BytesLike + ): Result; + + events: { + "ProposalCanceled(uint256)": EventFragment; + "ProposalCreated(uint256,address,address[],uint256[],string[],bytes[],uint256,uint256,string)": EventFragment; + "ProposalExecuted(uint256)": EventFragment; + "ProposalQueued(uint256,uint256)": EventFragment; + "VoteCast(address,uint256,uint8,uint256,string)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProposalCanceled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProposalQueued"): EventFragment; + getEvent(nameOrSignatureOrTopic: "VoteCast"): EventFragment; +} + +export class IGovernorTimelock extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IGovernorTimelockInterface; + + functions: { + COUNTING_MODE(overrides?: CallOverrides): Promise<[string]>; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise<[string]>; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + timelock(overrides?: CallOverrides): Promise<[string]>; + + "timelock()"(overrides?: CallOverrides): Promise<[string]>; + + version(overrides?: CallOverrides): Promise<[string]>; + + "version()"(overrides?: CallOverrides): Promise<[string]>; + + votingDelay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingDelay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + votingPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + + callStatic: { + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: CallOverrides + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: CallOverrides + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: CallOverrides + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: CallOverrides + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state(proposalId: BigNumberish, overrides?: CallOverrides): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + filters: { + ProposalCanceled( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalCreated( + proposalId: null, + proposer: null, + targets: null, + values: null, + signatures: null, + calldatas: null, + startBlock: null, + endBlock: null, + description: null + ): TypedEventFilter< + [ + BigNumber, + string, + string[], + BigNumber[], + string[], + string[], + BigNumber, + BigNumber, + string + ], + { + proposalId: BigNumber; + proposer: string; + targets: string[]; + values: BigNumber[]; + signatures: string[]; + calldatas: string[]; + startBlock: BigNumber; + endBlock: BigNumber; + description: string; + } + >; + + ProposalExecuted( + proposalId: null + ): TypedEventFilter<[BigNumber], { proposalId: BigNumber }>; + + ProposalQueued( + proposalId: null, + eta: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { proposalId: BigNumber; eta: BigNumber } + >; + + VoteCast( + voter: string | null, + proposalId: null, + support: null, + weight: null, + reason: null + ): TypedEventFilter< + [string, BigNumber, number, BigNumber, string], + { + voter: string; + proposalId: BigNumber; + support: number; + weight: BigNumber; + reason: string; + } + >; + }; + + estimateGas: { + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + COUNTING_MODE(overrides?: CallOverrides): Promise; + + "COUNTING_MODE()"(overrides?: CallOverrides): Promise; + + castVote( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVote(uint256,uint8)"( + proposalId: BigNumberish, + support: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteBySig( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteBySig(uint256,uint8,uint8,bytes32,bytes32)"( + proposalId: BigNumberish, + support: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + castVoteWithReason( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "castVoteWithReason(uint256,uint8,string)"( + proposalId: BigNumberish, + support: BigNumberish, + reason: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + hasVoted( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasVoted(uint256,address)"( + proposalId: BigNumberish, + account: string, + overrides?: CallOverrides + ): Promise; + + hashProposal( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashProposal(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + proposalDeadline( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalDeadline(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalEta( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalEta(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposalSnapshot( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalSnapshot(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + propose( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "propose(address[],uint256[],bytes[],string)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + description: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queue( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queue(address[],uint256[],bytes[],bytes32)"( + targets: string[], + values: BigNumberish[], + calldatas: BytesLike[], + descriptionHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + quorum( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "quorum(uint256)"( + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + state( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "state(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + timelock(overrides?: CallOverrides): Promise; + + "timelock()"(overrides?: CallOverrides): Promise; + + version(overrides?: CallOverrides): Promise; + + "version()"(overrides?: CallOverrides): Promise; + + votingDelay(overrides?: CallOverrides): Promise; + + "votingDelay()"(overrides?: CallOverrides): Promise; + + votingPeriod(overrides?: CallOverrides): Promise; + + "votingPeriod()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IProjectBase.d.ts b/packages/chain-events/src/contractTypes/IProjectBase.d.ts new file mode 100644 index 00000000000..9a4ea34083b --- /dev/null +++ b/packages/chain-events/src/contractTypes/IProjectBase.d.ts @@ -0,0 +1,732 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IProjectBaseInterface extends ethers.utils.Interface { + functions: { + "back(uint256)": FunctionFragment; + "backersWithdraw()": FunctionFragment; + "beneficiaryWithdraw()": FunctionFragment; + "funded()": FunctionFragment; + "lockedWithdraw()": FunctionFragment; + "metaData()": FunctionFragment; + "projectData()": FunctionFragment; + "protocolData()": FunctionFragment; + "setIpfsHash(bytes32)": FunctionFragment; + "setName(bytes32)": FunctionFragment; + "setUrl(bytes32)": FunctionFragment; + "totalFunding()": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "back", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "backersWithdraw", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "beneficiaryWithdraw", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "funded", values?: undefined): string; + encodeFunctionData( + functionFragment: "lockedWithdraw", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "metaData", values?: undefined): string; + encodeFunctionData( + functionFragment: "projectData", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "protocolData", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setIpfsHash", + values: [BytesLike] + ): string; + encodeFunctionData(functionFragment: "setName", values: [BytesLike]): string; + encodeFunctionData(functionFragment: "setUrl", values: [BytesLike]): string; + encodeFunctionData( + functionFragment: "totalFunding", + values?: undefined + ): string; + + decodeFunctionResult(functionFragment: "back", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "backersWithdraw", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "beneficiaryWithdraw", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "funded", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "lockedWithdraw", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "metaData", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "projectData", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "protocolData", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setIpfsHash", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setName", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "setUrl", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalFunding", + data: BytesLike + ): Result; + + events: { + "Back(address,address,uint256)": EventFragment; + "Failed()": EventFragment; + "ProjectDataChange(bytes32,bytes32,bytes32)": EventFragment; + "Succeeded(uint256,uint256)": EventFragment; + "Withdraw(address,address,uint256,bytes32)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Back"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Failed"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProjectDataChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Succeeded"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Withdraw"): EventFragment; +} + +export class IProjectBase extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IProjectBaseInterface; + + functions: { + back( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "back(uint256)"( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + backersWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "backersWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + beneficiaryWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "beneficiaryWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + funded(overrides?: CallOverrides): Promise<[boolean]>; + + "funded()"(overrides?: CallOverrides): Promise<[boolean]>; + + lockedWithdraw(overrides?: CallOverrides): Promise<[boolean]>; + + "lockedWithdraw()"(overrides?: CallOverrides): Promise<[boolean]>; + + metaData( + overrides?: CallOverrides + ): Promise< + [ + [BigNumber, string, string, string, string] & { + id: BigNumber; + name: string; + ipfsHash: string; + url: string; + creator: string; + } + ] + >; + + "metaData()"( + overrides?: CallOverrides + ): Promise< + [ + [BigNumber, string, string, string, string] & { + id: BigNumber; + name: string; + ipfsHash: string; + url: string; + creator: string; + } + ] + >; + + projectData( + overrides?: CallOverrides + ): Promise< + [ + [BigNumber, BigNumber, string, string] & { + threshold: BigNumber; + deadline: BigNumber; + beneficiary: string; + acceptedToken: string; + } + ] + >; + + "projectData()"( + overrides?: CallOverrides + ): Promise< + [ + [BigNumber, BigNumber, string, string] & { + threshold: BigNumber; + deadline: BigNumber; + beneficiary: string; + acceptedToken: string; + } + ] + >; + + protocolData( + overrides?: CallOverrides + ): Promise<[[number, string] & { fee: number; feeTo: string }]>; + + "protocolData()"( + overrides?: CallOverrides + ): Promise<[[number, string] & { fee: number; feeTo: string }]>; + + setIpfsHash( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setIpfsHash(bytes32)"( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setName( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setName(bytes32)"( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setUrl( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setUrl(bytes32)"( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalFunding(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalFunding()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + back( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "back(uint256)"( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + backersWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "backersWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + beneficiaryWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "beneficiaryWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + funded(overrides?: CallOverrides): Promise; + + "funded()"(overrides?: CallOverrides): Promise; + + lockedWithdraw(overrides?: CallOverrides): Promise; + + "lockedWithdraw()"(overrides?: CallOverrides): Promise; + + metaData( + overrides?: CallOverrides + ): Promise< + [BigNumber, string, string, string, string] & { + id: BigNumber; + name: string; + ipfsHash: string; + url: string; + creator: string; + } + >; + + "metaData()"( + overrides?: CallOverrides + ): Promise< + [BigNumber, string, string, string, string] & { + id: BigNumber; + name: string; + ipfsHash: string; + url: string; + creator: string; + } + >; + + projectData( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, string, string] & { + threshold: BigNumber; + deadline: BigNumber; + beneficiary: string; + acceptedToken: string; + } + >; + + "projectData()"( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, string, string] & { + threshold: BigNumber; + deadline: BigNumber; + beneficiary: string; + acceptedToken: string; + } + >; + + protocolData( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + "protocolData()"( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + setIpfsHash( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setIpfsHash(bytes32)"( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setName( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setName(bytes32)"( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setUrl( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setUrl(bytes32)"( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalFunding(overrides?: CallOverrides): Promise; + + "totalFunding()"(overrides?: CallOverrides): Promise; + + callStatic: { + back(_amount: BigNumberish, overrides?: CallOverrides): Promise; + + "back(uint256)"( + _amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + backersWithdraw(overrides?: CallOverrides): Promise; + + "backersWithdraw()"(overrides?: CallOverrides): Promise; + + beneficiaryWithdraw(overrides?: CallOverrides): Promise; + + "beneficiaryWithdraw()"(overrides?: CallOverrides): Promise; + + funded(overrides?: CallOverrides): Promise; + + "funded()"(overrides?: CallOverrides): Promise; + + lockedWithdraw(overrides?: CallOverrides): Promise; + + "lockedWithdraw()"(overrides?: CallOverrides): Promise; + + metaData( + overrides?: CallOverrides + ): Promise< + [BigNumber, string, string, string, string] & { + id: BigNumber; + name: string; + ipfsHash: string; + url: string; + creator: string; + } + >; + + "metaData()"( + overrides?: CallOverrides + ): Promise< + [BigNumber, string, string, string, string] & { + id: BigNumber; + name: string; + ipfsHash: string; + url: string; + creator: string; + } + >; + + projectData( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, string, string] & { + threshold: BigNumber; + deadline: BigNumber; + beneficiary: string; + acceptedToken: string; + } + >; + + "projectData()"( + overrides?: CallOverrides + ): Promise< + [BigNumber, BigNumber, string, string] & { + threshold: BigNumber; + deadline: BigNumber; + beneficiary: string; + acceptedToken: string; + } + >; + + protocolData( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + "protocolData()"( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + setIpfsHash(_ipfsHash: BytesLike, overrides?: CallOverrides): Promise; + + "setIpfsHash(bytes32)"( + _ipfsHash: BytesLike, + overrides?: CallOverrides + ): Promise; + + setName(_name: BytesLike, overrides?: CallOverrides): Promise; + + "setName(bytes32)"( + _name: BytesLike, + overrides?: CallOverrides + ): Promise; + + setUrl(_url: BytesLike, overrides?: CallOverrides): Promise; + + "setUrl(bytes32)"( + _url: BytesLike, + overrides?: CallOverrides + ): Promise; + + totalFunding(overrides?: CallOverrides): Promise; + + "totalFunding()"(overrides?: CallOverrides): Promise; + }; + + filters: { + Back( + sender: string | null, + token: string | null, + amount: null + ): TypedEventFilter< + [string, string, BigNumber], + { sender: string; token: string; amount: BigNumber } + >; + + Failed(): TypedEventFilter<[], {}>; + + ProjectDataChange( + name: null, + oldData: null, + newData: null + ): TypedEventFilter< + [string, string, string], + { name: string; oldData: string; newData: string } + >; + + Succeeded( + timestamp: null, + amount: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { timestamp: BigNumber; amount: BigNumber } + >; + + Withdraw( + sender: string | null, + token: string | null, + amount: null, + withdrawalType: null + ): TypedEventFilter< + [string, string, BigNumber, string], + { + sender: string; + token: string; + amount: BigNumber; + withdrawalType: string; + } + >; + }; + + estimateGas: { + back( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "back(uint256)"( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + backersWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "backersWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + beneficiaryWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "beneficiaryWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + funded(overrides?: CallOverrides): Promise; + + "funded()"(overrides?: CallOverrides): Promise; + + lockedWithdraw(overrides?: CallOverrides): Promise; + + "lockedWithdraw()"(overrides?: CallOverrides): Promise; + + metaData(overrides?: CallOverrides): Promise; + + "metaData()"(overrides?: CallOverrides): Promise; + + projectData(overrides?: CallOverrides): Promise; + + "projectData()"(overrides?: CallOverrides): Promise; + + protocolData(overrides?: CallOverrides): Promise; + + "protocolData()"(overrides?: CallOverrides): Promise; + + setIpfsHash( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setIpfsHash(bytes32)"( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setName( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setName(bytes32)"( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setUrl( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setUrl(bytes32)"( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalFunding(overrides?: CallOverrides): Promise; + + "totalFunding()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + back( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "back(uint256)"( + _amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + backersWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "backersWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + beneficiaryWithdraw( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "beneficiaryWithdraw()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + funded(overrides?: CallOverrides): Promise; + + "funded()"(overrides?: CallOverrides): Promise; + + lockedWithdraw(overrides?: CallOverrides): Promise; + + "lockedWithdraw()"( + overrides?: CallOverrides + ): Promise; + + metaData(overrides?: CallOverrides): Promise; + + "metaData()"(overrides?: CallOverrides): Promise; + + projectData(overrides?: CallOverrides): Promise; + + "projectData()"(overrides?: CallOverrides): Promise; + + protocolData(overrides?: CallOverrides): Promise; + + "protocolData()"(overrides?: CallOverrides): Promise; + + setIpfsHash( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setIpfsHash(bytes32)"( + _ipfsHash: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setName( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setName(bytes32)"( + _name: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setUrl( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setUrl(bytes32)"( + _url: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalFunding(overrides?: CallOverrides): Promise; + + "totalFunding()"(overrides?: CallOverrides): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IProjectBaseFactory.d.ts b/packages/chain-events/src/contractTypes/IProjectBaseFactory.d.ts new file mode 100644 index 00000000000..9945fa0cfd7 --- /dev/null +++ b/packages/chain-events/src/contractTypes/IProjectBaseFactory.d.ts @@ -0,0 +1,578 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IProjectBaseFactoryInterface extends ethers.utils.Interface { + functions: { + "addAcceptedTokens(address[])": FunctionFragment; + "isAcceptedToken(address)": FunctionFragment; + "numProjects()": FunctionFragment; + "owner()": FunctionFragment; + "projectImp()": FunctionFragment; + "projects(uint32)": FunctionFragment; + "protocolData()": FunctionFragment; + "setFeeTo(address)": FunctionFragment; + "setProjectImpl(address)": FunctionFragment; + "setProtocolFee(uint8)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "addAcceptedTokens", + values: [string[]] + ): string; + encodeFunctionData( + functionFragment: "isAcceptedToken", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "numProjects", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "projectImp", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "projects", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "protocolData", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "setFeeTo", values: [string]): string; + encodeFunctionData( + functionFragment: "setProjectImpl", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "setProtocolFee", + values: [BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "addAcceptedTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isAcceptedToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "numProjects", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "projectImp", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "projects", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "protocolData", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setFeeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setProjectImpl", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setProtocolFee", + data: BytesLike + ): Result; + + events: { + "ProjectCreated(uint256,address)": EventFragment; + "ProjectImplChange(address,address)": EventFragment; + "ProtocolFeeChange(uint8,uint8)": EventFragment; + "ProtocolFeeToChange(address,address)": EventFragment; + "ProtocolTokenImplChange(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "ProjectCreated"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProjectImplChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProtocolFeeChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProtocolFeeToChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProtocolTokenImplChange"): EventFragment; +} + +export class IProjectBaseFactory extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IProjectBaseFactoryInterface; + + functions: { + addAcceptedTokens( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "addAcceptedTokens(address[])"( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + isAcceptedToken( + token: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isAcceptedToken(address)"( + token: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + numProjects(overrides?: CallOverrides): Promise<[number]>; + + "numProjects()"(overrides?: CallOverrides): Promise<[number]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + "owner()"(overrides?: CallOverrides): Promise<[string]>; + + projectImp(overrides?: CallOverrides): Promise<[string]>; + + "projectImp()"(overrides?: CallOverrides): Promise<[string]>; + + projects( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + "projects(uint32)"( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + protocolData( + overrides?: CallOverrides + ): Promise<[[number, string] & { fee: number; feeTo: string }]>; + + "protocolData()"( + overrides?: CallOverrides + ): Promise<[[number, string] & { fee: number; feeTo: string }]>; + + setFeeTo( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setFeeTo(address)"( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProjectImpl( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProjectImpl(address)"( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProtocolFee( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProtocolFee(uint8)"( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + addAcceptedTokens( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "addAcceptedTokens(address[])"( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + isAcceptedToken(token: string, overrides?: CallOverrides): Promise; + + "isAcceptedToken(address)"( + token: string, + overrides?: CallOverrides + ): Promise; + + numProjects(overrides?: CallOverrides): Promise; + + "numProjects()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + projectImp(overrides?: CallOverrides): Promise; + + "projectImp()"(overrides?: CallOverrides): Promise; + + projects( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "projects(uint32)"( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + protocolData( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + "protocolData()"( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + setFeeTo( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setFeeTo(address)"( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProjectImpl( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProjectImpl(address)"( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProtocolFee( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProtocolFee(uint8)"( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + addAcceptedTokens( + _tokens: string[], + overrides?: CallOverrides + ): Promise; + + "addAcceptedTokens(address[])"( + _tokens: string[], + overrides?: CallOverrides + ): Promise; + + isAcceptedToken(token: string, overrides?: CallOverrides): Promise; + + "isAcceptedToken(address)"( + token: string, + overrides?: CallOverrides + ): Promise; + + numProjects(overrides?: CallOverrides): Promise; + + "numProjects()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + projectImp(overrides?: CallOverrides): Promise; + + "projectImp()"(overrides?: CallOverrides): Promise; + + projects( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "projects(uint32)"( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + protocolData( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + "protocolData()"( + overrides?: CallOverrides + ): Promise<[number, string] & { fee: number; feeTo: string }>; + + setFeeTo(_feeTo: string, overrides?: CallOverrides): Promise; + + "setFeeTo(address)"( + _feeTo: string, + overrides?: CallOverrides + ): Promise; + + setProjectImpl( + _projectImpl: string, + overrides?: CallOverrides + ): Promise; + + "setProjectImpl(address)"( + _projectImpl: string, + overrides?: CallOverrides + ): Promise; + + setProtocolFee( + _protocolFee: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "setProtocolFee(uint8)"( + _protocolFee: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + ProjectCreated( + projectIndex: null, + projectAddress: null + ): TypedEventFilter< + [BigNumber, string], + { projectIndex: BigNumber; projectAddress: string } + >; + + ProjectImplChange( + oldAddr: null, + newAddr: null + ): TypedEventFilter<[string, string], { oldAddr: string; newAddr: string }>; + + ProtocolFeeChange( + oldFee: null, + newFee: null + ): TypedEventFilter<[number, number], { oldFee: number; newFee: number }>; + + ProtocolFeeToChange( + oldAddr: null, + newAddr: null + ): TypedEventFilter<[string, string], { oldAddr: string; newAddr: string }>; + + ProtocolTokenImplChange( + oldAddr: null, + newAddr: null + ): TypedEventFilter<[string, string], { oldAddr: string; newAddr: string }>; + }; + + estimateGas: { + addAcceptedTokens( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "addAcceptedTokens(address[])"( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + isAcceptedToken( + token: string, + overrides?: CallOverrides + ): Promise; + + "isAcceptedToken(address)"( + token: string, + overrides?: CallOverrides + ): Promise; + + numProjects(overrides?: CallOverrides): Promise; + + "numProjects()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + projectImp(overrides?: CallOverrides): Promise; + + "projectImp()"(overrides?: CallOverrides): Promise; + + projects( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "projects(uint32)"( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + protocolData(overrides?: CallOverrides): Promise; + + "protocolData()"(overrides?: CallOverrides): Promise; + + setFeeTo( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setFeeTo(address)"( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProjectImpl( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProjectImpl(address)"( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProtocolFee( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProtocolFee(uint8)"( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + addAcceptedTokens( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "addAcceptedTokens(address[])"( + _tokens: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + isAcceptedToken( + token: string, + overrides?: CallOverrides + ): Promise; + + "isAcceptedToken(address)"( + token: string, + overrides?: CallOverrides + ): Promise; + + numProjects(overrides?: CallOverrides): Promise; + + "numProjects()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + projectImp(overrides?: CallOverrides): Promise; + + "projectImp()"(overrides?: CallOverrides): Promise; + + projects( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "projects(uint32)"( + projectIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + protocolData(overrides?: CallOverrides): Promise; + + "protocolData()"(overrides?: CallOverrides): Promise; + + setFeeTo( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setFeeTo(address)"( + _feeTo: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProjectImpl( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProjectImpl(address)"( + _projectImpl: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setProtocolFee( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setProtocolFee(uint8)"( + _protocolFee: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IProposalValidator.d.ts b/packages/chain-events/src/contractTypes/IProposalValidator.d.ts new file mode 100644 index 00000000000..da428720a7f --- /dev/null +++ b/packages/chain-events/src/contractTypes/IProposalValidator.d.ts @@ -0,0 +1,819 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IProposalValidatorInterface extends ethers.utils.Interface { + functions: { + "MINIMUM_QUORUM()": FunctionFragment; + "ONE_HUNDRED_WITH_PRECISION()": FunctionFragment; + "PROPOSITION_THRESHOLD()": FunctionFragment; + "VOTE_DIFFERENTIAL()": FunctionFragment; + "VOTING_DURATION()": FunctionFragment; + "getMinimumPropositionPowerNeeded(address,uint256)": FunctionFragment; + "getMinimumVotingPowerNeeded(uint256)": FunctionFragment; + "isProposalPassed(address,uint256)": FunctionFragment; + "isPropositionPowerEnough(address,address,uint256)": FunctionFragment; + "isQuorumValid(address,uint256)": FunctionFragment; + "isVoteDifferentialValid(address,uint256)": FunctionFragment; + "validateCreatorOfProposal(address,address,uint256)": FunctionFragment; + "validateProposalCancellation(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "MINIMUM_QUORUM", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ONE_HUNDRED_WITH_PRECISION", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PROPOSITION_THRESHOLD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "VOTE_DIFFERENTIAL", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "VOTING_DURATION", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getMinimumPropositionPowerNeeded", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getMinimumVotingPowerNeeded", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isProposalPassed", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isPropositionPowerEnough", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isQuorumValid", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isVoteDifferentialValid", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "validateCreatorOfProposal", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "validateProposalCancellation", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "MINIMUM_QUORUM", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "ONE_HUNDRED_WITH_PRECISION", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PROPOSITION_THRESHOLD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "VOTE_DIFFERENTIAL", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "VOTING_DURATION", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getMinimumPropositionPowerNeeded", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getMinimumVotingPowerNeeded", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isProposalPassed", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isPropositionPowerEnough", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isQuorumValid", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isVoteDifferentialValid", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validateCreatorOfProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validateProposalCancellation", + data: BytesLike + ): Result; + + events: {}; +} + +export class IProposalValidator extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IProposalValidatorInterface; + + functions: { + MINIMUM_QUORUM(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MINIMUM_QUORUM()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + ONE_HUNDRED_WITH_PRECISION(overrides?: CallOverrides): Promise<[BigNumber]>; + + "ONE_HUNDRED_WITH_PRECISION()"( + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + PROPOSITION_THRESHOLD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "PROPOSITION_THRESHOLD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise<[BigNumber]>; + + "VOTE_DIFFERENTIAL()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + VOTING_DURATION(overrides?: CallOverrides): Promise<[BigNumber]>; + + "VOTING_DURATION()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + MINIMUM_QUORUM(overrides?: CallOverrides): Promise; + + "MINIMUM_QUORUM()"(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_WITH_PRECISION(overrides?: CallOverrides): Promise; + + "ONE_HUNDRED_WITH_PRECISION()"(overrides?: CallOverrides): Promise; + + PROPOSITION_THRESHOLD(overrides?: CallOverrides): Promise; + + "PROPOSITION_THRESHOLD()"(overrides?: CallOverrides): Promise; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise; + + "VOTE_DIFFERENTIAL()"(overrides?: CallOverrides): Promise; + + VOTING_DURATION(overrides?: CallOverrides): Promise; + + "VOTING_DURATION()"(overrides?: CallOverrides): Promise; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + callStatic: { + MINIMUM_QUORUM(overrides?: CallOverrides): Promise; + + "MINIMUM_QUORUM()"(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_WITH_PRECISION(overrides?: CallOverrides): Promise; + + "ONE_HUNDRED_WITH_PRECISION()"( + overrides?: CallOverrides + ): Promise; + + PROPOSITION_THRESHOLD(overrides?: CallOverrides): Promise; + + "PROPOSITION_THRESHOLD()"(overrides?: CallOverrides): Promise; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise; + + "VOTE_DIFFERENTIAL()"(overrides?: CallOverrides): Promise; + + VOTING_DURATION(overrides?: CallOverrides): Promise; + + "VOTING_DURATION()"(overrides?: CallOverrides): Promise; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + MINIMUM_QUORUM(overrides?: CallOverrides): Promise; + + "MINIMUM_QUORUM()"(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_WITH_PRECISION(overrides?: CallOverrides): Promise; + + "ONE_HUNDRED_WITH_PRECISION()"( + overrides?: CallOverrides + ): Promise; + + PROPOSITION_THRESHOLD(overrides?: CallOverrides): Promise; + + "PROPOSITION_THRESHOLD()"(overrides?: CallOverrides): Promise; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise; + + "VOTE_DIFFERENTIAL()"(overrides?: CallOverrides): Promise; + + VOTING_DURATION(overrides?: CallOverrides): Promise; + + "VOTING_DURATION()"(overrides?: CallOverrides): Promise; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + MINIMUM_QUORUM(overrides?: CallOverrides): Promise; + + "MINIMUM_QUORUM()"( + overrides?: CallOverrides + ): Promise; + + ONE_HUNDRED_WITH_PRECISION( + overrides?: CallOverrides + ): Promise; + + "ONE_HUNDRED_WITH_PRECISION()"( + overrides?: CallOverrides + ): Promise; + + PROPOSITION_THRESHOLD( + overrides?: CallOverrides + ): Promise; + + "PROPOSITION_THRESHOLD()"( + overrides?: CallOverrides + ): Promise; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise; + + "VOTE_DIFFERENTIAL()"( + overrides?: CallOverrides + ): Promise; + + VOTING_DURATION(overrides?: CallOverrides): Promise; + + "VOTING_DURATION()"( + overrides?: CallOverrides + ): Promise; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ITransferHook.d.ts b/packages/chain-events/src/contractTypes/ITransferHook.d.ts new file mode 100644 index 00000000000..aaf7ab1155d --- /dev/null +++ b/packages/chain-events/src/contractTypes/ITransferHook.d.ts @@ -0,0 +1,159 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ITransferHookInterface extends ethers.utils.Interface { + functions: { + "onTransfer(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "onTransfer", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "onTransfer", data: BytesLike): Result; + + events: {}; +} + +export class ITransferHook extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ITransferHookInterface; + + functions: { + onTransfer( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "onTransfer(address,address,uint256)"( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + onTransfer( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "onTransfer(address,address,uint256)"( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + onTransfer( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "onTransfer(address,address,uint256)"( + from: string, + to: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + onTransfer( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "onTransfer(address,address,uint256)"( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + onTransfer( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "onTransfer(address,address,uint256)"( + from: string, + to: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/IVotingStrategy.d.ts b/packages/chain-events/src/contractTypes/IVotingStrategy.d.ts new file mode 100644 index 00000000000..48ee7139cdc --- /dev/null +++ b/packages/chain-events/src/contractTypes/IVotingStrategy.d.ts @@ -0,0 +1,151 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface IVotingStrategyInterface extends ethers.utils.Interface { + functions: { + "getVotingPowerAt(address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "getVotingPowerAt", + values: [string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "getVotingPowerAt", + data: BytesLike + ): Result; + + events: {}; +} + +export class IVotingStrategy extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: IVotingStrategyInterface; + + functions: { + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + }; + + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + callStatic: { + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + getVotingPowerAt( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getVotingPowerAt(address,uint256)"( + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/InitializableAdminUpgradeabilityProxy.d.ts b/packages/chain-events/src/contractTypes/InitializableAdminUpgradeabilityProxy.d.ts new file mode 100644 index 00000000000..64d01c095ae --- /dev/null +++ b/packages/chain-events/src/contractTypes/InitializableAdminUpgradeabilityProxy.d.ts @@ -0,0 +1,433 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface InitializableAdminUpgradeabilityProxyInterface + extends ethers.utils.Interface { + functions: { + "admin()": FunctionFragment; + "changeAdmin(address)": FunctionFragment; + "implementation()": FunctionFragment; + "initialize(address,address,bytes)": FunctionFragment; + "upgradeTo(address)": FunctionFragment; + "upgradeToAndCall(address,bytes)": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData(functionFragment: "changeAdmin", values: [string]): string; + encodeFunctionData( + functionFragment: "implementation", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [string, string, BytesLike] + ): string; + encodeFunctionData(functionFragment: "upgradeTo", values: [string]): string; + encodeFunctionData( + functionFragment: "upgradeToAndCall", + values: [string, BytesLike] + ): string; + + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "changeAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "implementation", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "upgradeTo", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "upgradeToAndCall", + data: BytesLike + ): Result; + + events: { + "AdminChanged(address,address)": EventFragment; + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; +} + +export class InitializableAdminUpgradeabilityProxy extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: InitializableAdminUpgradeabilityProxyInterface; + + functions: { + admin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "admin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + changeAdmin( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "changeAdmin(address)"( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + implementation( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "implementation()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,bytes)"( + _logic: string, + _admin: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "initialize(address,bytes)"( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "upgradeTo(address)"( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "upgradeToAndCall(address,bytes)"( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; + + admin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "admin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + changeAdmin( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "changeAdmin(address)"( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + implementation( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "implementation()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,bytes)"( + _logic: string, + _admin: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "initialize(address,bytes)"( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "upgradeTo(address)"( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "upgradeToAndCall(address,bytes)"( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + callStatic: { + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + changeAdmin(newAdmin: string, overrides?: CallOverrides): Promise; + + "changeAdmin(address)"( + newAdmin: string, + overrides?: CallOverrides + ): Promise; + + implementation(overrides?: CallOverrides): Promise; + + "implementation()"(overrides?: CallOverrides): Promise; + + "initialize(address,address,bytes)"( + _logic: string, + _admin: string, + _data: BytesLike, + overrides?: CallOverrides + ): Promise; + + "initialize(address,bytes)"( + _logic: string, + _data: BytesLike, + overrides?: CallOverrides + ): Promise; + + upgradeTo( + newImplementation: string, + overrides?: CallOverrides + ): Promise; + + "upgradeTo(address)"( + newImplementation: string, + overrides?: CallOverrides + ): Promise; + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + + "upgradeToAndCall(address,bytes)"( + newImplementation: string, + data: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + AdminChanged( + previousAdmin: null, + newAdmin: null + ): TypedEventFilter< + [string, string], + { previousAdmin: string; newAdmin: string } + >; + + Upgraded( + implementation: string | null + ): TypedEventFilter<[string], { implementation: string }>; + }; + + estimateGas: { + admin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "admin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + changeAdmin( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "changeAdmin(address)"( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + implementation( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "implementation()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,bytes)"( + _logic: string, + _admin: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "initialize(address,bytes)"( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "upgradeTo(address)"( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "upgradeToAndCall(address,bytes)"( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + admin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "admin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + changeAdmin( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "changeAdmin(address)"( + newAdmin: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + implementation( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "implementation()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "initialize(address,address,bytes)"( + _logic: string, + _admin: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "initialize(address,bytes)"( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + upgradeTo( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "upgradeTo(address)"( + newImplementation: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgradeToAndCall( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "upgradeToAndCall(address,bytes)"( + newImplementation: string, + data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/InitializableUpgradeabilityProxy.d.ts b/packages/chain-events/src/contractTypes/InitializableUpgradeabilityProxy.d.ts new file mode 100644 index 00000000000..f0188625ef5 --- /dev/null +++ b/packages/chain-events/src/contractTypes/InitializableUpgradeabilityProxy.d.ts @@ -0,0 +1,158 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface InitializableUpgradeabilityProxyInterface + extends ethers.utils.Interface { + functions: { + "initialize(address,bytes)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "initialize", + values: [string, BytesLike] + ): string; + + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + + events: { + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; +} + +export class InitializableUpgradeabilityProxy extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: InitializableUpgradeabilityProxyInterface; + + functions: { + initialize( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "initialize(address,bytes)"( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; + + initialize( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "initialize(address,bytes)"( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + callStatic: { + initialize( + _logic: string, + _data: BytesLike, + overrides?: CallOverrides + ): Promise; + + "initialize(address,bytes)"( + _logic: string, + _data: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Upgraded( + implementation: string | null + ): TypedEventFilter<[string], { implementation: string }>; + }; + + estimateGas: { + initialize( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "initialize(address,bytes)"( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + initialize( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "initialize(address,bytes)"( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/MPond.d.ts b/packages/chain-events/src/contractTypes/MPond.d.ts new file mode 100644 index 00000000000..0c488d81ac3 --- /dev/null +++ b/packages/chain-events/src/contractTypes/MPond.d.ts @@ -0,0 +1,1682 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface MPondInterface extends ethers.utils.Interface { + functions: { + "DELEGATION_TYPEHASH()": FunctionFragment; + "DOMAIN_TYPEHASH()": FunctionFragment; + "UNDELEGATION_TYPEHASH()": FunctionFragment; + "addWhiteListAddress(address)": FunctionFragment; + "admin()": FunctionFragment; + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "bridgeSupply()": FunctionFragment; + "checkpoints(address,uint32)": FunctionFragment; + "decimals()": FunctionFragment; + "delegate(address,uint96)": FunctionFragment; + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32,uint96)": FunctionFragment; + "delegates(address,address)": FunctionFragment; + "enableAllTranfers()": FunctionFragment; + "enableAllTransfers()": FunctionFragment; + "getCurrentVotes(address)": FunctionFragment; + "getPriorVotes(address,uint256)": FunctionFragment; + "isWhiteListed(address)": FunctionFragment; + "isWhiteListedTransfer(address,address)": FunctionFragment; + "name()": FunctionFragment; + "nonces(address)": FunctionFragment; + "numCheckpoints(address)": FunctionFragment; + "symbol()": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + "undelegate(address,uint96)": FunctionFragment; + "undelegateBySig(address,uint256,uint256,uint8,bytes32,bytes32,uint96)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DELEGATION_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "DOMAIN_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "UNDELEGATION_TYPEHASH", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "addWhiteListAddress", + values: [string] + ): string; + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "bridgeSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "checkpoints", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "delegate", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "delegateBySig", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "delegates", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "enableAllTranfers", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "enableAllTransfers", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getCurrentVotes", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "getPriorVotes", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isWhiteListed", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "isWhiteListedTransfer", + values: [string, string] + ): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "nonces", values: [string]): string; + encodeFunctionData( + functionFragment: "numCheckpoints", + values: [string] + ): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "undelegate", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "undelegateBySig", + values: [ + string, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike, + BigNumberish + ] + ): string; + + decodeFunctionResult( + functionFragment: "DELEGATION_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "DOMAIN_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "UNDELEGATION_TYPEHASH", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "addWhiteListAddress", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "bridgeSupply", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "checkpoints", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "delegate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "delegateBySig", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delegates", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "enableAllTranfers", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "enableAllTransfers", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getCurrentVotes", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPriorVotes", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isWhiteListed", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isWhiteListedTransfer", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "nonces", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "numCheckpoints", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "undelegate", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "undelegateBySig", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "DelegateChanged(address,address,address)": EventFragment; + "DelegateVotesChanged(address,uint256,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegateChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "DelegateVotesChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class MPond extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: MPondInterface; + + functions: { + DELEGATION_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DELEGATION_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + UNDELEGATION_TYPEHASH(overrides?: CallOverrides): Promise<[string]>; + + "UNDELEGATION_TYPEHASH()"(overrides?: CallOverrides): Promise<[string]>; + + addWhiteListAddress( + _address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "addWhiteListAddress(address)"( + _address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise<[string]>; + + "admin()"(overrides?: CallOverrides): Promise<[string]>; + + allowance( + account: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + account: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + bridgeSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "bridgeSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + checkpoints( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + "checkpoints(address,uint32)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + decimals(overrides?: CallOverrides): Promise<[number]>; + + "decimals()"(overrides?: CallOverrides): Promise<[number]>; + + delegate( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address,uint96)"( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32,uint96)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates( + arg0: string, + arg1: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "delegates(address,address)"( + arg0: string, + arg1: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + enableAllTranfers(overrides?: CallOverrides): Promise<[boolean]>; + + "enableAllTranfers()"(overrides?: CallOverrides): Promise<[boolean]>; + + enableAllTransfers( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "enableAllTransfers()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getCurrentVotes( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getCurrentVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + isWhiteListed(arg0: string, overrides?: CallOverrides): Promise<[boolean]>; + + "isWhiteListed(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isWhiteListedTransfer( + _address1: string, + _address2: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isWhiteListedTransfer(address,address)"( + _address1: string, + _address2: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + name(overrides?: CallOverrides): Promise<[string]>; + + "name()"(overrides?: CallOverrides): Promise<[string]>; + + nonces(arg0: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + numCheckpoints(arg0: string, overrides?: CallOverrides): Promise<[number]>; + + "numCheckpoints(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[number]>; + + symbol(overrides?: CallOverrides): Promise<[string]>; + + "symbol()"(overrides?: CallOverrides): Promise<[string]>; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + src: string, + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + src: string, + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + undelegate( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "undelegate(address,uint96)"( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + undelegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "undelegateBySig(address,uint256,uint256,uint8,bytes32,bytes32,uint96)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DELEGATION_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATION_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + UNDELEGATION_TYPEHASH(overrides?: CallOverrides): Promise; + + "UNDELEGATION_TYPEHASH()"(overrides?: CallOverrides): Promise; + + addWhiteListAddress( + _address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "addWhiteListAddress(address)"( + _address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + allowance( + account: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + account: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + bridgeSupply(overrides?: CallOverrides): Promise; + + "bridgeSupply()"(overrides?: CallOverrides): Promise; + + checkpoints( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + "checkpoints(address,uint32)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + delegate( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address,uint96)"( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32,uint96)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates( + arg0: string, + arg1: string, + overrides?: CallOverrides + ): Promise; + + "delegates(address,address)"( + arg0: string, + arg1: string, + overrides?: CallOverrides + ): Promise; + + enableAllTranfers(overrides?: CallOverrides): Promise; + + "enableAllTranfers()"(overrides?: CallOverrides): Promise; + + enableAllTransfers( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "enableAllTransfers()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getCurrentVotes( + account: string, + overrides?: CallOverrides + ): Promise; + + "getCurrentVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isWhiteListed(arg0: string, overrides?: CallOverrides): Promise; + + "isWhiteListed(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + isWhiteListedTransfer( + _address1: string, + _address2: string, + overrides?: CallOverrides + ): Promise; + + "isWhiteListedTransfer(address,address)"( + _address1: string, + _address2: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(arg0: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints(arg0: string, overrides?: CallOverrides): Promise; + + "numCheckpoints(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + src: string, + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + src: string, + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + undelegate( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "undelegate(address,uint96)"( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + undelegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "undelegateBySig(address,uint256,uint256,uint8,bytes32,bytes32,uint96)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DELEGATION_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATION_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + UNDELEGATION_TYPEHASH(overrides?: CallOverrides): Promise; + + "UNDELEGATION_TYPEHASH()"(overrides?: CallOverrides): Promise; + + addWhiteListAddress( + _address: string, + overrides?: CallOverrides + ): Promise; + + "addWhiteListAddress(address)"( + _address: string, + overrides?: CallOverrides + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + allowance( + account: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + account: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + rawAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + rawAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + bridgeSupply(overrides?: CallOverrides): Promise; + + "bridgeSupply()"(overrides?: CallOverrides): Promise; + + checkpoints( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + "checkpoints(address,uint32)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise<[number, BigNumber] & { fromBlock: number; votes: BigNumber }>; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + delegate( + delegatee: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "delegate(address,uint96)"( + delegatee: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32,uint96)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delegates( + arg0: string, + arg1: string, + overrides?: CallOverrides + ): Promise; + + "delegates(address,address)"( + arg0: string, + arg1: string, + overrides?: CallOverrides + ): Promise; + + enableAllTranfers(overrides?: CallOverrides): Promise; + + "enableAllTranfers()"(overrides?: CallOverrides): Promise; + + enableAllTransfers(overrides?: CallOverrides): Promise; + + "enableAllTransfers()"(overrides?: CallOverrides): Promise; + + getCurrentVotes( + account: string, + overrides?: CallOverrides + ): Promise; + + "getCurrentVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isWhiteListed(arg0: string, overrides?: CallOverrides): Promise; + + "isWhiteListed(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + isWhiteListedTransfer( + _address1: string, + _address2: string, + overrides?: CallOverrides + ): Promise; + + "isWhiteListedTransfer(address,address)"( + _address1: string, + _address2: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(arg0: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints(arg0: string, overrides?: CallOverrides): Promise; + + "numCheckpoints(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + dst: string, + rawAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + dst: string, + rawAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + src: string, + dst: string, + rawAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + src: string, + dst: string, + rawAmount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + undelegate( + delegatee: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "undelegate(address,uint96)"( + delegatee: string, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + undelegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "undelegateBySig(address,uint256,uint256,uint8,bytes32,bytes32,uint96)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + amount: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; amount: BigNumber } + >; + + DelegateChanged( + delegator: string | null, + fromDelegate: string | null, + toDelegate: string | null + ): TypedEventFilter< + [string, string, string], + { delegator: string; fromDelegate: string; toDelegate: string } + >; + + DelegateVotesChanged( + delegate: string | null, + previousBalance: null, + newBalance: null + ): TypedEventFilter< + [string, BigNumber, BigNumber], + { delegate: string; previousBalance: BigNumber; newBalance: BigNumber } + >; + + Transfer( + from: string | null, + to: string | null, + amount: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; amount: BigNumber } + >; + }; + + estimateGas: { + DELEGATION_TYPEHASH(overrides?: CallOverrides): Promise; + + "DELEGATION_TYPEHASH()"(overrides?: CallOverrides): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"(overrides?: CallOverrides): Promise; + + UNDELEGATION_TYPEHASH(overrides?: CallOverrides): Promise; + + "UNDELEGATION_TYPEHASH()"(overrides?: CallOverrides): Promise; + + addWhiteListAddress( + _address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "addWhiteListAddress(address)"( + _address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + allowance( + account: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + account: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(account: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + bridgeSupply(overrides?: CallOverrides): Promise; + + "bridgeSupply()"(overrides?: CallOverrides): Promise; + + checkpoints( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "checkpoints(address,uint32)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + delegate( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address,uint96)"( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32,uint96)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates( + arg0: string, + arg1: string, + overrides?: CallOverrides + ): Promise; + + "delegates(address,address)"( + arg0: string, + arg1: string, + overrides?: CallOverrides + ): Promise; + + enableAllTranfers(overrides?: CallOverrides): Promise; + + "enableAllTranfers()"(overrides?: CallOverrides): Promise; + + enableAllTransfers( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "enableAllTransfers()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getCurrentVotes( + account: string, + overrides?: CallOverrides + ): Promise; + + "getCurrentVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isWhiteListed(arg0: string, overrides?: CallOverrides): Promise; + + "isWhiteListed(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + isWhiteListedTransfer( + _address1: string, + _address2: string, + overrides?: CallOverrides + ): Promise; + + "isWhiteListedTransfer(address,address)"( + _address1: string, + _address2: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces(arg0: string, overrides?: CallOverrides): Promise; + + "nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints(arg0: string, overrides?: CallOverrides): Promise; + + "numCheckpoints(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + src: string, + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + src: string, + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + undelegate( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "undelegate(address,uint96)"( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + undelegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "undelegateBySig(address,uint256,uint256,uint8,bytes32,bytes32,uint96)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DELEGATION_TYPEHASH( + overrides?: CallOverrides + ): Promise; + + "DELEGATION_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + DOMAIN_TYPEHASH(overrides?: CallOverrides): Promise; + + "DOMAIN_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + UNDELEGATION_TYPEHASH( + overrides?: CallOverrides + ): Promise; + + "UNDELEGATION_TYPEHASH()"( + overrides?: CallOverrides + ): Promise; + + addWhiteListAddress( + _address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "addWhiteListAddress(address)"( + _address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + allowance( + account: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + account: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + account: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + bridgeSupply(overrides?: CallOverrides): Promise; + + "bridgeSupply()"(overrides?: CallOverrides): Promise; + + checkpoints( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "checkpoints(address,uint32)"( + arg0: string, + arg1: BigNumberish, + overrides?: CallOverrides + ): Promise; + + decimals(overrides?: CallOverrides): Promise; + + "decimals()"(overrides?: CallOverrides): Promise; + + delegate( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegate(address,uint96)"( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "delegateBySig(address,uint256,uint256,uint8,bytes32,bytes32,uint96)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delegates( + arg0: string, + arg1: string, + overrides?: CallOverrides + ): Promise; + + "delegates(address,address)"( + arg0: string, + arg1: string, + overrides?: CallOverrides + ): Promise; + + enableAllTranfers(overrides?: CallOverrides): Promise; + + "enableAllTranfers()"( + overrides?: CallOverrides + ): Promise; + + enableAllTransfers( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "enableAllTransfers()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + getCurrentVotes( + account: string, + overrides?: CallOverrides + ): Promise; + + "getCurrentVotes(address)"( + account: string, + overrides?: CallOverrides + ): Promise; + + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isWhiteListed( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "isWhiteListed(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + isWhiteListedTransfer( + _address1: string, + _address2: string, + overrides?: CallOverrides + ): Promise; + + "isWhiteListedTransfer(address,address)"( + _address1: string, + _address2: string, + overrides?: CallOverrides + ): Promise; + + name(overrides?: CallOverrides): Promise; + + "name()"(overrides?: CallOverrides): Promise; + + nonces( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "nonces(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + numCheckpoints( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "numCheckpoints(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + symbol(overrides?: CallOverrides): Promise; + + "symbol()"(overrides?: CallOverrides): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + src: string, + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + src: string, + dst: string, + rawAmount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + undelegate( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "undelegate(address,uint96)"( + delegatee: string, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + undelegateBySig( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "undelegateBySig(address,uint256,uint256,uint8,bytes32,bytes32,uint96)"( + delegatee: string, + nonce: BigNumberish, + expiry: BigNumberish, + v: BigNumberish, + r: BytesLike, + s: BytesLike, + amount: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/MPondInterface.d.ts b/packages/chain-events/src/contractTypes/MPondInterface.d.ts new file mode 100644 index 00000000000..8595140aa04 --- /dev/null +++ b/packages/chain-events/src/contractTypes/MPondInterface.d.ts @@ -0,0 +1,151 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface MPondInterfaceInterface extends ethers.utils.Interface { + functions: { + "getPriorVotes(address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "getPriorVotes", + values: [string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "getPriorVotes", + data: BytesLike + ): Result; + + events: {}; +} + +export class MPondInterface extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: MPondInterfaceInterface; + + functions: { + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + }; + + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + callStatic: { + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + getPriorVotes( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getPriorVotes(address,uint256)"( + account: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/Migrations.d.ts b/packages/chain-events/src/contractTypes/Migrations.d.ts new file mode 100644 index 00000000000..cea63ff49e9 --- /dev/null +++ b/packages/chain-events/src/contractTypes/Migrations.d.ts @@ -0,0 +1,250 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface MigrationsInterface extends ethers.utils.Interface { + functions: { + "last_completed_migration()": FunctionFragment; + "owner()": FunctionFragment; + "setCompleted(uint256)": FunctionFragment; + "upgrade(address)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "last_completed_migration", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "setCompleted", + values: [BigNumberish] + ): string; + encodeFunctionData(functionFragment: "upgrade", values: [string]): string; + + decodeFunctionResult( + functionFragment: "last_completed_migration", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setCompleted", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "upgrade", data: BytesLike): Result; + + events: {}; +} + +export class Migrations extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: MigrationsInterface; + + functions: { + last_completed_migration(overrides?: CallOverrides): Promise<[BigNumber]>; + + "last_completed_migration()"( + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + owner(overrides?: CallOverrides): Promise<[string]>; + + "owner()"(overrides?: CallOverrides): Promise<[string]>; + + setCompleted( + completed: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setCompleted(uint256)"( + completed: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgrade( + new_address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "upgrade(address)"( + new_address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + last_completed_migration(overrides?: CallOverrides): Promise; + + "last_completed_migration()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + setCompleted( + completed: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setCompleted(uint256)"( + completed: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgrade( + new_address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "upgrade(address)"( + new_address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + last_completed_migration(overrides?: CallOverrides): Promise; + + "last_completed_migration()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + setCompleted( + completed: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "setCompleted(uint256)"( + completed: BigNumberish, + overrides?: CallOverrides + ): Promise; + + upgrade(new_address: string, overrides?: CallOverrides): Promise; + + "upgrade(address)"( + new_address: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + last_completed_migration(overrides?: CallOverrides): Promise; + + "last_completed_migration()"(overrides?: CallOverrides): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + setCompleted( + completed: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setCompleted(uint256)"( + completed: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgrade( + new_address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "upgrade(address)"( + new_address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + last_completed_migration( + overrides?: CallOverrides + ): Promise; + + "last_completed_migration()"( + overrides?: CallOverrides + ): Promise; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + setCompleted( + completed: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setCompleted(uint256)"( + completed: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + upgrade( + new_address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "upgrade(address)"( + new_address: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/Moloch1.d.ts b/packages/chain-events/src/contractTypes/Moloch1.d.ts new file mode 100644 index 00000000000..7d96a2052e5 --- /dev/null +++ b/packages/chain-events/src/contractTypes/Moloch1.d.ts @@ -0,0 +1,1553 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface Moloch1Interface extends ethers.utils.Interface { + functions: { + "abort(uint256)": FunctionFragment; + "abortWindow()": FunctionFragment; + "approvedToken()": FunctionFragment; + "canRagequit(uint256)": FunctionFragment; + "dilutionBound()": FunctionFragment; + "getCurrentPeriod()": FunctionFragment; + "getMemberProposalVote(address,uint256)": FunctionFragment; + "getProposalQueueLength()": FunctionFragment; + "gracePeriodLength()": FunctionFragment; + "guildBank()": FunctionFragment; + "hasVotingPeriodExpired(uint256)": FunctionFragment; + "memberAddressByDelegateKey(address)": FunctionFragment; + "members(address)": FunctionFragment; + "periodDuration()": FunctionFragment; + "processProposal(uint256)": FunctionFragment; + "processingReward()": FunctionFragment; + "proposalDeposit()": FunctionFragment; + "proposalQueue(uint256)": FunctionFragment; + "ragequit(uint256)": FunctionFragment; + "submitProposal(address,uint256,uint256,string)": FunctionFragment; + "submitVote(uint256,uint8)": FunctionFragment; + "summoningTime()": FunctionFragment; + "totalShares()": FunctionFragment; + "totalSharesRequested()": FunctionFragment; + "updateDelegateKey(address)": FunctionFragment; + "votingPeriodLength()": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "abort", values: [BigNumberish]): string; + encodeFunctionData( + functionFragment: "abortWindow", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "approvedToken", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "canRagequit", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "dilutionBound", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getCurrentPeriod", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getMemberProposalVote", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getProposalQueueLength", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "gracePeriodLength", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "guildBank", values?: undefined): string; + encodeFunctionData( + functionFragment: "hasVotingPeriodExpired", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "memberAddressByDelegateKey", + values: [string] + ): string; + encodeFunctionData(functionFragment: "members", values: [string]): string; + encodeFunctionData( + functionFragment: "periodDuration", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "processProposal", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "processingReward", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalDeposit", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalQueue", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "ragequit", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "submitProposal", + values: [string, BigNumberish, BigNumberish, string] + ): string; + encodeFunctionData( + functionFragment: "submitVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "summoningTime", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "totalShares", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "totalSharesRequested", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "updateDelegateKey", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "votingPeriodLength", + values?: undefined + ): string; + + decodeFunctionResult(functionFragment: "abort", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "abortWindow", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "approvedToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "canRagequit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "dilutionBound", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getCurrentPeriod", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getMemberProposalVote", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposalQueueLength", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "gracePeriodLength", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "guildBank", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hasVotingPeriodExpired", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "memberAddressByDelegateKey", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "members", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "periodDuration", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "processProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "processingReward", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalQueue", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ragequit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "submitProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "submitVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "summoningTime", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "totalShares", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "totalSharesRequested", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateDelegateKey", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriodLength", + data: BytesLike + ): Result; + + events: { + "Abort(uint256,address)": EventFragment; + "ProcessProposal(uint256,address,address,uint256,uint256,bool)": EventFragment; + "Ragequit(address,uint256)": EventFragment; + "SubmitProposal(uint256,address,address,address,uint256,uint256)": EventFragment; + "SubmitVote(uint256,address,address,uint8)": EventFragment; + "SummonComplete(address,uint256)": EventFragment; + "UpdateDelegateKey(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Abort"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProcessProposal"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Ragequit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SubmitProposal"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SubmitVote"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SummonComplete"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UpdateDelegateKey"): EventFragment; +} + +export class Moloch1 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: Moloch1Interface; + + functions: { + abort( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "abort(uint256)"( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + abortWindow(overrides?: CallOverrides): Promise<[BigNumber]>; + + "abortWindow()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + approvedToken(overrides?: CallOverrides): Promise<[string]>; + + "approvedToken()"(overrides?: CallOverrides): Promise<[string]>; + + canRagequit( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "canRagequit(uint256)"( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + dilutionBound(overrides?: CallOverrides): Promise<[BigNumber]>; + + "dilutionBound()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getCurrentPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "getCurrentPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getMemberProposalVote( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "getMemberProposalVote(address,uint256)"( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + getProposalQueueLength(overrides?: CallOverrides): Promise<[BigNumber]>; + + "getProposalQueueLength()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + gracePeriodLength(overrides?: CallOverrides): Promise<[BigNumber]>; + + "gracePeriodLength()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + guildBank(overrides?: CallOverrides): Promise<[string]>; + + "guildBank()"(overrides?: CallOverrides): Promise<[string]>; + + hasVotingPeriodExpired( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVotingPeriodExpired(uint256)"( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + memberAddressByDelegateKey( + arg0: string, + overrides?: CallOverrides + ): Promise<[string]>; + + "memberAddressByDelegateKey(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[string]>; + + members( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, boolean, BigNumber] & { + delegateKey: string; + shares: BigNumber; + exists: boolean; + highestIndexYesVote: BigNumber; + } + >; + + "members(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, boolean, BigNumber] & { + delegateKey: string; + shares: BigNumber; + exists: boolean; + highestIndexYesVote: BigNumber; + } + >; + + periodDuration(overrides?: CallOverrides): Promise<[BigNumber]>; + + "periodDuration()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + processProposal( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "processProposal(uint256)"( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + processingReward(overrides?: CallOverrides): Promise<[BigNumber]>; + + "processingReward()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalDeposit(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalDeposit()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalQueue( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + boolean, + BigNumber, + string, + BigNumber + ] & { + proposer: string; + applicant: string; + sharesRequested: BigNumber; + startingPeriod: BigNumber; + yesVotes: BigNumber; + noVotes: BigNumber; + processed: boolean; + didPass: boolean; + aborted: boolean; + tokenTribute: BigNumber; + details: string; + maxTotalSharesAtYesVote: BigNumber; + } + >; + + "proposalQueue(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + boolean, + BigNumber, + string, + BigNumber + ] & { + proposer: string; + applicant: string; + sharesRequested: BigNumber; + startingPeriod: BigNumber; + yesVotes: BigNumber; + noVotes: BigNumber; + processed: boolean; + didPass: boolean; + aborted: boolean; + tokenTribute: BigNumber; + details: string; + maxTotalSharesAtYesVote: BigNumber; + } + >; + + ragequit( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "ragequit(uint256)"( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitProposal( + applicant: string, + tokenTribute: BigNumberish, + sharesRequested: BigNumberish, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitProposal(address,uint256,uint256,string)"( + applicant: string, + tokenTribute: BigNumberish, + sharesRequested: BigNumberish, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,uint8)"( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + summoningTime(overrides?: CallOverrides): Promise<[BigNumber]>; + + "summoningTime()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + totalShares(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalShares()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + totalSharesRequested(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSharesRequested()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + updateDelegateKey( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateDelegateKey(address)"( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + votingPeriodLength(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriodLength()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + abort( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "abort(uint256)"( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + abortWindow(overrides?: CallOverrides): Promise; + + "abortWindow()"(overrides?: CallOverrides): Promise; + + approvedToken(overrides?: CallOverrides): Promise; + + "approvedToken()"(overrides?: CallOverrides): Promise; + + canRagequit( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "canRagequit(uint256)"( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + dilutionBound(overrides?: CallOverrides): Promise; + + "dilutionBound()"(overrides?: CallOverrides): Promise; + + getCurrentPeriod(overrides?: CallOverrides): Promise; + + "getCurrentPeriod()"(overrides?: CallOverrides): Promise; + + getMemberProposalVote( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMemberProposalVote(address,uint256)"( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalQueueLength(overrides?: CallOverrides): Promise; + + "getProposalQueueLength()"(overrides?: CallOverrides): Promise; + + gracePeriodLength(overrides?: CallOverrides): Promise; + + "gracePeriodLength()"(overrides?: CallOverrides): Promise; + + guildBank(overrides?: CallOverrides): Promise; + + "guildBank()"(overrides?: CallOverrides): Promise; + + hasVotingPeriodExpired( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "hasVotingPeriodExpired(uint256)"( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + memberAddressByDelegateKey( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "memberAddressByDelegateKey(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + members( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, boolean, BigNumber] & { + delegateKey: string; + shares: BigNumber; + exists: boolean; + highestIndexYesVote: BigNumber; + } + >; + + "members(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, boolean, BigNumber] & { + delegateKey: string; + shares: BigNumber; + exists: boolean; + highestIndexYesVote: BigNumber; + } + >; + + periodDuration(overrides?: CallOverrides): Promise; + + "periodDuration()"(overrides?: CallOverrides): Promise; + + processProposal( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "processProposal(uint256)"( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + processingReward(overrides?: CallOverrides): Promise; + + "processingReward()"(overrides?: CallOverrides): Promise; + + proposalDeposit(overrides?: CallOverrides): Promise; + + "proposalDeposit()"(overrides?: CallOverrides): Promise; + + proposalQueue( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + boolean, + BigNumber, + string, + BigNumber + ] & { + proposer: string; + applicant: string; + sharesRequested: BigNumber; + startingPeriod: BigNumber; + yesVotes: BigNumber; + noVotes: BigNumber; + processed: boolean; + didPass: boolean; + aborted: boolean; + tokenTribute: BigNumber; + details: string; + maxTotalSharesAtYesVote: BigNumber; + } + >; + + "proposalQueue(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + boolean, + BigNumber, + string, + BigNumber + ] & { + proposer: string; + applicant: string; + sharesRequested: BigNumber; + startingPeriod: BigNumber; + yesVotes: BigNumber; + noVotes: BigNumber; + processed: boolean; + didPass: boolean; + aborted: boolean; + tokenTribute: BigNumber; + details: string; + maxTotalSharesAtYesVote: BigNumber; + } + >; + + ragequit( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "ragequit(uint256)"( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitProposal( + applicant: string, + tokenTribute: BigNumberish, + sharesRequested: BigNumberish, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitProposal(address,uint256,uint256,string)"( + applicant: string, + tokenTribute: BigNumberish, + sharesRequested: BigNumberish, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,uint8)"( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + summoningTime(overrides?: CallOverrides): Promise; + + "summoningTime()"(overrides?: CallOverrides): Promise; + + totalShares(overrides?: CallOverrides): Promise; + + "totalShares()"(overrides?: CallOverrides): Promise; + + totalSharesRequested(overrides?: CallOverrides): Promise; + + "totalSharesRequested()"(overrides?: CallOverrides): Promise; + + updateDelegateKey( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateDelegateKey(address)"( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + votingPeriodLength(overrides?: CallOverrides): Promise; + + "votingPeriodLength()"(overrides?: CallOverrides): Promise; + + callStatic: { + abort( + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "abort(uint256)"( + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + abortWindow(overrides?: CallOverrides): Promise; + + "abortWindow()"(overrides?: CallOverrides): Promise; + + approvedToken(overrides?: CallOverrides): Promise; + + "approvedToken()"(overrides?: CallOverrides): Promise; + + canRagequit( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "canRagequit(uint256)"( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + dilutionBound(overrides?: CallOverrides): Promise; + + "dilutionBound()"(overrides?: CallOverrides): Promise; + + getCurrentPeriod(overrides?: CallOverrides): Promise; + + "getCurrentPeriod()"(overrides?: CallOverrides): Promise; + + getMemberProposalVote( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMemberProposalVote(address,uint256)"( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalQueueLength(overrides?: CallOverrides): Promise; + + "getProposalQueueLength()"(overrides?: CallOverrides): Promise; + + gracePeriodLength(overrides?: CallOverrides): Promise; + + "gracePeriodLength()"(overrides?: CallOverrides): Promise; + + guildBank(overrides?: CallOverrides): Promise; + + "guildBank()"(overrides?: CallOverrides): Promise; + + hasVotingPeriodExpired( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "hasVotingPeriodExpired(uint256)"( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + memberAddressByDelegateKey( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "memberAddressByDelegateKey(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + members( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, boolean, BigNumber] & { + delegateKey: string; + shares: BigNumber; + exists: boolean; + highestIndexYesVote: BigNumber; + } + >; + + "members(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, boolean, BigNumber] & { + delegateKey: string; + shares: BigNumber; + exists: boolean; + highestIndexYesVote: BigNumber; + } + >; + + periodDuration(overrides?: CallOverrides): Promise; + + "periodDuration()"(overrides?: CallOverrides): Promise; + + processProposal( + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "processProposal(uint256)"( + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + processingReward(overrides?: CallOverrides): Promise; + + "processingReward()"(overrides?: CallOverrides): Promise; + + proposalDeposit(overrides?: CallOverrides): Promise; + + "proposalDeposit()"(overrides?: CallOverrides): Promise; + + proposalQueue( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + boolean, + BigNumber, + string, + BigNumber + ] & { + proposer: string; + applicant: string; + sharesRequested: BigNumber; + startingPeriod: BigNumber; + yesVotes: BigNumber; + noVotes: BigNumber; + processed: boolean; + didPass: boolean; + aborted: boolean; + tokenTribute: BigNumber; + details: string; + maxTotalSharesAtYesVote: BigNumber; + } + >; + + "proposalQueue(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + string, + string, + BigNumber, + BigNumber, + BigNumber, + BigNumber, + boolean, + boolean, + boolean, + BigNumber, + string, + BigNumber + ] & { + proposer: string; + applicant: string; + sharesRequested: BigNumber; + startingPeriod: BigNumber; + yesVotes: BigNumber; + noVotes: BigNumber; + processed: boolean; + didPass: boolean; + aborted: boolean; + tokenTribute: BigNumber; + details: string; + maxTotalSharesAtYesVote: BigNumber; + } + >; + + ragequit( + sharesToBurn: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "ragequit(uint256)"( + sharesToBurn: BigNumberish, + overrides?: CallOverrides + ): Promise; + + submitProposal( + applicant: string, + tokenTribute: BigNumberish, + sharesRequested: BigNumberish, + details: string, + overrides?: CallOverrides + ): Promise; + + "submitProposal(address,uint256,uint256,string)"( + applicant: string, + tokenTribute: BigNumberish, + sharesRequested: BigNumberish, + details: string, + overrides?: CallOverrides + ): Promise; + + submitVote( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "submitVote(uint256,uint8)"( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + summoningTime(overrides?: CallOverrides): Promise; + + "summoningTime()"(overrides?: CallOverrides): Promise; + + totalShares(overrides?: CallOverrides): Promise; + + "totalShares()"(overrides?: CallOverrides): Promise; + + totalSharesRequested(overrides?: CallOverrides): Promise; + + "totalSharesRequested()"(overrides?: CallOverrides): Promise; + + updateDelegateKey( + newDelegateKey: string, + overrides?: CallOverrides + ): Promise; + + "updateDelegateKey(address)"( + newDelegateKey: string, + overrides?: CallOverrides + ): Promise; + + votingPeriodLength(overrides?: CallOverrides): Promise; + + "votingPeriodLength()"(overrides?: CallOverrides): Promise; + }; + + filters: { + Abort( + proposalIndex: BigNumberish | null, + applicantAddress: null + ): TypedEventFilter< + [BigNumber, string], + { proposalIndex: BigNumber; applicantAddress: string } + >; + + ProcessProposal( + proposalIndex: BigNumberish | null, + applicant: string | null, + memberAddress: string | null, + tokenTribute: null, + sharesRequested: null, + didPass: null + ): TypedEventFilter< + [BigNumber, string, string, BigNumber, BigNumber, boolean], + { + proposalIndex: BigNumber; + applicant: string; + memberAddress: string; + tokenTribute: BigNumber; + sharesRequested: BigNumber; + didPass: boolean; + } + >; + + Ragequit( + memberAddress: string | null, + sharesToBurn: null + ): TypedEventFilter< + [string, BigNumber], + { memberAddress: string; sharesToBurn: BigNumber } + >; + + SubmitProposal( + proposalIndex: null, + delegateKey: string | null, + memberAddress: string | null, + applicant: string | null, + tokenTribute: null, + sharesRequested: null + ): TypedEventFilter< + [BigNumber, string, string, string, BigNumber, BigNumber], + { + proposalIndex: BigNumber; + delegateKey: string; + memberAddress: string; + applicant: string; + tokenTribute: BigNumber; + sharesRequested: BigNumber; + } + >; + + SubmitVote( + proposalIndex: BigNumberish | null, + delegateKey: string | null, + memberAddress: string | null, + uintVote: null + ): TypedEventFilter< + [BigNumber, string, string, number], + { + proposalIndex: BigNumber; + delegateKey: string; + memberAddress: string; + uintVote: number; + } + >; + + SummonComplete( + summoner: string | null, + shares: null + ): TypedEventFilter< + [string, BigNumber], + { summoner: string; shares: BigNumber } + >; + + UpdateDelegateKey( + memberAddress: string | null, + newDelegateKey: null + ): TypedEventFilter< + [string, string], + { memberAddress: string; newDelegateKey: string } + >; + }; + + estimateGas: { + abort( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "abort(uint256)"( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + abortWindow(overrides?: CallOverrides): Promise; + + "abortWindow()"(overrides?: CallOverrides): Promise; + + approvedToken(overrides?: CallOverrides): Promise; + + "approvedToken()"(overrides?: CallOverrides): Promise; + + canRagequit( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "canRagequit(uint256)"( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + dilutionBound(overrides?: CallOverrides): Promise; + + "dilutionBound()"(overrides?: CallOverrides): Promise; + + getCurrentPeriod(overrides?: CallOverrides): Promise; + + "getCurrentPeriod()"(overrides?: CallOverrides): Promise; + + getMemberProposalVote( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMemberProposalVote(address,uint256)"( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalQueueLength(overrides?: CallOverrides): Promise; + + "getProposalQueueLength()"(overrides?: CallOverrides): Promise; + + gracePeriodLength(overrides?: CallOverrides): Promise; + + "gracePeriodLength()"(overrides?: CallOverrides): Promise; + + guildBank(overrides?: CallOverrides): Promise; + + "guildBank()"(overrides?: CallOverrides): Promise; + + hasVotingPeriodExpired( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "hasVotingPeriodExpired(uint256)"( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + memberAddressByDelegateKey( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "memberAddressByDelegateKey(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + members(arg0: string, overrides?: CallOverrides): Promise; + + "members(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + periodDuration(overrides?: CallOverrides): Promise; + + "periodDuration()"(overrides?: CallOverrides): Promise; + + processProposal( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "processProposal(uint256)"( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + processingReward(overrides?: CallOverrides): Promise; + + "processingReward()"(overrides?: CallOverrides): Promise; + + proposalDeposit(overrides?: CallOverrides): Promise; + + "proposalDeposit()"(overrides?: CallOverrides): Promise; + + proposalQueue( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalQueue(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + ragequit( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "ragequit(uint256)"( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitProposal( + applicant: string, + tokenTribute: BigNumberish, + sharesRequested: BigNumberish, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitProposal(address,uint256,uint256,string)"( + applicant: string, + tokenTribute: BigNumberish, + sharesRequested: BigNumberish, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,uint8)"( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + summoningTime(overrides?: CallOverrides): Promise; + + "summoningTime()"(overrides?: CallOverrides): Promise; + + totalShares(overrides?: CallOverrides): Promise; + + "totalShares()"(overrides?: CallOverrides): Promise; + + totalSharesRequested(overrides?: CallOverrides): Promise; + + "totalSharesRequested()"(overrides?: CallOverrides): Promise; + + updateDelegateKey( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateDelegateKey(address)"( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + votingPeriodLength(overrides?: CallOverrides): Promise; + + "votingPeriodLength()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + abort( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "abort(uint256)"( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + abortWindow(overrides?: CallOverrides): Promise; + + "abortWindow()"(overrides?: CallOverrides): Promise; + + approvedToken(overrides?: CallOverrides): Promise; + + "approvedToken()"(overrides?: CallOverrides): Promise; + + canRagequit( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "canRagequit(uint256)"( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + dilutionBound(overrides?: CallOverrides): Promise; + + "dilutionBound()"(overrides?: CallOverrides): Promise; + + getCurrentPeriod(overrides?: CallOverrides): Promise; + + "getCurrentPeriod()"( + overrides?: CallOverrides + ): Promise; + + getMemberProposalVote( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMemberProposalVote(address,uint256)"( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalQueueLength( + overrides?: CallOverrides + ): Promise; + + "getProposalQueueLength()"( + overrides?: CallOverrides + ): Promise; + + gracePeriodLength(overrides?: CallOverrides): Promise; + + "gracePeriodLength()"( + overrides?: CallOverrides + ): Promise; + + guildBank(overrides?: CallOverrides): Promise; + + "guildBank()"(overrides?: CallOverrides): Promise; + + hasVotingPeriodExpired( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "hasVotingPeriodExpired(uint256)"( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + memberAddressByDelegateKey( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "memberAddressByDelegateKey(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + members( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "members(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + periodDuration(overrides?: CallOverrides): Promise; + + "periodDuration()"( + overrides?: CallOverrides + ): Promise; + + processProposal( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "processProposal(uint256)"( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + processingReward(overrides?: CallOverrides): Promise; + + "processingReward()"( + overrides?: CallOverrides + ): Promise; + + proposalDeposit(overrides?: CallOverrides): Promise; + + "proposalDeposit()"( + overrides?: CallOverrides + ): Promise; + + proposalQueue( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalQueue(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + ragequit( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "ragequit(uint256)"( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitProposal( + applicant: string, + tokenTribute: BigNumberish, + sharesRequested: BigNumberish, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitProposal(address,uint256,uint256,string)"( + applicant: string, + tokenTribute: BigNumberish, + sharesRequested: BigNumberish, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,uint8)"( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + summoningTime(overrides?: CallOverrides): Promise; + + "summoningTime()"(overrides?: CallOverrides): Promise; + + totalShares(overrides?: CallOverrides): Promise; + + "totalShares()"(overrides?: CallOverrides): Promise; + + totalSharesRequested( + overrides?: CallOverrides + ): Promise; + + "totalSharesRequested()"( + overrides?: CallOverrides + ): Promise; + + updateDelegateKey( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateDelegateKey(address)"( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + votingPeriodLength( + overrides?: CallOverrides + ): Promise; + + "votingPeriodLength()"( + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/Moloch2.d.ts b/packages/chain-events/src/contractTypes/Moloch2.d.ts new file mode 100644 index 00000000000..4d1e521fb8d --- /dev/null +++ b/packages/chain-events/src/contractTypes/Moloch2.d.ts @@ -0,0 +1,2174 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface Moloch2Interface extends ethers.utils.Interface { + functions: { + "approvedTokens(uint256)": FunctionFragment; + "canRagequit(uint256)": FunctionFragment; + "cancelProposal(uint256)": FunctionFragment; + "depositToken()": FunctionFragment; + "dilutionBound()": FunctionFragment; + "emergencyExitWait()": FunctionFragment; + "getCurrentPeriod()": FunctionFragment; + "getMemberProposalVote(address,uint256)": FunctionFragment; + "getProposalQueueLength()": FunctionFragment; + "gracePeriodLength()": FunctionFragment; + "guildBank()": FunctionFragment; + "hasVotingPeriodExpired(uint256)": FunctionFragment; + "memberAddressByDelegateKey(address)": FunctionFragment; + "members(address)": FunctionFragment; + "periodDuration()": FunctionFragment; + "processProposal(uint256)": FunctionFragment; + "processingReward()": FunctionFragment; + "proposalCount()": FunctionFragment; + "proposalDeposit()": FunctionFragment; + "proposalQueue(uint256)": FunctionFragment; + "proposals(uint256)": FunctionFragment; + "proposedToKick(address)": FunctionFragment; + "proposedToWhitelist(address)": FunctionFragment; + "ragequit(uint256)": FunctionFragment; + "safeRagequit(uint256,address[])": FunctionFragment; + "sponsorProposal(uint256)": FunctionFragment; + "submitGuildKickProposal(address,string)": FunctionFragment; + "submitProposal(address,uint256,uint256,address,uint256,address,string)": FunctionFragment; + "submitVote(uint256,uint8)": FunctionFragment; + "submitWhitelistProposal(address,string)": FunctionFragment; + "summoningTime()": FunctionFragment; + "tokenWhitelist(address)": FunctionFragment; + "totalShares()": FunctionFragment; + "totalSharesRequested()": FunctionFragment; + "updateDelegateKey(address)": FunctionFragment; + "votingPeriodLength()": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "approvedTokens", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "canRagequit", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "cancelProposal", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "depositToken", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "dilutionBound", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "emergencyExitWait", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getCurrentPeriod", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getMemberProposalVote", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getProposalQueueLength", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "gracePeriodLength", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "guildBank", values?: undefined): string; + encodeFunctionData( + functionFragment: "hasVotingPeriodExpired", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "memberAddressByDelegateKey", + values: [string] + ): string; + encodeFunctionData(functionFragment: "members", values: [string]): string; + encodeFunctionData( + functionFragment: "periodDuration", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "processProposal", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "processingReward", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalCount", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalDeposit", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proposalQueue", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposals", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proposedToKick", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "proposedToWhitelist", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "ragequit", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "safeRagequit", + values: [BigNumberish, string[]] + ): string; + encodeFunctionData( + functionFragment: "sponsorProposal", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "submitGuildKickProposal", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "submitProposal", + values: [ + string, + BigNumberish, + BigNumberish, + string, + BigNumberish, + string, + string + ] + ): string; + encodeFunctionData( + functionFragment: "submitVote", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "submitWhitelistProposal", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "summoningTime", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "tokenWhitelist", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "totalShares", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "totalSharesRequested", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "updateDelegateKey", + values: [string] + ): string; + encodeFunctionData( + functionFragment: "votingPeriodLength", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "approvedTokens", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "canRagequit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "cancelProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "depositToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "dilutionBound", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "emergencyExitWait", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getCurrentPeriod", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getMemberProposalVote", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProposalQueueLength", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "gracePeriodLength", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "guildBank", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hasVotingPeriodExpired", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "memberAddressByDelegateKey", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "members", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "periodDuration", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "processProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "processingReward", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalCount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposalQueue", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "proposals", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "proposedToKick", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proposedToWhitelist", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "ragequit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "safeRagequit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sponsorProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "submitGuildKickProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "submitProposal", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "submitVote", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "submitWhitelistProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "summoningTime", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "tokenWhitelist", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "totalShares", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "totalSharesRequested", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateDelegateKey", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "votingPeriodLength", + data: BytesLike + ): Result; + + events: { + "CancelProposal(uint256,address)": EventFragment; + "ProcessProposal(uint256,address,address,uint256,uint256,bool)": EventFragment; + "Ragequit(address,uint256)": EventFragment; + "SubmitProposal(uint256,address,address,address,uint256,uint256)": EventFragment; + "SubmitVote(uint256,address,address,uint8)": EventFragment; + "SummonComplete(address,uint256)": EventFragment; + "UpdateDelegateKey(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "CancelProposal"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ProcessProposal"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Ragequit"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SubmitProposal"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SubmitVote"): EventFragment; + getEvent(nameOrSignatureOrTopic: "SummonComplete"): EventFragment; + getEvent(nameOrSignatureOrTopic: "UpdateDelegateKey"): EventFragment; +} + +export class Moloch2 extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: Moloch2Interface; + + functions: { + approvedTokens( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + "approvedTokens(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[string]>; + + canRagequit( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "canRagequit(uint256)"( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + cancelProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelProposal(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + depositToken(overrides?: CallOverrides): Promise<[string]>; + + "depositToken()"(overrides?: CallOverrides): Promise<[string]>; + + dilutionBound(overrides?: CallOverrides): Promise<[BigNumber]>; + + "dilutionBound()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + emergencyExitWait(overrides?: CallOverrides): Promise<[BigNumber]>; + + "emergencyExitWait()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getCurrentPeriod(overrides?: CallOverrides): Promise<[BigNumber]>; + + "getCurrentPeriod()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getMemberProposalVote( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + "getMemberProposalVote(address,uint256)"( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise<[number]>; + + getProposalQueueLength(overrides?: CallOverrides): Promise<[BigNumber]>; + + "getProposalQueueLength()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + gracePeriodLength(overrides?: CallOverrides): Promise<[BigNumber]>; + + "gracePeriodLength()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + guildBank(overrides?: CallOverrides): Promise<[string]>; + + "guildBank()"(overrides?: CallOverrides): Promise<[string]>; + + hasVotingPeriodExpired( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasVotingPeriodExpired(uint256)"( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + memberAddressByDelegateKey( + arg0: string, + overrides?: CallOverrides + ): Promise<[string]>; + + "memberAddressByDelegateKey(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[string]>; + + members( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, boolean, BigNumber] & { + delegateKey: string; + shares: BigNumber; + exists: boolean; + highestIndexYesVote: BigNumber; + } + >; + + "members(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, boolean, BigNumber] & { + delegateKey: string; + shares: BigNumber; + exists: boolean; + highestIndexYesVote: BigNumber; + } + >; + + periodDuration(overrides?: CallOverrides): Promise<[BigNumber]>; + + "periodDuration()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + processProposal( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "processProposal(uint256)"( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + processingReward(overrides?: CallOverrides): Promise<[BigNumber]>; + + "processingReward()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalCount(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalCount()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalDeposit(overrides?: CallOverrides): Promise<[BigNumber]>; + + "proposalDeposit()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + proposalQueue( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "proposalQueue(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + string, + string, + string, + BigNumber, + BigNumber, + string, + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber + ] & { + applicant: string; + proposer: string; + sponsor: string; + sharesRequested: BigNumber; + tributeOffered: BigNumber; + tributeToken: string; + paymentRequested: BigNumber; + paymentToken: string; + startingPeriod: BigNumber; + yesVotes: BigNumber; + noVotes: BigNumber; + details: string; + maxTotalSharesAtYesVote: BigNumber; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + string, + string, + string, + BigNumber, + BigNumber, + string, + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber + ] & { + applicant: string; + proposer: string; + sponsor: string; + sharesRequested: BigNumber; + tributeOffered: BigNumber; + tributeToken: string; + paymentRequested: BigNumber; + paymentToken: string; + startingPeriod: BigNumber; + yesVotes: BigNumber; + noVotes: BigNumber; + details: string; + maxTotalSharesAtYesVote: BigNumber; + } + >; + + proposedToKick(arg0: string, overrides?: CallOverrides): Promise<[boolean]>; + + "proposedToKick(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + proposedToWhitelist( + arg0: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "proposedToWhitelist(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + ragequit( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "ragequit(uint256)"( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + safeRagequit( + sharesToBurn: BigNumberish, + tokenList: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "safeRagequit(uint256,address[])"( + sharesToBurn: BigNumberish, + tokenList: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + sponsorProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "sponsorProposal(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitGuildKickProposal( + memberToKick: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitGuildKickProposal(address,string)"( + memberToKick: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitProposal( + applicant: string, + sharesRequested: BigNumberish, + tributeOffered: BigNumberish, + tributeToken: string, + paymentRequested: BigNumberish, + paymentToken: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitProposal(address,uint256,uint256,address,uint256,address,string)"( + applicant: string, + sharesRequested: BigNumberish, + tributeOffered: BigNumberish, + tributeToken: string, + paymentRequested: BigNumberish, + paymentToken: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,uint8)"( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitWhitelistProposal( + tokenToWhitelist: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitWhitelistProposal(address,string)"( + tokenToWhitelist: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + summoningTime(overrides?: CallOverrides): Promise<[BigNumber]>; + + "summoningTime()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + tokenWhitelist(arg0: string, overrides?: CallOverrides): Promise<[boolean]>; + + "tokenWhitelist(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + totalShares(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalShares()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + totalSharesRequested(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSharesRequested()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + updateDelegateKey( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateDelegateKey(address)"( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + votingPeriodLength(overrides?: CallOverrides): Promise<[BigNumber]>; + + "votingPeriodLength()"(overrides?: CallOverrides): Promise<[BigNumber]>; + }; + + approvedTokens( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approvedTokens(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + canRagequit( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "canRagequit(uint256)"( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + cancelProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelProposal(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + depositToken(overrides?: CallOverrides): Promise; + + "depositToken()"(overrides?: CallOverrides): Promise; + + dilutionBound(overrides?: CallOverrides): Promise; + + "dilutionBound()"(overrides?: CallOverrides): Promise; + + emergencyExitWait(overrides?: CallOverrides): Promise; + + "emergencyExitWait()"(overrides?: CallOverrides): Promise; + + getCurrentPeriod(overrides?: CallOverrides): Promise; + + "getCurrentPeriod()"(overrides?: CallOverrides): Promise; + + getMemberProposalVote( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMemberProposalVote(address,uint256)"( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalQueueLength(overrides?: CallOverrides): Promise; + + "getProposalQueueLength()"(overrides?: CallOverrides): Promise; + + gracePeriodLength(overrides?: CallOverrides): Promise; + + "gracePeriodLength()"(overrides?: CallOverrides): Promise; + + guildBank(overrides?: CallOverrides): Promise; + + "guildBank()"(overrides?: CallOverrides): Promise; + + hasVotingPeriodExpired( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "hasVotingPeriodExpired(uint256)"( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + memberAddressByDelegateKey( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "memberAddressByDelegateKey(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + members( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, boolean, BigNumber] & { + delegateKey: string; + shares: BigNumber; + exists: boolean; + highestIndexYesVote: BigNumber; + } + >; + + "members(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, boolean, BigNumber] & { + delegateKey: string; + shares: BigNumber; + exists: boolean; + highestIndexYesVote: BigNumber; + } + >; + + periodDuration(overrides?: CallOverrides): Promise; + + "periodDuration()"(overrides?: CallOverrides): Promise; + + processProposal( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "processProposal(uint256)"( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + processingReward(overrides?: CallOverrides): Promise; + + "processingReward()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalDeposit(overrides?: CallOverrides): Promise; + + "proposalDeposit()"(overrides?: CallOverrides): Promise; + + proposalQueue( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalQueue(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + string, + string, + string, + BigNumber, + BigNumber, + string, + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber + ] & { + applicant: string; + proposer: string; + sponsor: string; + sharesRequested: BigNumber; + tributeOffered: BigNumber; + tributeToken: string; + paymentRequested: BigNumber; + paymentToken: string; + startingPeriod: BigNumber; + yesVotes: BigNumber; + noVotes: BigNumber; + details: string; + maxTotalSharesAtYesVote: BigNumber; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + string, + string, + string, + BigNumber, + BigNumber, + string, + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber + ] & { + applicant: string; + proposer: string; + sponsor: string; + sharesRequested: BigNumber; + tributeOffered: BigNumber; + tributeToken: string; + paymentRequested: BigNumber; + paymentToken: string; + startingPeriod: BigNumber; + yesVotes: BigNumber; + noVotes: BigNumber; + details: string; + maxTotalSharesAtYesVote: BigNumber; + } + >; + + proposedToKick(arg0: string, overrides?: CallOverrides): Promise; + + "proposedToKick(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + proposedToWhitelist( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "proposedToWhitelist(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + ragequit( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "ragequit(uint256)"( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + safeRagequit( + sharesToBurn: BigNumberish, + tokenList: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "safeRagequit(uint256,address[])"( + sharesToBurn: BigNumberish, + tokenList: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + sponsorProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "sponsorProposal(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitGuildKickProposal( + memberToKick: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitGuildKickProposal(address,string)"( + memberToKick: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitProposal( + applicant: string, + sharesRequested: BigNumberish, + tributeOffered: BigNumberish, + tributeToken: string, + paymentRequested: BigNumberish, + paymentToken: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitProposal(address,uint256,uint256,address,uint256,address,string)"( + applicant: string, + sharesRequested: BigNumberish, + tributeOffered: BigNumberish, + tributeToken: string, + paymentRequested: BigNumberish, + paymentToken: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,uint8)"( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitWhitelistProposal( + tokenToWhitelist: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitWhitelistProposal(address,string)"( + tokenToWhitelist: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + summoningTime(overrides?: CallOverrides): Promise; + + "summoningTime()"(overrides?: CallOverrides): Promise; + + tokenWhitelist(arg0: string, overrides?: CallOverrides): Promise; + + "tokenWhitelist(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + totalShares(overrides?: CallOverrides): Promise; + + "totalShares()"(overrides?: CallOverrides): Promise; + + totalSharesRequested(overrides?: CallOverrides): Promise; + + "totalSharesRequested()"(overrides?: CallOverrides): Promise; + + updateDelegateKey( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateDelegateKey(address)"( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + votingPeriodLength(overrides?: CallOverrides): Promise; + + "votingPeriodLength()"(overrides?: CallOverrides): Promise; + + callStatic: { + approvedTokens( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approvedTokens(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + canRagequit( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "canRagequit(uint256)"( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + cancelProposal( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "cancelProposal(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + depositToken(overrides?: CallOverrides): Promise; + + "depositToken()"(overrides?: CallOverrides): Promise; + + dilutionBound(overrides?: CallOverrides): Promise; + + "dilutionBound()"(overrides?: CallOverrides): Promise; + + emergencyExitWait(overrides?: CallOverrides): Promise; + + "emergencyExitWait()"(overrides?: CallOverrides): Promise; + + getCurrentPeriod(overrides?: CallOverrides): Promise; + + "getCurrentPeriod()"(overrides?: CallOverrides): Promise; + + getMemberProposalVote( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMemberProposalVote(address,uint256)"( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalQueueLength(overrides?: CallOverrides): Promise; + + "getProposalQueueLength()"(overrides?: CallOverrides): Promise; + + gracePeriodLength(overrides?: CallOverrides): Promise; + + "gracePeriodLength()"(overrides?: CallOverrides): Promise; + + guildBank(overrides?: CallOverrides): Promise; + + "guildBank()"(overrides?: CallOverrides): Promise; + + hasVotingPeriodExpired( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "hasVotingPeriodExpired(uint256)"( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + memberAddressByDelegateKey( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "memberAddressByDelegateKey(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + members( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, boolean, BigNumber] & { + delegateKey: string; + shares: BigNumber; + exists: boolean; + highestIndexYesVote: BigNumber; + } + >; + + "members(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise< + [string, BigNumber, boolean, BigNumber] & { + delegateKey: string; + shares: BigNumber; + exists: boolean; + highestIndexYesVote: BigNumber; + } + >; + + periodDuration(overrides?: CallOverrides): Promise; + + "periodDuration()"(overrides?: CallOverrides): Promise; + + processProposal( + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "processProposal(uint256)"( + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + processingReward(overrides?: CallOverrides): Promise; + + "processingReward()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalDeposit(overrides?: CallOverrides): Promise; + + "proposalDeposit()"(overrides?: CallOverrides): Promise; + + proposalQueue( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalQueue(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + string, + string, + string, + BigNumber, + BigNumber, + string, + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber + ] & { + applicant: string; + proposer: string; + sponsor: string; + sharesRequested: BigNumber; + tributeOffered: BigNumber; + tributeToken: string; + paymentRequested: BigNumber; + paymentToken: string; + startingPeriod: BigNumber; + yesVotes: BigNumber; + noVotes: BigNumber; + details: string; + maxTotalSharesAtYesVote: BigNumber; + } + >; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise< + [ + string, + string, + string, + BigNumber, + BigNumber, + string, + BigNumber, + string, + BigNumber, + BigNumber, + BigNumber, + string, + BigNumber + ] & { + applicant: string; + proposer: string; + sponsor: string; + sharesRequested: BigNumber; + tributeOffered: BigNumber; + tributeToken: string; + paymentRequested: BigNumber; + paymentToken: string; + startingPeriod: BigNumber; + yesVotes: BigNumber; + noVotes: BigNumber; + details: string; + maxTotalSharesAtYesVote: BigNumber; + } + >; + + proposedToKick(arg0: string, overrides?: CallOverrides): Promise; + + "proposedToKick(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + proposedToWhitelist( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "proposedToWhitelist(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + ragequit( + sharesToBurn: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "ragequit(uint256)"( + sharesToBurn: BigNumberish, + overrides?: CallOverrides + ): Promise; + + safeRagequit( + sharesToBurn: BigNumberish, + tokenList: string[], + overrides?: CallOverrides + ): Promise; + + "safeRagequit(uint256,address[])"( + sharesToBurn: BigNumberish, + tokenList: string[], + overrides?: CallOverrides + ): Promise; + + sponsorProposal( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "sponsorProposal(uint256)"( + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + submitGuildKickProposal( + memberToKick: string, + details: string, + overrides?: CallOverrides + ): Promise; + + "submitGuildKickProposal(address,string)"( + memberToKick: string, + details: string, + overrides?: CallOverrides + ): Promise; + + submitProposal( + applicant: string, + sharesRequested: BigNumberish, + tributeOffered: BigNumberish, + tributeToken: string, + paymentRequested: BigNumberish, + paymentToken: string, + details: string, + overrides?: CallOverrides + ): Promise; + + "submitProposal(address,uint256,uint256,address,uint256,address,string)"( + applicant: string, + sharesRequested: BigNumberish, + tributeOffered: BigNumberish, + tributeToken: string, + paymentRequested: BigNumberish, + paymentToken: string, + details: string, + overrides?: CallOverrides + ): Promise; + + submitVote( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "submitVote(uint256,uint8)"( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + submitWhitelistProposal( + tokenToWhitelist: string, + details: string, + overrides?: CallOverrides + ): Promise; + + "submitWhitelistProposal(address,string)"( + tokenToWhitelist: string, + details: string, + overrides?: CallOverrides + ): Promise; + + summoningTime(overrides?: CallOverrides): Promise; + + "summoningTime()"(overrides?: CallOverrides): Promise; + + tokenWhitelist(arg0: string, overrides?: CallOverrides): Promise; + + "tokenWhitelist(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + totalShares(overrides?: CallOverrides): Promise; + + "totalShares()"(overrides?: CallOverrides): Promise; + + totalSharesRequested(overrides?: CallOverrides): Promise; + + "totalSharesRequested()"(overrides?: CallOverrides): Promise; + + updateDelegateKey( + newDelegateKey: string, + overrides?: CallOverrides + ): Promise; + + "updateDelegateKey(address)"( + newDelegateKey: string, + overrides?: CallOverrides + ): Promise; + + votingPeriodLength(overrides?: CallOverrides): Promise; + + "votingPeriodLength()"(overrides?: CallOverrides): Promise; + }; + + filters: { + CancelProposal( + proposalIndex: BigNumberish | null, + applicantAddress: null + ): TypedEventFilter< + [BigNumber, string], + { proposalIndex: BigNumber; applicantAddress: string } + >; + + ProcessProposal( + proposalIndex: BigNumberish | null, + applicant: string | null, + memberAddress: string | null, + tributeOffered: null, + sharesRequested: null, + didPass: null + ): TypedEventFilter< + [BigNumber, string, string, BigNumber, BigNumber, boolean], + { + proposalIndex: BigNumber; + applicant: string; + memberAddress: string; + tributeOffered: BigNumber; + sharesRequested: BigNumber; + didPass: boolean; + } + >; + + Ragequit( + memberAddress: string | null, + sharesToBurn: null + ): TypedEventFilter< + [string, BigNumber], + { memberAddress: string; sharesToBurn: BigNumber } + >; + + SubmitProposal( + proposalIndex: null, + delegateKey: string | null, + memberAddress: string | null, + applicant: string | null, + tributeOffered: null, + sharesRequested: null + ): TypedEventFilter< + [BigNumber, string, string, string, BigNumber, BigNumber], + { + proposalIndex: BigNumber; + delegateKey: string; + memberAddress: string; + applicant: string; + tributeOffered: BigNumber; + sharesRequested: BigNumber; + } + >; + + SubmitVote( + proposalIndex: BigNumberish | null, + delegateKey: string | null, + memberAddress: string | null, + uintVote: null + ): TypedEventFilter< + [BigNumber, string, string, number], + { + proposalIndex: BigNumber; + delegateKey: string; + memberAddress: string; + uintVote: number; + } + >; + + SummonComplete( + summoner: string | null, + shares: null + ): TypedEventFilter< + [string, BigNumber], + { summoner: string; shares: BigNumber } + >; + + UpdateDelegateKey( + memberAddress: string | null, + newDelegateKey: null + ): TypedEventFilter< + [string, string], + { memberAddress: string; newDelegateKey: string } + >; + }; + + estimateGas: { + approvedTokens( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approvedTokens(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + canRagequit( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "canRagequit(uint256)"( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + cancelProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelProposal(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + depositToken(overrides?: CallOverrides): Promise; + + "depositToken()"(overrides?: CallOverrides): Promise; + + dilutionBound(overrides?: CallOverrides): Promise; + + "dilutionBound()"(overrides?: CallOverrides): Promise; + + emergencyExitWait(overrides?: CallOverrides): Promise; + + "emergencyExitWait()"(overrides?: CallOverrides): Promise; + + getCurrentPeriod(overrides?: CallOverrides): Promise; + + "getCurrentPeriod()"(overrides?: CallOverrides): Promise; + + getMemberProposalVote( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMemberProposalVote(address,uint256)"( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalQueueLength(overrides?: CallOverrides): Promise; + + "getProposalQueueLength()"(overrides?: CallOverrides): Promise; + + gracePeriodLength(overrides?: CallOverrides): Promise; + + "gracePeriodLength()"(overrides?: CallOverrides): Promise; + + guildBank(overrides?: CallOverrides): Promise; + + "guildBank()"(overrides?: CallOverrides): Promise; + + hasVotingPeriodExpired( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "hasVotingPeriodExpired(uint256)"( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + memberAddressByDelegateKey( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "memberAddressByDelegateKey(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + members(arg0: string, overrides?: CallOverrides): Promise; + + "members(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + periodDuration(overrides?: CallOverrides): Promise; + + "periodDuration()"(overrides?: CallOverrides): Promise; + + processProposal( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "processProposal(uint256)"( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + processingReward(overrides?: CallOverrides): Promise; + + "processingReward()"(overrides?: CallOverrides): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalDeposit(overrides?: CallOverrides): Promise; + + "proposalDeposit()"(overrides?: CallOverrides): Promise; + + proposalQueue( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalQueue(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposedToKick(arg0: string, overrides?: CallOverrides): Promise; + + "proposedToKick(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + proposedToWhitelist( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "proposedToWhitelist(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + ragequit( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "ragequit(uint256)"( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + safeRagequit( + sharesToBurn: BigNumberish, + tokenList: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "safeRagequit(uint256,address[])"( + sharesToBurn: BigNumberish, + tokenList: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + sponsorProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "sponsorProposal(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitGuildKickProposal( + memberToKick: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitGuildKickProposal(address,string)"( + memberToKick: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitProposal( + applicant: string, + sharesRequested: BigNumberish, + tributeOffered: BigNumberish, + tributeToken: string, + paymentRequested: BigNumberish, + paymentToken: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitProposal(address,uint256,uint256,address,uint256,address,string)"( + applicant: string, + sharesRequested: BigNumberish, + tributeOffered: BigNumberish, + tributeToken: string, + paymentRequested: BigNumberish, + paymentToken: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,uint8)"( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitWhitelistProposal( + tokenToWhitelist: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitWhitelistProposal(address,string)"( + tokenToWhitelist: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + summoningTime(overrides?: CallOverrides): Promise; + + "summoningTime()"(overrides?: CallOverrides): Promise; + + tokenWhitelist(arg0: string, overrides?: CallOverrides): Promise; + + "tokenWhitelist(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + totalShares(overrides?: CallOverrides): Promise; + + "totalShares()"(overrides?: CallOverrides): Promise; + + totalSharesRequested(overrides?: CallOverrides): Promise; + + "totalSharesRequested()"(overrides?: CallOverrides): Promise; + + updateDelegateKey( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateDelegateKey(address)"( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + votingPeriodLength(overrides?: CallOverrides): Promise; + + "votingPeriodLength()"(overrides?: CallOverrides): Promise; + }; + + populateTransaction: { + approvedTokens( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approvedTokens(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + canRagequit( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "canRagequit(uint256)"( + highestIndexYesVote: BigNumberish, + overrides?: CallOverrides + ): Promise; + + cancelProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelProposal(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + depositToken(overrides?: CallOverrides): Promise; + + "depositToken()"(overrides?: CallOverrides): Promise; + + dilutionBound(overrides?: CallOverrides): Promise; + + "dilutionBound()"(overrides?: CallOverrides): Promise; + + emergencyExitWait(overrides?: CallOverrides): Promise; + + "emergencyExitWait()"( + overrides?: CallOverrides + ): Promise; + + getCurrentPeriod(overrides?: CallOverrides): Promise; + + "getCurrentPeriod()"( + overrides?: CallOverrides + ): Promise; + + getMemberProposalVote( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMemberProposalVote(address,uint256)"( + memberAddress: string, + proposalIndex: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getProposalQueueLength( + overrides?: CallOverrides + ): Promise; + + "getProposalQueueLength()"( + overrides?: CallOverrides + ): Promise; + + gracePeriodLength(overrides?: CallOverrides): Promise; + + "gracePeriodLength()"( + overrides?: CallOverrides + ): Promise; + + guildBank(overrides?: CallOverrides): Promise; + + "guildBank()"(overrides?: CallOverrides): Promise; + + hasVotingPeriodExpired( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "hasVotingPeriodExpired(uint256)"( + startingPeriod: BigNumberish, + overrides?: CallOverrides + ): Promise; + + memberAddressByDelegateKey( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "memberAddressByDelegateKey(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + members( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "members(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + periodDuration(overrides?: CallOverrides): Promise; + + "periodDuration()"( + overrides?: CallOverrides + ): Promise; + + processProposal( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "processProposal(uint256)"( + proposalIndex: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + processingReward(overrides?: CallOverrides): Promise; + + "processingReward()"( + overrides?: CallOverrides + ): Promise; + + proposalCount(overrides?: CallOverrides): Promise; + + "proposalCount()"(overrides?: CallOverrides): Promise; + + proposalDeposit(overrides?: CallOverrides): Promise; + + "proposalDeposit()"( + overrides?: CallOverrides + ): Promise; + + proposalQueue( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposalQueue(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposals( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "proposals(uint256)"( + arg0: BigNumberish, + overrides?: CallOverrides + ): Promise; + + proposedToKick( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "proposedToKick(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + proposedToWhitelist( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "proposedToWhitelist(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + ragequit( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "ragequit(uint256)"( + sharesToBurn: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + safeRagequit( + sharesToBurn: BigNumberish, + tokenList: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "safeRagequit(uint256,address[])"( + sharesToBurn: BigNumberish, + tokenList: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + sponsorProposal( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "sponsorProposal(uint256)"( + proposalId: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitGuildKickProposal( + memberToKick: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitGuildKickProposal(address,string)"( + memberToKick: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitProposal( + applicant: string, + sharesRequested: BigNumberish, + tributeOffered: BigNumberish, + tributeToken: string, + paymentRequested: BigNumberish, + paymentToken: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitProposal(address,uint256,uint256,address,uint256,address,string)"( + applicant: string, + sharesRequested: BigNumberish, + tributeOffered: BigNumberish, + tributeToken: string, + paymentRequested: BigNumberish, + paymentToken: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitVote( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitVote(uint256,uint8)"( + proposalIndex: BigNumberish, + uintVote: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + submitWhitelistProposal( + tokenToWhitelist: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "submitWhitelistProposal(address,string)"( + tokenToWhitelist: string, + details: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + summoningTime(overrides?: CallOverrides): Promise; + + "summoningTime()"(overrides?: CallOverrides): Promise; + + tokenWhitelist( + arg0: string, + overrides?: CallOverrides + ): Promise; + + "tokenWhitelist(address)"( + arg0: string, + overrides?: CallOverrides + ): Promise; + + totalShares(overrides?: CallOverrides): Promise; + + "totalShares()"(overrides?: CallOverrides): Promise; + + totalSharesRequested( + overrides?: CallOverrides + ): Promise; + + "totalSharesRequested()"( + overrides?: CallOverrides + ): Promise; + + updateDelegateKey( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateDelegateKey(address)"( + newDelegateKey: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + votingPeriodLength( + overrides?: CallOverrides + ): Promise; + + "votingPeriodLength()"( + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/Ownable.d.ts b/packages/chain-events/src/contractTypes/Ownable.d.ts new file mode 100644 index 00000000000..feeab2a85dd --- /dev/null +++ b/packages/chain-events/src/contractTypes/Ownable.d.ts @@ -0,0 +1,222 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface OwnableInterface extends ethers.utils.Interface { + functions: { + "owner()": FunctionFragment; + "renounceOwnership()": FunctionFragment; + "transferOwnership(address)": FunctionFragment; + }; + + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [string] + ): string; + + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + + events: { + "OwnershipTransferred(address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "OwnershipTransferred"): EventFragment; +} + +export class Ownable extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: OwnableInterface; + + functions: { + owner(overrides?: CallOverrides): Promise<[string]>; + + "owner()"(overrides?: CallOverrides): Promise<[string]>; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + renounceOwnership(overrides?: CallOverrides): Promise; + + "renounceOwnership()"(overrides?: CallOverrides): Promise; + + transferOwnership( + newOwner: string, + overrides?: CallOverrides + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + OwnershipTransferred( + previousOwner: string | null, + newOwner: string | null + ): TypedEventFilter< + [string, string], + { previousOwner: string; newOwner: string } + >; + }; + + estimateGas: { + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + owner(overrides?: CallOverrides): Promise; + + "owner()"(overrides?: CallOverrides): Promise; + + renounceOwnership( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceOwnership()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferOwnership( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferOwnership(address)"( + newOwner: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/ProposalValidator.d.ts b/packages/chain-events/src/contractTypes/ProposalValidator.d.ts new file mode 100644 index 00000000000..4f4d25e1068 --- /dev/null +++ b/packages/chain-events/src/contractTypes/ProposalValidator.d.ts @@ -0,0 +1,819 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ProposalValidatorInterface extends ethers.utils.Interface { + functions: { + "MINIMUM_QUORUM()": FunctionFragment; + "ONE_HUNDRED_WITH_PRECISION()": FunctionFragment; + "PROPOSITION_THRESHOLD()": FunctionFragment; + "VOTE_DIFFERENTIAL()": FunctionFragment; + "VOTING_DURATION()": FunctionFragment; + "getMinimumPropositionPowerNeeded(address,uint256)": FunctionFragment; + "getMinimumVotingPowerNeeded(uint256)": FunctionFragment; + "isProposalPassed(address,uint256)": FunctionFragment; + "isPropositionPowerEnough(address,address,uint256)": FunctionFragment; + "isQuorumValid(address,uint256)": FunctionFragment; + "isVoteDifferentialValid(address,uint256)": FunctionFragment; + "validateCreatorOfProposal(address,address,uint256)": FunctionFragment; + "validateProposalCancellation(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "MINIMUM_QUORUM", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ONE_HUNDRED_WITH_PRECISION", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PROPOSITION_THRESHOLD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "VOTE_DIFFERENTIAL", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "VOTING_DURATION", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getMinimumPropositionPowerNeeded", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getMinimumVotingPowerNeeded", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isProposalPassed", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isPropositionPowerEnough", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isQuorumValid", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isVoteDifferentialValid", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "validateCreatorOfProposal", + values: [string, string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "validateProposalCancellation", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "MINIMUM_QUORUM", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "ONE_HUNDRED_WITH_PRECISION", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PROPOSITION_THRESHOLD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "VOTE_DIFFERENTIAL", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "VOTING_DURATION", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getMinimumPropositionPowerNeeded", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getMinimumVotingPowerNeeded", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isProposalPassed", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isPropositionPowerEnough", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isQuorumValid", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isVoteDifferentialValid", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validateCreatorOfProposal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validateProposalCancellation", + data: BytesLike + ): Result; + + events: {}; +} + +export class ProposalValidator extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ProposalValidatorInterface; + + functions: { + MINIMUM_QUORUM(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MINIMUM_QUORUM()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + ONE_HUNDRED_WITH_PRECISION(overrides?: CallOverrides): Promise<[BigNumber]>; + + "ONE_HUNDRED_WITH_PRECISION()"( + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + PROPOSITION_THRESHOLD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "PROPOSITION_THRESHOLD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise<[BigNumber]>; + + "VOTE_DIFFERENTIAL()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + VOTING_DURATION(overrides?: CallOverrides): Promise<[BigNumber]>; + + "VOTING_DURATION()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + MINIMUM_QUORUM(overrides?: CallOverrides): Promise; + + "MINIMUM_QUORUM()"(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_WITH_PRECISION(overrides?: CallOverrides): Promise; + + "ONE_HUNDRED_WITH_PRECISION()"(overrides?: CallOverrides): Promise; + + PROPOSITION_THRESHOLD(overrides?: CallOverrides): Promise; + + "PROPOSITION_THRESHOLD()"(overrides?: CallOverrides): Promise; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise; + + "VOTE_DIFFERENTIAL()"(overrides?: CallOverrides): Promise; + + VOTING_DURATION(overrides?: CallOverrides): Promise; + + "VOTING_DURATION()"(overrides?: CallOverrides): Promise; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + callStatic: { + MINIMUM_QUORUM(overrides?: CallOverrides): Promise; + + "MINIMUM_QUORUM()"(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_WITH_PRECISION(overrides?: CallOverrides): Promise; + + "ONE_HUNDRED_WITH_PRECISION()"( + overrides?: CallOverrides + ): Promise; + + PROPOSITION_THRESHOLD(overrides?: CallOverrides): Promise; + + "PROPOSITION_THRESHOLD()"(overrides?: CallOverrides): Promise; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise; + + "VOTE_DIFFERENTIAL()"(overrides?: CallOverrides): Promise; + + VOTING_DURATION(overrides?: CallOverrides): Promise; + + "VOTING_DURATION()"(overrides?: CallOverrides): Promise; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + MINIMUM_QUORUM(overrides?: CallOverrides): Promise; + + "MINIMUM_QUORUM()"(overrides?: CallOverrides): Promise; + + ONE_HUNDRED_WITH_PRECISION(overrides?: CallOverrides): Promise; + + "ONE_HUNDRED_WITH_PRECISION()"( + overrides?: CallOverrides + ): Promise; + + PROPOSITION_THRESHOLD(overrides?: CallOverrides): Promise; + + "PROPOSITION_THRESHOLD()"(overrides?: CallOverrides): Promise; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise; + + "VOTE_DIFFERENTIAL()"(overrides?: CallOverrides): Promise; + + VOTING_DURATION(overrides?: CallOverrides): Promise; + + "VOTING_DURATION()"(overrides?: CallOverrides): Promise; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + MINIMUM_QUORUM(overrides?: CallOverrides): Promise; + + "MINIMUM_QUORUM()"( + overrides?: CallOverrides + ): Promise; + + ONE_HUNDRED_WITH_PRECISION( + overrides?: CallOverrides + ): Promise; + + "ONE_HUNDRED_WITH_PRECISION()"( + overrides?: CallOverrides + ): Promise; + + PROPOSITION_THRESHOLD( + overrides?: CallOverrides + ): Promise; + + "PROPOSITION_THRESHOLD()"( + overrides?: CallOverrides + ): Promise; + + VOTE_DIFFERENTIAL(overrides?: CallOverrides): Promise; + + "VOTE_DIFFERENTIAL()"( + overrides?: CallOverrides + ): Promise; + + VOTING_DURATION(overrides?: CallOverrides): Promise; + + "VOTING_DURATION()"( + overrides?: CallOverrides + ): Promise; + + getMinimumPropositionPowerNeeded( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumPropositionPowerNeeded(address,uint256)"( + governance: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + getMinimumVotingPowerNeeded( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "getMinimumVotingPowerNeeded(uint256)"( + votingSupply: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isProposalPassed( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isProposalPassed(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isPropositionPowerEnough( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isPropositionPowerEnough(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isQuorumValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isQuorumValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + isVoteDifferentialValid( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "isVoteDifferentialValid(address,uint256)"( + governance: string, + proposalId: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateCreatorOfProposal( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateCreatorOfProposal(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + validateProposalCancellation( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "validateProposalCancellation(address,address,uint256)"( + governance: string, + user: string, + blockNumber: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/Proxy.d.ts b/packages/chain-events/src/contractTypes/Proxy.d.ts new file mode 100644 index 00000000000..5ce451b419e --- /dev/null +++ b/packages/chain-events/src/contractTypes/Proxy.d.ts @@ -0,0 +1,78 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface ProxyInterface extends ethers.utils.Interface { + functions: {}; + + events: {}; +} + +export class Proxy extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: ProxyInterface; + + functions: {}; + + callStatic: {}; + + filters: {}; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/chain-events/src/contractTypes/SelfdestructTransfer.d.ts b/packages/chain-events/src/contractTypes/SelfdestructTransfer.d.ts new file mode 100644 index 00000000000..10c11ded01c --- /dev/null +++ b/packages/chain-events/src/contractTypes/SelfdestructTransfer.d.ts @@ -0,0 +1,139 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface SelfdestructTransferInterface extends ethers.utils.Interface { + functions: { + "destroyAndTransfer(address)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "destroyAndTransfer", + values: [string] + ): string; + + decodeFunctionResult( + functionFragment: "destroyAndTransfer", + data: BytesLike + ): Result; + + events: {}; +} + +export class SelfdestructTransfer extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: SelfdestructTransferInterface; + + functions: { + destroyAndTransfer( + to: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "destroyAndTransfer(address)"( + to: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; + + destroyAndTransfer( + to: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "destroyAndTransfer(address)"( + to: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + callStatic: { + destroyAndTransfer(to: string, overrides?: CallOverrides): Promise; + + "destroyAndTransfer(address)"( + to: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + destroyAndTransfer( + to: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "destroyAndTransfer(address)"( + to: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + destroyAndTransfer( + to: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "destroyAndTransfer(address)"( + to: string, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/Timelock.d.ts b/packages/chain-events/src/contractTypes/Timelock.d.ts new file mode 100644 index 00000000000..26dc6283899 --- /dev/null +++ b/packages/chain-events/src/contractTypes/Timelock.d.ts @@ -0,0 +1,842 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface TimelockInterface extends ethers.utils.Interface { + functions: { + "GRACE_PERIOD()": FunctionFragment; + "MAXIMUM_DELAY()": FunctionFragment; + "MINIMUM_DELAY()": FunctionFragment; + "acceptAdmin()": FunctionFragment; + "admin()": FunctionFragment; + "cancelTransaction(address,uint256,string,bytes,uint256)": FunctionFragment; + "delay()": FunctionFragment; + "executeTransaction(address,uint256,string,bytes,uint256)": FunctionFragment; + "pendingAdmin()": FunctionFragment; + "queueTransaction(address,uint256,string,bytes,uint256)": FunctionFragment; + "queuedTransactions(bytes32)": FunctionFragment; + "setDelay(uint256)": FunctionFragment; + "setPendingAdmin(address)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "GRACE_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAXIMUM_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MINIMUM_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "acceptAdmin", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData( + functionFragment: "cancelTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "delay", values?: undefined): string; + encodeFunctionData( + functionFragment: "executeTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "pendingAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "queueTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "queuedTransactions", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "setDelay", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setPendingAdmin", + values: [string] + ): string; + + decodeFunctionResult( + functionFragment: "GRACE_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAXIMUM_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MINIMUM_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "cancelTransaction", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeTransaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "pendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "queueTransaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "queuedTransactions", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setDelay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setPendingAdmin", + data: BytesLike + ): Result; + + events: { + "CancelTransaction(bytes32,address,uint256,string,bytes,uint256)": EventFragment; + "ExecuteTransaction(bytes32,address,uint256,string,bytes,uint256)": EventFragment; + "NewAdmin(address)": EventFragment; + "NewDelay(uint256)": EventFragment; + "NewPendingAdmin(address)": EventFragment; + "QueueTransaction(bytes32,address,uint256,string,bytes,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "CancelTransaction"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecuteTransaction"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewDelay"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewPendingAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "QueueTransaction"): EventFragment; +} + +export class Timelock extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: TimelockInterface; + + functions: { + GRACE_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise<[string]>; + + "admin()"(overrides?: CallOverrides): Promise<[string]>; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "delay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + "pendingAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + setDelay( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDelay( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin(overrides?: CallOverrides): Promise; + + "acceptAdmin()"(overrides?: CallOverrides): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDelay(delay_: BigNumberish, overrides?: CallOverrides): Promise; + + "setDelay(uint256)"( + delay_: BigNumberish, + overrides?: CallOverrides + ): Promise; + + setPendingAdmin( + pendingAdmin_: string, + overrides?: CallOverrides + ): Promise; + + "setPendingAdmin(address)"( + pendingAdmin_: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + CancelTransaction( + txHash: BytesLike | null, + target: string | null, + value: null, + signature: null, + data: null, + eta: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber], + { + txHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + eta: BigNumber; + } + >; + + ExecuteTransaction( + txHash: BytesLike | null, + target: string | null, + value: null, + signature: null, + data: null, + eta: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber], + { + txHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + eta: BigNumber; + } + >; + + NewAdmin( + newAdmin: string | null + ): TypedEventFilter<[string], { newAdmin: string }>; + + NewDelay( + newDelay: BigNumberish | null + ): TypedEventFilter<[BigNumber], { newDelay: BigNumber }>; + + NewPendingAdmin( + newPendingAdmin: string | null + ): TypedEventFilter<[string], { newPendingAdmin: string }>; + + QueueTransaction( + txHash: BytesLike | null, + target: string | null, + value: null, + signature: null, + data: null, + eta: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber], + { + txHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + eta: BigNumber; + } + >; + }; + + estimateGas: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDelay( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDelay( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/TimelockController.d.ts b/packages/chain-events/src/contractTypes/TimelockController.d.ts new file mode 100644 index 00000000000..9ad3fca19a7 --- /dev/null +++ b/packages/chain-events/src/contractTypes/TimelockController.d.ts @@ -0,0 +1,1704 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface TimelockControllerInterface extends ethers.utils.Interface { + functions: { + "DEFAULT_ADMIN_ROLE()": FunctionFragment; + "EXECUTOR_ROLE()": FunctionFragment; + "PROPOSER_ROLE()": FunctionFragment; + "TIMELOCK_ADMIN_ROLE()": FunctionFragment; + "cancel(bytes32)": FunctionFragment; + "execute(address,uint256,bytes,bytes32,bytes32)": FunctionFragment; + "executeBatch(address[],uint256[],bytes[],bytes32,bytes32)": FunctionFragment; + "getMinDelay()": FunctionFragment; + "getRoleAdmin(bytes32)": FunctionFragment; + "getTimestamp(bytes32)": FunctionFragment; + "grantRole(bytes32,address)": FunctionFragment; + "hasRole(bytes32,address)": FunctionFragment; + "hashOperation(address,uint256,bytes,bytes32,bytes32)": FunctionFragment; + "hashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32)": FunctionFragment; + "isOperation(bytes32)": FunctionFragment; + "isOperationDone(bytes32)": FunctionFragment; + "isOperationPending(bytes32)": FunctionFragment; + "isOperationReady(bytes32)": FunctionFragment; + "renounceRole(bytes32,address)": FunctionFragment; + "revokeRole(bytes32,address)": FunctionFragment; + "schedule(address,uint256,bytes,bytes32,bytes32,uint256)": FunctionFragment; + "scheduleBatch(address[],uint256[],bytes[],bytes32,bytes32,uint256)": FunctionFragment; + "supportsInterface(bytes4)": FunctionFragment; + "updateDelay(uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "DEFAULT_ADMIN_ROLE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "EXECUTOR_ROLE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "PROPOSER_ROLE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "TIMELOCK_ADMIN_ROLE", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "cancel", values: [BytesLike]): string; + encodeFunctionData( + functionFragment: "execute", + values: [string, BigNumberish, BytesLike, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "executeBatch", + values: [string[], BigNumberish[], BytesLike[], BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getMinDelay", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getRoleAdmin", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getTimestamp", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "grantRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "hasRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "hashOperation", + values: [string, BigNumberish, BytesLike, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "hashOperationBatch", + values: [string[], BigNumberish[], BytesLike[], BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "isOperation", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "isOperationDone", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "isOperationPending", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "isOperationReady", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "renounceRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "revokeRole", + values: [BytesLike, string] + ): string; + encodeFunctionData( + functionFragment: "schedule", + values: [ + string, + BigNumberish, + BytesLike, + BytesLike, + BytesLike, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "scheduleBatch", + values: [ + string[], + BigNumberish[], + BytesLike[], + BytesLike, + BytesLike, + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "supportsInterface", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "updateDelay", + values: [BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "DEFAULT_ADMIN_ROLE", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "EXECUTOR_ROLE", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "PROPOSER_ROLE", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "TIMELOCK_ADMIN_ROLE", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "cancel", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "execute", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getMinDelay", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRoleAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTimestamp", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "grantRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "hasRole", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "hashOperation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "hashOperationBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isOperation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isOperationDone", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isOperationPending", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isOperationReady", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceRole", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "revokeRole", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "schedule", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "scheduleBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "supportsInterface", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateDelay", + data: BytesLike + ): Result; + + events: { + "CallExecuted(bytes32,uint256,address,uint256,bytes)": EventFragment; + "CallScheduled(bytes32,uint256,address,uint256,bytes,bytes32,uint256)": EventFragment; + "Cancelled(bytes32)": EventFragment; + "MinDelayChange(uint256,uint256)": EventFragment; + "RoleAdminChanged(bytes32,bytes32,bytes32)": EventFragment; + "RoleGranted(bytes32,address,address)": EventFragment; + "RoleRevoked(bytes32,address,address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "CallExecuted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "CallScheduled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Cancelled"): EventFragment; + getEvent(nameOrSignatureOrTopic: "MinDelayChange"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleAdminChanged"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleGranted"): EventFragment; + getEvent(nameOrSignatureOrTopic: "RoleRevoked"): EventFragment; +} + +export class TimelockController extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: TimelockControllerInterface; + + functions: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise<[string]>; + + "DEFAULT_ADMIN_ROLE()"(overrides?: CallOverrides): Promise<[string]>; + + EXECUTOR_ROLE(overrides?: CallOverrides): Promise<[string]>; + + "EXECUTOR_ROLE()"(overrides?: CallOverrides): Promise<[string]>; + + PROPOSER_ROLE(overrides?: CallOverrides): Promise<[string]>; + + "PROPOSER_ROLE()"(overrides?: CallOverrides): Promise<[string]>; + + TIMELOCK_ADMIN_ROLE(overrides?: CallOverrides): Promise<[string]>; + + "TIMELOCK_ADMIN_ROLE()"(overrides?: CallOverrides): Promise<[string]>; + + cancel( + id: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(bytes32)"( + id: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address,uint256,bytes,bytes32,bytes32)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + executeBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeBatch(address[],uint256[],bytes[],bytes32,bytes32)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getMinDelay( + overrides?: CallOverrides + ): Promise<[BigNumber] & { duration: BigNumber }>; + + "getMinDelay()"( + overrides?: CallOverrides + ): Promise<[BigNumber] & { duration: BigNumber }>; + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise<[string]>; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise<[string]>; + + getTimestamp( + id: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber] & { timestamp: BigNumber }>; + + "getTimestamp(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise<[BigNumber] & { timestamp: BigNumber }>; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise<[boolean]>; + + hashOperation( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise<[string] & { hash: string }>; + + "hashOperation(address,uint256,bytes,bytes32,bytes32)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise<[string] & { hash: string }>; + + hashOperationBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise<[string] & { hash: string }>; + + "hashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise<[string] & { hash: string }>; + + isOperation( + id: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean] & { pending: boolean }>; + + "isOperation(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean] & { pending: boolean }>; + + isOperationDone( + id: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean] & { done: boolean }>; + + "isOperationDone(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean] & { done: boolean }>; + + isOperationPending( + id: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean] & { pending: boolean }>; + + "isOperationPending(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean] & { pending: boolean }>; + + isOperationReady( + id: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean] & { ready: boolean }>; + + "isOperationReady(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean] & { ready: boolean }>; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + schedule( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "schedule(address,uint256,bytes,bytes32,bytes32,uint256)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + scheduleBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "scheduleBatch(address[],uint256[],bytes[],bytes32,bytes32,uint256)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + updateDelay( + newDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateDelay(uint256)"( + newDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + "DEFAULT_ADMIN_ROLE()"(overrides?: CallOverrides): Promise; + + EXECUTOR_ROLE(overrides?: CallOverrides): Promise; + + "EXECUTOR_ROLE()"(overrides?: CallOverrides): Promise; + + PROPOSER_ROLE(overrides?: CallOverrides): Promise; + + "PROPOSER_ROLE()"(overrides?: CallOverrides): Promise; + + TIMELOCK_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + "TIMELOCK_ADMIN_ROLE()"(overrides?: CallOverrides): Promise; + + cancel( + id: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(bytes32)"( + id: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address,uint256,bytes,bytes32,bytes32)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + executeBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeBatch(address[],uint256[],bytes[],bytes32,bytes32)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getMinDelay(overrides?: CallOverrides): Promise; + + "getMinDelay()"(overrides?: CallOverrides): Promise; + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + getTimestamp(id: BytesLike, overrides?: CallOverrides): Promise; + + "getTimestamp(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + hashOperation( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashOperation(address,uint256,bytes,bytes32,bytes32)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + hashOperationBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperation(id: BytesLike, overrides?: CallOverrides): Promise; + + "isOperation(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperationDone(id: BytesLike, overrides?: CallOverrides): Promise; + + "isOperationDone(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperationPending( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isOperationPending(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperationReady(id: BytesLike, overrides?: CallOverrides): Promise; + + "isOperationReady(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + schedule( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "schedule(address,uint256,bytes,bytes32,bytes32,uint256)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + scheduleBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "scheduleBatch(address[],uint256[],bytes[],bytes32,bytes32,uint256)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + updateDelay( + newDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateDelay(uint256)"( + newDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + "DEFAULT_ADMIN_ROLE()"(overrides?: CallOverrides): Promise; + + EXECUTOR_ROLE(overrides?: CallOverrides): Promise; + + "EXECUTOR_ROLE()"(overrides?: CallOverrides): Promise; + + PROPOSER_ROLE(overrides?: CallOverrides): Promise; + + "PROPOSER_ROLE()"(overrides?: CallOverrides): Promise; + + TIMELOCK_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + "TIMELOCK_ADMIN_ROLE()"(overrides?: CallOverrides): Promise; + + cancel(id: BytesLike, overrides?: CallOverrides): Promise; + + "cancel(bytes32)"(id: BytesLike, overrides?: CallOverrides): Promise; + + execute( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + "execute(address,uint256,bytes,bytes32,bytes32)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + executeBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + "executeBatch(address[],uint256[],bytes[],bytes32,bytes32)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + getMinDelay(overrides?: CallOverrides): Promise; + + "getMinDelay()"(overrides?: CallOverrides): Promise; + + getRoleAdmin(role: BytesLike, overrides?: CallOverrides): Promise; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + getTimestamp(id: BytesLike, overrides?: CallOverrides): Promise; + + "getTimestamp(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + hashOperation( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashOperation(address,uint256,bytes,bytes32,bytes32)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + hashOperationBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperation(id: BytesLike, overrides?: CallOverrides): Promise; + + "isOperation(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperationDone(id: BytesLike, overrides?: CallOverrides): Promise; + + "isOperationDone(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperationPending( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isOperationPending(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperationReady( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isOperationReady(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + schedule( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "schedule(address,uint256,bytes,bytes32,bytes32,uint256)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + scheduleBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "scheduleBatch(address[],uint256[],bytes[],bytes32,bytes32,uint256)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + updateDelay( + newDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "updateDelay(uint256)"( + newDelay: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + CallExecuted( + id: BytesLike | null, + index: BigNumberish | null, + target: null, + value: null, + data: null + ): TypedEventFilter< + [string, BigNumber, string, BigNumber, string], + { + id: string; + index: BigNumber; + target: string; + value: BigNumber; + data: string; + } + >; + + CallScheduled( + id: BytesLike | null, + index: BigNumberish | null, + target: null, + value: null, + data: null, + predecessor: null, + delay: null + ): TypedEventFilter< + [string, BigNumber, string, BigNumber, string, string, BigNumber], + { + id: string; + index: BigNumber; + target: string; + value: BigNumber; + data: string; + predecessor: string; + delay: BigNumber; + } + >; + + Cancelled(id: BytesLike | null): TypedEventFilter<[string], { id: string }>; + + MinDelayChange( + oldDuration: null, + newDuration: null + ): TypedEventFilter< + [BigNumber, BigNumber], + { oldDuration: BigNumber; newDuration: BigNumber } + >; + + RoleAdminChanged( + role: BytesLike | null, + previousAdminRole: BytesLike | null, + newAdminRole: BytesLike | null + ): TypedEventFilter< + [string, string, string], + { role: string; previousAdminRole: string; newAdminRole: string } + >; + + RoleGranted( + role: BytesLike | null, + account: string | null, + sender: string | null + ): TypedEventFilter< + [string, string, string], + { role: string; account: string; sender: string } + >; + + RoleRevoked( + role: BytesLike | null, + account: string | null, + sender: string | null + ): TypedEventFilter< + [string, string, string], + { role: string; account: string; sender: string } + >; + }; + + estimateGas: { + DEFAULT_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + "DEFAULT_ADMIN_ROLE()"(overrides?: CallOverrides): Promise; + + EXECUTOR_ROLE(overrides?: CallOverrides): Promise; + + "EXECUTOR_ROLE()"(overrides?: CallOverrides): Promise; + + PROPOSER_ROLE(overrides?: CallOverrides): Promise; + + "PROPOSER_ROLE()"(overrides?: CallOverrides): Promise; + + TIMELOCK_ADMIN_ROLE(overrides?: CallOverrides): Promise; + + "TIMELOCK_ADMIN_ROLE()"(overrides?: CallOverrides): Promise; + + cancel( + id: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(bytes32)"( + id: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address,uint256,bytes,bytes32,bytes32)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + executeBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeBatch(address[],uint256[],bytes[],bytes32,bytes32)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getMinDelay(overrides?: CallOverrides): Promise; + + "getMinDelay()"(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + getTimestamp(id: BytesLike, overrides?: CallOverrides): Promise; + + "getTimestamp(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + hashOperation( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashOperation(address,uint256,bytes,bytes32,bytes32)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + hashOperationBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperation(id: BytesLike, overrides?: CallOverrides): Promise; + + "isOperation(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperationDone( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isOperationDone(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperationPending( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isOperationPending(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperationReady( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isOperationReady(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + schedule( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "schedule(address,uint256,bytes,bytes32,bytes32,uint256)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + scheduleBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "scheduleBatch(address[],uint256[],bytes[],bytes32,bytes32,uint256)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + updateDelay( + newDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateDelay(uint256)"( + newDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + DEFAULT_ADMIN_ROLE( + overrides?: CallOverrides + ): Promise; + + "DEFAULT_ADMIN_ROLE()"( + overrides?: CallOverrides + ): Promise; + + EXECUTOR_ROLE(overrides?: CallOverrides): Promise; + + "EXECUTOR_ROLE()"(overrides?: CallOverrides): Promise; + + PROPOSER_ROLE(overrides?: CallOverrides): Promise; + + "PROPOSER_ROLE()"(overrides?: CallOverrides): Promise; + + TIMELOCK_ADMIN_ROLE( + overrides?: CallOverrides + ): Promise; + + "TIMELOCK_ADMIN_ROLE()"( + overrides?: CallOverrides + ): Promise; + + cancel( + id: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancel(bytes32)"( + id: BytesLike, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + execute( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "execute(address,uint256,bytes,bytes32,bytes32)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + executeBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeBatch(address[],uint256[],bytes[],bytes32,bytes32)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + getMinDelay(overrides?: CallOverrides): Promise; + + "getMinDelay()"(overrides?: CallOverrides): Promise; + + getRoleAdmin( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + "getRoleAdmin(bytes32)"( + role: BytesLike, + overrides?: CallOverrides + ): Promise; + + getTimestamp( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + "getTimestamp(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + grantRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "grantRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + hasRole( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + "hasRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: CallOverrides + ): Promise; + + hashOperation( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashOperation(address,uint256,bytes,bytes32,bytes32)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + hashOperationBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + "hashOperationBatch(address[],uint256[],bytes[],bytes32,bytes32)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperation( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isOperation(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperationDone( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isOperationDone(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperationPending( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isOperationPending(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + isOperationReady( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + "isOperationReady(bytes32)"( + id: BytesLike, + overrides?: CallOverrides + ): Promise; + + renounceRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "renounceRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + revokeRole( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "revokeRole(bytes32,address)"( + role: BytesLike, + account: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + schedule( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "schedule(address,uint256,bytes,bytes32,bytes32,uint256)"( + target: string, + value: BigNumberish, + data: BytesLike, + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + scheduleBatch( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "scheduleBatch(address[],uint256[],bytes[],bytes32,bytes32,uint256)"( + targets: string[], + values: BigNumberish[], + datas: BytesLike[], + predecessor: BytesLike, + salt: BytesLike, + delay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + supportsInterface( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + "supportsInterface(bytes4)"( + interfaceId: BytesLike, + overrides?: CallOverrides + ): Promise; + + updateDelay( + newDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "updateDelay(uint256)"( + newDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/TimelockInterface.d.ts b/packages/chain-events/src/contractTypes/TimelockInterface.d.ts new file mode 100644 index 00000000000..7b8d729ea4a --- /dev/null +++ b/packages/chain-events/src/contractTypes/TimelockInterface.d.ts @@ -0,0 +1,537 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface TimelockInterfaceInterface extends ethers.utils.Interface { + functions: { + "GRACE_PERIOD()": FunctionFragment; + "acceptAdmin()": FunctionFragment; + "cancelTransaction(address,uint256,string,bytes,uint256)": FunctionFragment; + "delay()": FunctionFragment; + "executeTransaction(address,uint256,string,bytes,uint256)": FunctionFragment; + "queueTransaction(address,uint256,string,bytes,uint256)": FunctionFragment; + "queuedTransactions(bytes32)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "GRACE_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "acceptAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "cancelTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "delay", values?: undefined): string; + encodeFunctionData( + functionFragment: "executeTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "queueTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "queuedTransactions", + values: [BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "GRACE_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "cancelTransaction", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeTransaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "queueTransaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "queuedTransactions", + data: BytesLike + ): Result; + + events: {}; +} + +export class TimelockInterface extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: TimelockInterfaceInterface; + + functions: { + GRACE_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "delay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + hash: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "queuedTransactions(bytes32)"( + hash: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + }; + + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + hash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + hash: BytesLike, + overrides?: CallOverrides + ): Promise; + + callStatic: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + acceptAdmin(overrides?: CallOverrides): Promise; + + "acceptAdmin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queuedTransactions( + hash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + hash: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + filters: {}; + + estimateGas: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + hash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + hash: BytesLike, + overrides?: CallOverrides + ): Promise; + }; + + populateTransaction: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + hash: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + hash: BytesLike, + overrides?: CallOverrides + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/TimelockMock.d.ts b/packages/chain-events/src/contractTypes/TimelockMock.d.ts new file mode 100644 index 00000000000..70a1238c1e9 --- /dev/null +++ b/packages/chain-events/src/contractTypes/TimelockMock.d.ts @@ -0,0 +1,842 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + PayableOverrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface TimelockMockInterface extends ethers.utils.Interface { + functions: { + "GRACE_PERIOD()": FunctionFragment; + "MAXIMUM_DELAY()": FunctionFragment; + "MINIMUM_DELAY()": FunctionFragment; + "acceptAdmin()": FunctionFragment; + "admin()": FunctionFragment; + "cancelTransaction(address,uint256,string,bytes,uint256)": FunctionFragment; + "delay()": FunctionFragment; + "executeTransaction(address,uint256,string,bytes,uint256)": FunctionFragment; + "pendingAdmin()": FunctionFragment; + "queueTransaction(address,uint256,string,bytes,uint256)": FunctionFragment; + "queuedTransactions(bytes32)": FunctionFragment; + "setDelay(uint256)": FunctionFragment; + "setPendingAdmin(address)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "GRACE_PERIOD", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MAXIMUM_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "MINIMUM_DELAY", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "acceptAdmin", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "admin", values?: undefined): string; + encodeFunctionData( + functionFragment: "cancelTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "delay", values?: undefined): string; + encodeFunctionData( + functionFragment: "executeTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "pendingAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "queueTransaction", + values: [string, BigNumberish, string, BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "queuedTransactions", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "setDelay", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setPendingAdmin", + values: [string] + ): string; + + decodeFunctionResult( + functionFragment: "GRACE_PERIOD", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MAXIMUM_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "MINIMUM_DELAY", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "admin", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "cancelTransaction", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "delay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "executeTransaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "pendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "queueTransaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "queuedTransactions", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "setDelay", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setPendingAdmin", + data: BytesLike + ): Result; + + events: { + "CancelTransaction(bytes32,address,uint256,string,bytes,uint256)": EventFragment; + "ExecuteTransaction(bytes32,address,uint256,string,bytes,uint256)": EventFragment; + "NewAdmin(address)": EventFragment; + "NewDelay(uint256)": EventFragment; + "NewPendingAdmin(address)": EventFragment; + "QueueTransaction(bytes32,address,uint256,string,bytes,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "CancelTransaction"): EventFragment; + getEvent(nameOrSignatureOrTopic: "ExecuteTransaction"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewDelay"): EventFragment; + getEvent(nameOrSignatureOrTopic: "NewPendingAdmin"): EventFragment; + getEvent(nameOrSignatureOrTopic: "QueueTransaction"): EventFragment; +} + +export class TimelockMock extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: TimelockMockInterface; + + functions: { + GRACE_PERIOD(overrides?: CallOverrides): Promise<[BigNumber]>; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise<[BigNumber]>; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise<[string]>; + + "admin()"(overrides?: CallOverrides): Promise<[string]>; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise<[BigNumber]>; + + "delay()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise<[string]>; + + "pendingAdmin()"(overrides?: CallOverrides): Promise<[string]>; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise<[boolean]>; + + setDelay( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDelay( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin(overrides?: CallOverrides): Promise; + + "acceptAdmin()"(overrides?: CallOverrides): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: CallOverrides + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDelay(delay_: BigNumberish, overrides?: CallOverrides): Promise; + + "setDelay(uint256)"( + delay_: BigNumberish, + overrides?: CallOverrides + ): Promise; + + setPendingAdmin( + pendingAdmin_: string, + overrides?: CallOverrides + ): Promise; + + "setPendingAdmin(address)"( + pendingAdmin_: string, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + CancelTransaction( + txHash: BytesLike | null, + target: string | null, + value: null, + signature: null, + data: null, + eta: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber], + { + txHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + eta: BigNumber; + } + >; + + ExecuteTransaction( + txHash: BytesLike | null, + target: string | null, + value: null, + signature: null, + data: null, + eta: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber], + { + txHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + eta: BigNumber; + } + >; + + NewAdmin( + newAdmin: string | null + ): TypedEventFilter<[string], { newAdmin: string }>; + + NewDelay( + newDelay: BigNumberish | null + ): TypedEventFilter<[BigNumber], { newDelay: BigNumber }>; + + NewPendingAdmin( + newPendingAdmin: string | null + ): TypedEventFilter<[string], { newPendingAdmin: string }>; + + QueueTransaction( + txHash: BytesLike | null, + target: string | null, + value: null, + signature: null, + data: null, + eta: null + ): TypedEventFilter< + [string, string, BigNumber, string, string, BigNumber], + { + txHash: string; + target: string; + value: BigNumber; + signature: string; + data: string; + eta: BigNumber; + } + >; + }; + + estimateGas: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDelay( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + GRACE_PERIOD(overrides?: CallOverrides): Promise; + + "GRACE_PERIOD()"(overrides?: CallOverrides): Promise; + + MAXIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MAXIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + MINIMUM_DELAY(overrides?: CallOverrides): Promise; + + "MINIMUM_DELAY()"(overrides?: CallOverrides): Promise; + + acceptAdmin( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "acceptAdmin()"( + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + admin(overrides?: CallOverrides): Promise; + + "admin()"(overrides?: CallOverrides): Promise; + + cancelTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "cancelTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + delay(overrides?: CallOverrides): Promise; + + "delay()"(overrides?: CallOverrides): Promise; + + executeTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + "executeTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise; + + pendingAdmin(overrides?: CallOverrides): Promise; + + "pendingAdmin()"(overrides?: CallOverrides): Promise; + + queueTransaction( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "queueTransaction(address,uint256,string,bytes,uint256)"( + target: string, + value: BigNumberish, + signature: string, + data: BytesLike, + eta: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + queuedTransactions( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + "queuedTransactions(bytes32)"( + arg0: BytesLike, + overrides?: CallOverrides + ): Promise; + + setDelay( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setDelay(uint256)"( + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + setPendingAdmin( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "setPendingAdmin(address)"( + pendingAdmin_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/Token.d.ts b/packages/chain-events/src/contractTypes/Token.d.ts new file mode 100644 index 00000000000..b24420a70c7 --- /dev/null +++ b/packages/chain-events/src/contractTypes/Token.d.ts @@ -0,0 +1,592 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, + Overrides, + CallOverrides, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface TokenInterface extends ethers.utils.Interface { + functions: { + "allowance(address,address)": FunctionFragment; + "approve(address,uint256)": FunctionFragment; + "balanceOf(address)": FunctionFragment; + "decreaseAllowance(address,uint256)": FunctionFragment; + "increaseAllowance(address,uint256)": FunctionFragment; + "totalSupply()": FunctionFragment; + "transfer(address,uint256)": FunctionFragment; + "transferFrom(address,address,uint256)": FunctionFragment; + }; + + encodeFunctionData( + functionFragment: "allowance", + values: [string, string] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [string, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "balanceOf", values: [string]): string; + encodeFunctionData( + functionFragment: "decreaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseAllowance", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [string, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [string, string, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "decreaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseAllowance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; + + events: { + "Approval(address,address,uint256)": EventFragment; + "Transfer(address,address,uint256)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Approval"): EventFragment; + getEvent(nameOrSignatureOrTopic: "Transfer"): EventFragment; +} + +export class Token extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: TokenInterface; + + functions: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise<[BigNumber]>; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise<[BigNumber]>; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise<[BigNumber]>; + + "totalSupply()"(overrides?: CallOverrides): Promise<[BigNumber]>; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + callStatic: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: CallOverrides + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: CallOverrides + ): Promise; + }; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { owner: string; spender: string; value: BigNumber } + >; + + Transfer( + from: string | null, + to: string | null, + value: null + ): TypedEventFilter< + [string, string, BigNumber], + { from: string; to: string; value: BigNumber } + >; + }; + + estimateGas: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf(owner: string, overrides?: CallOverrides): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; + + populateTransaction: { + allowance( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + "allowance(address,address)"( + owner: string, + spender: string, + overrides?: CallOverrides + ): Promise; + + approve( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "approve(address,uint256)"( + spender: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + balanceOf( + owner: string, + overrides?: CallOverrides + ): Promise; + + "balanceOf(address)"( + owner: string, + overrides?: CallOverrides + ): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "decreaseAllowance(address,uint256)"( + spender: string, + subtractedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "increaseAllowance(address,uint256)"( + spender: string, + addedValue: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + totalSupply(overrides?: CallOverrides): Promise; + + "totalSupply()"(overrides?: CallOverrides): Promise; + + transfer( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transfer(address,uint256)"( + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + transferFrom( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + + "transferFrom(address,address,uint256)"( + from: string, + to: string, + value: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise; + }; +} diff --git a/packages/chain-events/src/contractTypes/UpgradeabilityProxy.d.ts b/packages/chain-events/src/contractTypes/UpgradeabilityProxy.d.ts new file mode 100644 index 00000000000..1f5b02c0703 --- /dev/null +++ b/packages/chain-events/src/contractTypes/UpgradeabilityProxy.d.ts @@ -0,0 +1,86 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + ethers, + EventFilter, + Signer, + BigNumber, + BigNumberish, + PopulatedTransaction, + Contract, + ContractTransaction, +} from "ethers"; +import { BytesLike } from "@ethersproject/bytes"; +import { Listener, Provider } from "@ethersproject/providers"; +import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi"; +import { TypedEventFilter, TypedEvent, TypedListener } from "./commons"; + +interface UpgradeabilityProxyInterface extends ethers.utils.Interface { + functions: {}; + + events: { + "Upgraded(address)": EventFragment; + }; + + getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment; +} + +export class UpgradeabilityProxy extends Contract { + connect(signerOrProvider: Signer | Provider | string): this; + attach(addressOrName: string): this; + deployed(): Promise; + + listeners, EventArgsObject>( + eventFilter?: TypedEventFilter + ): Array>; + off, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + on, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + once, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeListener, EventArgsObject>( + eventFilter: TypedEventFilter, + listener: TypedListener + ): this; + removeAllListeners, EventArgsObject>( + eventFilter: TypedEventFilter + ): this; + + listeners(eventName?: string): Array; + off(eventName: string, listener: Listener): this; + on(eventName: string, listener: Listener): this; + once(eventName: string, listener: Listener): this; + removeListener(eventName: string, listener: Listener): this; + removeAllListeners(eventName?: string): this; + + queryFilter, EventArgsObject>( + event: TypedEventFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + interface: UpgradeabilityProxyInterface; + + functions: {}; + + callStatic: {}; + + filters: { + Upgraded( + implementation: string | null + ): TypedEventFilter<[string], { implementation: string }>; + }; + + estimateGas: {}; + + populateTransaction: {}; +} diff --git a/packages/chain-events/src/contractTypes/commons.ts b/packages/chain-events/src/contractTypes/commons.ts new file mode 100644 index 00000000000..19e82c08cb6 --- /dev/null +++ b/packages/chain-events/src/contractTypes/commons.ts @@ -0,0 +1,21 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { EventFilter, Event } from "ethers"; +import { Result } from "@ethersproject/abi"; + +export interface TypedEventFilter<_EventArgsArray, _EventArgsObject> + extends EventFilter {} + +export interface TypedEvent extends Event { + args: EventArgs; +} + +export type TypedListener, EventArgsObject> = + ( + ...listenerArg: [ + ...EventArgsArray, + TypedEvent + ] + ) => void; diff --git a/packages/chain-events/src/contractTypes/factories/AaveGovernanceV2__factory.ts b/packages/chain-events/src/contractTypes/factories/AaveGovernanceV2__factory.ts new file mode 100644 index 00000000000..2465715b00a --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/AaveGovernanceV2__factory.ts @@ -0,0 +1,847 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { AaveGovernanceV2 } from "../AaveGovernanceV2"; + +export class AaveGovernanceV2__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + governanceStrategy: string, + votingDelay: BigNumberish, + guardian: string, + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + governanceStrategy, + votingDelay, + guardian, + executors, + overrides || {} + ) as Promise; + } + getDeployTransaction( + governanceStrategy: string, + votingDelay: BigNumberish, + guardian: string, + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + governanceStrategy, + votingDelay, + guardian, + executors, + overrides || {} + ); + } + attach(address: string): AaveGovernanceV2 { + return super.attach(address) as AaveGovernanceV2; + } + connect(signer: Signer): AaveGovernanceV2__factory { + return super.connect(signer) as AaveGovernanceV2__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): AaveGovernanceV2 { + return new Contract(address, _abi, signerOrProvider) as AaveGovernanceV2; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "governanceStrategy", + type: "address", + }, + { + internalType: "uint256", + name: "votingDelay", + type: "uint256", + }, + { + internalType: "address", + name: "guardian", + type: "address", + }, + { + internalType: "address[]", + name: "executors", + type: "address[]", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "executor", + type: "address", + }, + ], + name: "ExecutorAuthorized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "executor", + type: "address", + }, + ], + name: "ExecutorUnauthorized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "newStrategy", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "initiatorChange", + type: "address", + }, + ], + name: "GovernanceStrategyChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "creator", + type: "address", + }, + { + indexed: true, + internalType: "contract IExecutorWithTimelock", + name: "executor", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "bool[]", + name: "withDelegatecalls", + type: "bool[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "strategy", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "ipfsHash", + type: "bytes32", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "initiatorExecution", + type: "address", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "initiatorQueueing", + type: "address", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "support", + type: "bool", + }, + { + indexed: false, + internalType: "uint256", + name: "votingPower", + type: "uint256", + }, + ], + name: "VoteEmitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "newVotingDelay", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "initiatorChange", + type: "address", + }, + ], + name: "VotingDelayChanged", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "NAME", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "VOTE_EMITTED_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "__abdicate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "executors", + type: "address[]", + }, + ], + name: "authorizeExecutors", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "cancel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IExecutorWithTimelock", + name: "executor", + type: "address", + }, + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bool[]", + name: "withDelegatecalls", + type: "bool[]", + }, + { + internalType: "bytes32", + name: "ipfsHash", + type: "bytes32", + }, + ], + name: "create", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "execute", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "getGovernanceStrategy", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getGuardian", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getProposalById", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "creator", + type: "address", + }, + { + internalType: "contract IExecutorWithTimelock", + name: "executor", + type: "address", + }, + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bool[]", + name: "withDelegatecalls", + type: "bool[]", + }, + { + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + { + internalType: "bool", + name: "canceled", + type: "bool", + }, + { + internalType: "address", + name: "strategy", + type: "address", + }, + { + internalType: "bytes32", + name: "ipfsHash", + type: "bytes32", + }, + ], + internalType: "struct IAaveGovernanceV2.ProposalWithoutVotes", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getProposalState", + outputs: [ + { + internalType: "enum IAaveGovernanceV2.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getProposalsCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "getVoteOnProposal", + outputs: [ + { + components: [ + { + internalType: "bool", + name: "support", + type: "bool", + }, + { + internalType: "uint248", + name: "votingPower", + type: "uint248", + }, + ], + internalType: "struct IAaveGovernanceV2.Vote", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getVotingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + ], + name: "isExecutorAuthorized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "queue", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "governanceStrategy", + type: "address", + }, + ], + name: "setGovernanceStrategy", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "votingDelay", + type: "uint256", + }, + ], + name: "setVotingDelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "bool", + name: "support", + type: "bool", + }, + ], + name: "submitVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "bool", + name: "support", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "submitVoteBySignature", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "executors", + type: "address[]", + }, + ], + name: "unauthorizeExecutors", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b50604051620036173803806200361783398101604081905262000034916200028e565b600062000040620000d0565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506200009584620000d4565b620000a08362000121565b600680546001600160a01b0319166001600160a01b038416179055620000c68162000165565b50505050620003b1565b3390565b600180546001600160a01b0319166001600160a01b0383169081179091556040513391907f9e8e9f668db69a2cefb172dabe284d0d3aea2b7ee64212a205bd033bd03a3d5590600090a350565b600281905560405133907fc46fc23e244f0720a98ddbac6efb5bb40d212cf15e6478fc4b3017648715289d906200015a90849062000384565b60405180910390a250565b6200016f620000d0565b6000546001600160a01b03908116911614620001d2576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60005b81518110156200020d5762000204828281518110620001f057fe5b60200260200101516200021160201b60201c565b600101620001d5565b5050565b6001600160a01b03811660009081526005602052604090819020805460ff19166001179055517f52762435f58790076157ea2a4914a5a4d0aa0eb421588891377692f7fd3bc082906200026690839062000370565b60405180910390a150565b80516001600160a01b03811681146200028957600080fd5b919050565b60008060008060808587031215620002a4578384fd5b620002af8562000271565b93506020808601519350620002c76040870162000271565b60608701519093506001600160401b0380821115620002e4578384fd5b818801915088601f830112620002f8578384fd5b8151818111156200030557fe5b8381029150620003178483016200038d565b8181528481019084860184860187018d101562000332578788fd5b8795505b838610156200035f576200034a8162000271565b83526001959095019491860191860162000336565b50989b979a50959850505050505050565b6001600160a01b0391909116815260200190565b90815260200190565b6040518181016001600160401b0381118282101715620003a957fe5b604052919050565b61325680620003c16000396000f3fe6080604052600436106101665760003560e01c8063760fbc13116100d1578063a3f4df7e1161008a578063ddf0b00911610064578063ddf0b00914610403578063f2fde38b14610423578063f8741a9c14610443578063fe0d94c11461046357610166565b8063a3f4df7e146103ac578063a75b87d2146103ce578063af1e0bd3146103e357610166565b8063760fbc131461030b5780638da5cb5b146103205780639080936f1461033557806398e527d3146103625780639aad6f6a14610377578063a2b170b01461039757610166565b80634185ff83116101235780634185ff831461023c578063548b514e14610269578063612c56fa1461029657806364c786d9146102b657806370b0f660146102d6578063715018a6146102f657610166565b806306be3e8e1461016b5780631a1caf7f1461019657806320606b70146101b857806334b18c26146101da5780633656de21146101ef57806340e58ee51461021c575b600080fd5b34801561017757600080fd5b50610180610476565b60405161018d9190612ac4565b60405180910390f35b3480156101a257600080fd5b506101b66101b1366004612668565b610485565b005b3480156101c457600080fd5b506101cd610511565b60405161018d9190612b89565b3480156101e657600080fd5b506101cd610535565b3480156101fb57600080fd5b5061020f61020a366004612830565b610559565b60405161018d9190612ed8565b34801561022857600080fd5b506101b6610237366004612830565b61090a565b34801561024857600080fd5b5061025c610257366004612848565b610be5565b60405161018d9190613032565b34801561027557600080fd5b5061028961028436600461264c565b610c3e565b60405161018d9190612b7e565b3480156102a257600080fd5b506101b66102b1366004612877565b610c5c565b3480156102c257600080fd5b506101b66102d1366004612668565b610c67565b3480156102e257600080fd5b506101b66102f1366004612830565b610cef565b34801561030257600080fd5b506101b6610d53565b34801561031757600080fd5b506101b6610df5565b34801561032c57600080fd5b50610180610e31565b34801561034157600080fd5b50610355610350366004612830565b610e40565b60405161018d9190612c10565b34801561036e57600080fd5b506101cd611011565b34801561038357600080fd5b506101b661039236600461264c565b611017565b3480156103a357600080fd5b506101cd611078565b3480156103b857600080fd5b506103c161107e565b60405161018d9190612c24565b3480156103da57600080fd5b506101806110ac565b3480156103ef57600080fd5b506101b66103fe36600461289b565b6110bb565b34801561040f57600080fd5b506101b661041e366004612830565b61125d565b34801561042f57600080fd5b506101b661043e36600461264c565b611559565b34801561044f57600080fd5b506101cd61045e36600461274a565b611651565b6101b6610471366004612830565b6119da565b6001546001600160a01b031690565b61048d611bd9565b6000546001600160a01b039081169116146104dd576040805162461bcd60e51b81526020600482018190526024820152600080516020613201833981519152604482015290519081900360640190fd5b60005b815181101561050d576105058282815181106104f857fe5b6020026020010151611bdd565b6001016104e0565b5050565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b7f4e031542a9553ed1c4e810c54674ab4b984243e335b246aa3de73663bf4c11ee81565b610561612094565b6000828152600460205260409020610577612094565b60408051610220810182528354815260018401546001600160a01b0390811660208084019190915260028601549091168284015260038501805484518184028101840190955280855292936060850193909283018282801561060257602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116105e4575b505050505081526020018360040180548060200260200160405190810160405280929190818152602001828054801561065a57602002820191906000526020600020905b815481526020019060010190808311610646575b5050505050815260200183600501805480602002602001604051908101604052809291908181526020016000905b828210156107335760008481526020908190208301805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561071f5780601f106106f45761010080835404028352916020019161071f565b820191906000526020600020905b81548152906001019060200180831161070257829003601f168201915b505050505081526020019060010190610688565b50505050815260200183600601805480602002602001604051908101604052809291908181526020016000905b8282101561080b5760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156107f75780601f106107cc576101008083540402835291602001916107f7565b820191906000526020600020905b8154815290600101906020018083116107da57829003601f168201915b505050505081526020019060010190610760565b5050505081526020018360070180548060200260200160405190810160405280929190818152602001828054801561088257602002820191906000526020600020906000905b825461010083900a900460ff1615158152602060019283018181049485019490930390920291018084116108515790505b50505091835250506008840154602082015260098401546040820152600a8401546060820152600b8401546080820152600c84015460a0820152600d84015460ff808216151560c0840152610100808304909116151560e0840152620100009091046001600160a01b031690820152600e90930154610120909301929092525090505b919050565b600061091582610e40565b9050600781600781111561092557fe5b1415801561093f5750600181600781111561093c57fe5b14155b80156109575750600681600781111561095457fe5b14155b61097c5760405162461bcd60e51b815260040161097390612e4e565b60405180910390fd5b60008281526004602052604090206006546001600160a01b0316331480610a2f5750600281015460018201546040516331a7bc4160e01b81526001600160a01b03928316926331a7bc41926109df92309290911690436000190190600401612bec565b60206040518083038186803b1580156109f757600080fd5b505afa158015610a0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a2f91906126a3565b610a4b5760405162461bcd60e51b815260040161097390612e19565b600d8101805461ff00191661010017905560005b6003820154811015610ba85760028201546003830180546001600160a01b0390921691631dc40b51919084908110610a9357fe5b6000918252602090912001546004850180546001600160a01b039092169185908110610abb57fe5b9060005260206000200154856005018581548110610ad557fe5b90600052602060002001866006018681548110610aee57fe5b9060005260206000200187600a0154886007018881548110610b0c57fe5b90600052602060002090602091828204019190069054906101000a900460ff166040518763ffffffff1660e01b8152600401610b4d96959493929190612b45565b602060405180830381600087803b158015610b6757600080fd5b505af1158015610b7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b9f91906126bf565b50600101610a5f565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610bd89190612b89565b60405180910390a1505050565b610bed61213a565b5060008281526004602090815260408083206001600160a01b0385168452600f0182529182902082518084019093525460ff8116151583526001600160f81b03610100909104169082015292915050565b6001600160a01b031660009081526005602052604090205460ff1690565b61050d338383611c38565b610c6f611bd9565b6000546001600160a01b03908116911614610cbf576040805162461bcd60e51b81526020600482018190526024820152600080516020613201833981519152604482015290519081900360640190fd5b60005b815181101561050d57610ce7828281518110610cda57fe5b6020026020010151611df2565b600101610cc2565b610cf7611bd9565b6000546001600160a01b03908116911614610d47576040805162461bcd60e51b81526020600482018190526024820152600080516020613201833981519152604482015290519081900360640190fd5b610d5081611e45565b50565b610d5b611bd9565b6000546001600160a01b03908116911614610dab576040805162461bcd60e51b81526020600482018190526024820152600080516020613201833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6006546001600160a01b03163314610e1f5760405162461bcd60e51b815260040161097390612db8565b600680546001600160a01b0319169055565b6000546001600160a01b031690565b6000816003541015610e645760405162461bcd60e51b815260040161097390612e7c565b6000828152600460205260409020600d810154610100900460ff1615610e8e576001915050610905565b80600801544311610ea3576000915050610905565b80600901544311610eb8576002915050610905565b60028101546040516306fbb3ab60e01b81526001600160a01b03909116906306fbb3ab90610eec9030908790600401612ad8565b60206040518083038186803b158015610f0457600080fd5b505afa158015610f18573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3c91906126a3565b610f4a576003915050610905565b600a810154610f5d576004915050610905565b600d81015460ff1615610f74576007915050610905565b600281015460405163f670a5f960e01b81526001600160a01b039091169063f670a5f990610fa89030908790600401612ad8565b60206040518083038186803b158015610fc057600080fd5b505afa158015610fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff891906126a3565b15611007576006915050610905565b6005915050610905565b60035490565b61101f611bd9565b6000546001600160a01b0390811691161461106f576040805162461bcd60e51b81526020600482018190526024820152600080516020613201833981519152604482015290519081900360640190fd5b610d5081611e87565b60025490565b6040518060400160405280601281526020017120b0bb329023b7bb32b93730b731b2903b1960711b81525081565b6006546001600160a01b031690565b60408051808201909152601281527120b0bb329023b7bb32b93730b731b2903b1960711b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f4cc6f35bf1a450a8f51b0719ea5910c789b7b914b5c4f0451867c8a5475a4982611131611ed4565b306040516020016111459493929190612b92565b604051602081830303815290604052805190602001207f4e031542a9553ed1c4e810c54674ab4b984243e335b246aa3de73663bf4c11ee878760405160200161119093929190612bb6565b604051602081830303815290604052805190602001206040516020016111b7929190612aa9565b6040516020818303038152906040528051906020012090506000600182868686604051600081526020016040526040516111f49493929190612bce565b6020604051602081039080840390855afa158015611216573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166112495760405162461bcd60e51b815260040161097390612d26565b611254818888611c38565b50505050505050565b600461126882610e40565b600781111561127357fe5b146112905760405162461bcd60e51b815260040161097390612c95565b60008181526004602081815260408084206002810154825163675e4d4160e11b81529251919594611327946001600160a01b039092169363cebc9a829381830193929091829003018186803b1580156112e857600080fd5b505afa1580156112fc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132091906126bf565b4290611ed8565b905060005b6003830154811015611510576002830154600384018054611508926001600160a01b031691908490811061135c57fe5b6000918252602090912001546004860180546001600160a01b03909216918590811061138457fe5b906000526020600020015486600501858154811061139e57fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561142c5780601f106114015761010080835404028352916020019161142c565b820191906000526020600020905b81548152906001019060200180831161140f57829003601f168201915b505050505087600601868154811061144057fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156114ce5780601f106114a3576101008083540402835291602001916114ce565b820191906000526020600020905b8154815290600101906020018083116114b157829003601f168201915b5050505050878960070188815481106114e357fe5b90600052602060002090602091828204019190069054906101000a900460ff16611f39565b60010161132c565b50600a820181905560405133907f11a0b38e70585e4b09b794bd1d9f9b1a51a802eb8ee2101eeee178d0349e73fe9061154c9086908590613109565b60405180910390a2505050565b611561611bd9565b6000546001600160a01b039081169116146115b1576040805162461bcd60e51b81526020600482018190526024820152600080516020613201833981519152604482015290519081900360640190fd5b6001600160a01b0381166115f65760405162461bcd60e51b81526004018080602001828103825260268152602001806131db6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60008651600014156116755760405162461bcd60e51b815260040161097390612cf7565b85518751148015611687575084518751145b8015611694575083518751145b80156116a1575082518751145b6116bd5760405162461bcd60e51b815260040161097390612de2565b6116c688610c3e565b6116e25760405162461bcd60e51b815260040161097390612d81565b604051631a1b205360e31b81526001600160a01b0389169063d0d90298906117169030903390600019430190600401612bec565b60206040518083038186803b15801561172e57600080fd5b505afa158015611742573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176691906126a3565b6117825760405162461bcd60e51b815260040161097390612c37565b61178a612151565b600254611798904390611ed8565b81600001818152505061181d896001600160a01b031663a438d2086040518163ffffffff1660e01b815260040160206040518083038186803b1580156117dd57600080fd5b505afa1580156117f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061181591906126bf565b825190611ed8565b602082810191909152600380546040808501828152600092835260048552912090518155600181018054336001600160a01b0319918216179091556002820180549091166001600160a01b038e161790558a51909261188292840191908c0190612172565b50875161189890600483019060208b01906121d7565b5086516118ae90600583019060208a0190612212565b5085516118c4906006830190602089019061226b565b5084516118da90600783019060208801906122c4565b508160000151816008018190555081602001518160090181905550600160009054906101000a90046001600160a01b031681600d0160026101000a8154816001600160a01b0302191690836001600160a01b031602179055508381600e0181905550600360008154809291906001019190505550896001600160a01b0316336001600160a01b03167fd272d67d2c8c66de43c1d2515abb064978a5020c173e15903b6a2ab3bf7440ec84604001518c8c8c8c8c8a600001518b60200151600160009054906101000a90046001600160a01b03168f6040516119c49a99989796959493929190613054565b60405180910390a3549998505050505050505050565b60056119e582610e40565b60078111156119f057fe5b14611a0d5760405162461bcd60e51b815260040161097390612ea9565b6000818152600460205260408120600d8101805460ff19166001179055905b6003820154811015611b935760028201546004830180546001600160a01b0390921691638902ab65919084908110611a6057fe5b9060005260206000200154846003018481548110611a7a57fe5b6000918252602090912001546004860180546001600160a01b039092169186908110611aa257fe5b9060005260206000200154866005018681548110611abc57fe5b90600052602060002001876006018781548110611ad557fe5b9060005260206000200188600a0154896007018981548110611af357fe5b90600052602060002090602091828204019190069054906101000a900460ff166040518863ffffffff1660e01b8152600401611b3496959493929190612b45565b6000604051808303818588803b158015611b4d57600080fd5b505af1158015611b61573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052611b8a91908101906126d7565b50600101611a2c565b50336001600160a01b03167f9c85b616f29fca57a17eafe71cf9ff82ffef41766e2cf01ea7f8f7878dd3ec2483604051611bcd9190612b89565b60405180910390a25050565b3390565b6001600160a01b03811660009081526005602052604090819020805460ff19169055517f5e8105a2af24345971359d2289f43efa80d093f4a7123561b8d63836b98724f490611c2d908390612ac4565b60405180910390a150565b6002611c4383610e40565b6007811115611c4e57fe5b14611c6b5760405162461bcd60e51b815260040161097390612c6e565b60008281526004602090815260408083206001600160a01b0387168452600f8101909252909120805461010090046001600160f81b031615611cbf5760405162461bcd60e51b815260040161097390612d51565b600d820154600883015460405163eaeded5f60e01b81526000926201000090046001600160a01b03169163eaeded5f91611cfd918a91600401612ad8565b60206040518083038186803b158015611d1557600080fd5b505afa158015611d29573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d4d91906126bf565b90508315611d6e57600b830154611d649082611ed8565b600b840155611d83565b600c830154611d7d9082611ed8565b600c8401555b815460ff60ff1990911685151517166101006001600160f81b038316021782556040516001600160a01b038716907f0c611e7b6ae0de26f4772260e1bbdb5f58cbb7c275fe2de14671968d29add8d690611de2908890889086906130f3565b60405180910390a2505050505050565b6001600160a01b03811660009081526005602052604090819020805460ff19166001179055517f52762435f58790076157ea2a4914a5a4d0aa0eb421588891377692f7fd3bc08290611c2d908390612ac4565b600281905560405133907fc46fc23e244f0720a98ddbac6efb5bb40d212cf15e6478fc4b3017648715289d90611e7c908490612b89565b60405180910390a250565b600180546001600160a01b0319166001600160a01b0383169081179091556040513391907f9e8e9f668db69a2cefb172dabe284d0d3aea2b7ee64212a205bd033bd03a3d5590600090a350565b4690565b600082820183811015611f32576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b866001600160a01b031663b1fc8796878787878787604051602001611f6396959493929190612af1565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611f959190612b89565b60206040518083038186803b158015611fad57600080fd5b505afa158015611fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fe591906126a3565b156120025760405162461bcd60e51b815260040161097390612ccc565b604051638d8fe2e360e01b81526001600160a01b03881690638d8fe2e39061203890899089908990899089908990600401612af1565b602060405180830381600087803b15801561205257600080fd5b505af1158015612066573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061208a91906126bf565b5050505050505050565b6040518061022001604052806000815260200160006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160001515815260200160006001600160a01b03168152602001600080191681525090565b604080518082019091526000808252602082015290565b60405180606001604052806000815260200160008152602001600081525090565b8280548282559060005260206000209081019282156121c7579160200282015b828111156121c757825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612192565b506121d3929150612360565b5090565b8280548282559060005260206000209081019282156121c7579160200282015b828111156121c75782518255916020019190600101906121f7565b82805482825590600052602060002090810192821561225f579160200282015b8281111561225f578251805161224f918491602090910190612375565b5091602001919060010190612232565b506121d39291506123f0565b8280548282559060005260206000209081019282156122b8579160200282015b828111156122b857825180516122a8918491602090910190612375565b509160200191906001019061228b565b506121d392915061240d565b82805482825590600052602060002090601f016020900481019282156121c75791602002820160005b8382111561232a57835183826101000a81548160ff02191690831515021790555092602001926001016020816000010492830192600103026122ed565b80156123575782816101000a81549060ff021916905560010160208160000104928301926001030261232a565b50506121d39291505b5b808211156121d35760008155600101612361565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826123ab57600085556121c7565b82601f106123c457805160ff19168380011785556121c7565b828001600101855582156121c757918201828111156121c75782518255916020019190600101906121f7565b808211156121d3576000612404828261242a565b506001016123f0565b808211156121d3576000612421828261242a565b5060010161240d565b50805460018160011615610100020316600290046000825580601f106124505750610d50565b601f016020900490600052602060002090810190610d509190612360565b600082601f83011261247e578081fd5b813561249161248c8261313b565b613117565b8181529150602080830190848101818402860182018710156124b257600080fd5b60005b848110156124da5781356124c8816131b7565b845292820192908201906001016124b5565b505050505092915050565b600082601f8301126124f5578081fd5b813561250361248c8261313b565b81815291506020808301908481018184028601820187101561252457600080fd5b60005b848110156124da57813561253a816131cc565b84529282019290820190600101612527565b600082601f83011261255c578081fd5b813561256a61248c8261313b565b818152915060208083019084810160005b848110156124da578135870188603f82011261259657600080fd5b838101356125a661248c82613159565b81815260408b818486010111156125bc57600080fd5b8281850188840137506000918101860191909152855250928201929082019060010161257b565b600082601f8301126125f3578081fd5b813561260161248c8261313b565b81815291506020808301908481018184028601820187101561262257600080fd5b60005b848110156124da57813584529282019290820190600101612625565b8035610905816131b7565b60006020828403121561265d578081fd5b8135611f32816131b7565b600060208284031215612679578081fd5b813567ffffffffffffffff81111561268f578182fd5b61269b8482850161246e565b949350505050565b6000602082840312156126b4578081fd5b8151611f32816131cc565b6000602082840312156126d0578081fd5b5051919050565b6000602082840312156126e8578081fd5b815167ffffffffffffffff8111156126fe578182fd5b8201601f8101841361270e578182fd5b805161271c61248c82613159565b818152856020838501011115612730578384fd5b612741826020830160208601613187565b95945050505050565b600080600080600080600060e0888a031215612764578283fd5b61276d88612641565b9650602088013567ffffffffffffffff80821115612789578485fd5b6127958b838c0161246e565b975060408a01359150808211156127aa578485fd5b6127b68b838c016125e3565b965060608a01359150808211156127cb578485fd5b6127d78b838c0161254c565b955060808a01359150808211156127ec578485fd5b6127f88b838c0161254c565b945060a08a013591508082111561280d578384fd5b5061281a8a828b016124e5565b92505060c0880135905092959891949750929550565b600060208284031215612841578081fd5b5035919050565b6000806040838503121561285a578182fd5b82359150602083013561286c816131b7565b809150509250929050565b60008060408385031215612889578182fd5b82359150602083013561286c816131cc565b600080600080600060a086880312156128b2578283fd5b8535945060208601356128c4816131cc565b9350604086013560ff811681146128d9578384fd5b94979396509394606081013594506080013592915050565b6001600160a01b03169052565b6000815180845260208085019450808401835b838110156129365781516001600160a01b031687529582019590820190600101612911565b509495945050505050565b6000815180845260208085019450808401835b83811015612936578151151587529582019590820190600101612954565b6000815180845260208085018081965082840281019150828601855b858110156129b85782840389526129a68483516129fa565b9885019893509084019060010161298e565b5091979650505050505050565b6000815180845260208085019450808401835b83811015612936578151875295820195908201906001016129d8565b15159052565b60008151808452612a12816020860160208601613187565b601f01601f19169290920160200192915050565b60008154600180821660008114612a445760018114612a6257612aa0565b60028304607f16865260ff1983166020870152604086019350612aa0565b60028304808752612a728661317b565b60005b82811015612a965781546020828b0101528482019150602081019050612a75565b8801602001955050505b50505092915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b038816825286602083015260c06040830152612b1860c08301876129fa565b8281036060840152612b2a81876129fa565b6080840195909552505090151560a090910152949350505050565b600060018060a01b038816825286602083015260c06040830152612b6c60c0830187612a26565b8281036060840152612b2a8187612a26565b901515815260200190565b90815260200190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091521515604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6020810160088310612c1e57fe5b91905290565b600060208252611f3260208301846129fa565b6020808252601c908201527f50524f504f534954494f4e5f4352454154494f4e5f494e56414c494400000000604082015260600190565b6020808252600d908201526c1593d5125391d7d0d313d4d151609a1b604082015260600190565b60208082526017908201527f494e56414c49445f53544154455f464f525f5155455545000000000000000000604082015260600190565b602080825260119082015270222aa82624a1a0aa22a22fa0a1aa24a7a760791b604082015260600190565b602080825260159082015274494e56414c49445f454d5054595f5441524745545360581b604082015260600190565b602080825260119082015270494e56414c49445f5349474e415455524560781b604082015260600190565b6020808252601690820152751593d51157d053149150511657d4d55093525515115160521b604082015260600190565b60208082526017908201527f4558454355544f525f4e4f545f415554484f52495a4544000000000000000000604082015260600190565b60208082526010908201526f27a7262cafa12cafa3aaa0a92224a0a760811b604082015260600190565b6020808252601a908201527f494e434f4e53495354454e545f504152414d535f4c454e475448000000000000604082015260600190565b6020808252818101527f50524f504f534954494f4e5f43414e43454c4c4154494f4e5f494e56414c4944604082015260600190565b60208082526014908201527313d3931657d0915193d49157d1561150d555115160621b604082015260600190565b6020808252601390820152721253959053125117d41493d413d4d05317d251606a1b604082015260600190565b6020808252601590820152744f4e4c595f5155455545445f50524f504f53414c5360581b604082015260600190565b600060208252825160208301526020830151612ef760408401826128f1565b506040830151612f0a60608401826128f1565b506060830151610220806080850152612f276102408501836128fe565b91506080850151601f19808685030160a0870152612f4584836129c5565b935060a08701519150808685030160c0870152612f628483612972565b935060c08701519150808685030160e0870152612f7f8483612972565b935060e08701519150610100818786030181880152612f9e8584612941565b90880151610120888101919091528801516101408089019190915288015161016080890191909152880151610180808901919091528801516101a08089019190915288015190945091506101c09050612ff9818701836129f4565b86015190506101e061300d868201836129f4565b8601519050610200613021868201836128f1565b959095015193019290925250919050565b8151151581526020918201516001600160f81b03169181019190915260400190565b60006101408c835280602084015261306e8184018d6128fe565b90508281036040840152613082818c6129c5565b90508281036060840152613096818b612972565b905082810360808401526130aa818a612972565b905082810360a08401526130be8189612941565b60c0840197909752505060e08101939093526001600160a01b0391909116610100830152610120909101529695505050505050565b9283529015156020830152604082015260600190565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561313357fe5b604052919050565b600067ffffffffffffffff82111561314f57fe5b5060209081020190565b600067ffffffffffffffff82111561316d57fe5b50601f01601f191660200190565b60009081526020902090565b60005b838110156131a257818101518382015260200161318a565b838111156131b1576000848401525b50505050565b6001600160a01b0381168114610d5057600080fd5b8015158114610d5057600080fdfe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220ac26bc836004f1ad165cdf5434d3aa72ba2daf1a455fb8825e63e2e9258e0d3664736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/AaveTokenV1Mock__factory.ts b/packages/chain-events/src/contractTypes/factories/AaveTokenV1Mock__factory.ts new file mode 100644 index 00000000000..32b3364c017 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/AaveTokenV1Mock__factory.ts @@ -0,0 +1,549 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { AaveTokenV1Mock } from "../AaveTokenV1Mock"; + +export class AaveTokenV1Mock__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): AaveTokenV1Mock { + return super.attach(address) as AaveTokenV1Mock; + } + connect(signer: Signer): AaveTokenV1Mock__factory { + return super.connect(signer) as AaveTokenV1Mock__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): AaveTokenV1Mock { + return new Contract(address, _abi, signerOrProvider) as AaveTokenV1Mock; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "oldValue", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "newValue", + type: "uint128", + }, + ], + name: "SnapshotDone", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "EIP712_REVISION", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PERMIT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "REVISION", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "_aaveGovernance", + outputs: [ + { + internalType: "contract ITransferHook", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "_countsSnapshots", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "_nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "_snapshots", + outputs: [ + { + internalType: "uint128", + name: "blockNumber", + type: "uint128", + }, + { + internalType: "uint128", + name: "value", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "migrator", + type: "address", + }, + { + internalType: "address", + name: "distributor", + type: "address", + }, + { + internalType: "contract ITransferHook", + name: "aaveGovernance", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "minter", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405260006006553480156200001657600080fd5b50604080518082018252600a81526920b0bb32902a37b5b2b760b11b6020808301918252835180850190945260048452634141564560e01b908401528151919291620000659160039162000091565b5080516200007b90600490602084019062000091565b50506005805460ff19166012179055506200013d565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620000c9576000855562000114565b82601f10620000e457805160ff191683800117855562000114565b8280016001018555821562000114579182015b8281111562000114578251825591602001919060010190620000f7565b506200012292915062000126565b5090565b5b8082111562000122576000815560010162000127565b61171d806200014d6000396000f3fe608060405234801561001057600080fd5b50600436106101425760003560e01c80638779588c116100b8578063c0c53b8b1161007c578063c0c53b8b146103e3578063c3863ada1461041d578063c4d66de814610441578063d505accf14610467578063dd62ed3e146104b8578063dde43cba146104e657610142565b80638779588c1461033757806395d89b411461035d578063a457c2d714610365578063a9059cbb14610391578063b9844d8d146103bd57610142565b806330adf81f1161010a57806330adf81f146102af578063313ce567146102b75780633644e515146102d557806339509351146102dd57806370a0823114610309578063781603761461032f57610142565b806306fdde0314610147578063095ea7b3146101c457806318160ddd1461020457806323b872dd1461021e5780632acbf82314610254575b600080fd5b61014f6104ee565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610189578181015183820152602001610171565b50505050905090810190601f1680156101b65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101f0600480360360408110156101da57600080fd5b506001600160a01b038135169060200135610584565b604080519115158252519081900360200190f35b61020c6105a1565b60408051918252519081900360200190f35b6101f06004803603606081101561023457600080fd5b506001600160a01b038135811691602081013590911690604001356105a7565b6102806004803603604081101561026a57600080fd5b506001600160a01b03813516906020013561062e565b60405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390f35b61020c61065f565b6102bf610683565b6040805160ff9092168252519081900360200190f35b61020c61068c565b6101f0600480360360408110156102f357600080fd5b506001600160a01b038135169060200135610692565b61020c6004803603602081101561031f57600080fd5b50356001600160a01b03166106e0565b61014f6106fb565b61020c6004803603602081101561034d57600080fd5b50356001600160a01b0316610718565b61014f61072a565b6101f06004803603604081101561037b57600080fd5b506001600160a01b03813516906020013561078b565b6101f0600480360360408110156103a757600080fd5b506001600160a01b0381351690602001356107f3565b61020c600480360360208110156103d357600080fd5b50356001600160a01b0316610807565b61041b600480360360608110156103f957600080fd5b506001600160a01b038135811691602081013582169160409091013516610819565b005b6104256109e2565b604080516001600160a01b039092168252519081900360200190f35b61041b6004803603602081101561045757600080fd5b50356001600160a01b03166109f1565b61041b600480360360e081101561047d57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135610b9d565b61020c600480360360408110156104ce57600080fd5b506001600160a01b0381358116916020013516610de4565b61020c610e0f565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561057a5780601f1061054f5761010080835404028352916020019161057a565b820191906000526020600020905b81548152906001019060200180831161055d57829003601f168201915b5050505050905090565b6000610598610591610e14565b8484610e18565b50600192915050565b60025490565b60006105b4848484610f04565b610624846105c0610e14565b61061f85604051806060016040528060288152602001611624602891396001600160a01b038a166000908152600160205260408120906105fe610e14565b6001600160a01b03168152602081019190915260400160002054919061105f565b610e18565b5060019392505050565b603a6020908152600092835260408084209091529082529020546001600160801b0380821691600160801b90041682565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60055460ff1690565b603d5481565b600061059861069f610e14565b8461061f85600160006106b0610e14565b6001600160a01b03908116825260208083019390935260409182016000908120918c1681529252902054906110f6565b6001600160a01b031660009081526020819052604090205490565b604051806040016040528060018152602001603160f81b81525081565b603b6020526000908152604090205481565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561057a5780601f1061054f5761010080835404028352916020019161057a565b6000610598610798610e14565b8461061f856040518060600160405280602581526020016116c360259139600160006107c2610e14565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919061105f565b6000610598610800610e14565b8484610f04565b60396020526000908152604090205481565b6000610823611157565b905060065481116108655760405162461bcd60e51b815260040180806020018281038252602e81526020018061164c602e913960400191505060405180910390fd5b6006819055604080518082018252600a8082526920b0bb32902a37b5b2b760b11b60209283018190528351808501855260018152603160f81b9084015283517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818501527fc79ca22c0992a4cca3636d52362fc61ce7d8001b81a7b225d701c42fb0636f32818601527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015246608082018190523060a0808401919091528651808403909101815260c0830180885281519190960120603d5561010082019095529282905260e090920191825261096191600391611517565b50604080518082019091526004808252634141564560e01b602090920191825261098b9181611517565b50610996601261115c565b603c80546001600160a01b0319166001600160a01b0385161790556109c6856a0ac0db698068112d000000611172565b6109db846a027b46536c66c8e3000000611172565b5050505050565b603c546001600160a01b031681565b60006109fb611157565b90506006548111610a3d5760405162461bcd60e51b815260040180806020018281038252602e81526020018061164c602e913960400191505060405180910390fd5b6006819055604080518082018252600a8082526920b0bb32902a37b5b2b760b11b60209283018190528351808501855260018152603160f81b9084015283517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818501527fc79ca22c0992a4cca3636d52362fc61ce7d8001b81a7b225d701c42fb0636f32818601527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015246608082018190523060a0808401919091528651808403909101815260c0830180885281519190960120603d5561010082019095529282905260e0909201918252610b3991600391611517565b50604080518082019091526004808252634141564560e01b6020909201918252610b639181611517565b50610b6e601261115c565b610b83836a0ac0db698068112d000000611172565b610b98836a027b46536c66c8e3000000611172565b505050565b6001600160a01b038716610be8576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22fa7aba722a960991b604482015290519081900360640190fd5b83421115610c32576040805162461bcd60e51b815260206004820152601260248201527124a72b20a624a22fa2ac2824a920aa24a7a760711b604482015290519081900360640190fd5b6001600160a01b03808816600081815260396020908152604080832054603d5482517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958c166060860152608085018b905260a0850181905260c08086018b90528251808703909101815260e08601835280519084012061190160f01b6101008701526101028601969096526101228086019690965281518086039096018652610142850180835286519684019690962093909552610162840180825283905260ff88166101828501526101a284018790526101c284018690525191926001926101e28083019392601f198301929081900390910190855afa158015610d47573d6000803e3d6000fd5b505050602060405103516001600160a01b0316896001600160a01b031614610daa576040805162461bcd60e51b8152602060048201526011602482015270494e56414c49445f5349474e415455524560781b604482015290519081900360640190fd5b610db58260016110f6565b6001600160a01b038a16600090815260396020526040902055610dd9898989610e18565b505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600181565b3390565b6001600160a01b038316610e5d5760405162461bcd60e51b815260040180806020018281038252602481526020018061169f6024913960400191505060405180910390fd5b6001600160a01b038216610ea25760405162461bcd60e51b81526004018080602001828103825260228152602001806115dc6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610f495760405162461bcd60e51b815260040180806020018281038252602581526020018061167a6025913960400191505060405180910390fd5b6001600160a01b038216610f8e5760405162461bcd60e51b81526004018080602001828103825260238152602001806115b96023913960400191505060405180910390fd5b610f99838383611262565b610fd6816040518060600160405280602681526020016115fe602691396001600160a01b038616600090815260208190526040902054919061105f565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461100590826110f6565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156110ee5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156110b357818101518382015260200161109b565b50505050905090810190601f1680156110e05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015611150576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600190565b6005805460ff191660ff92909216919091179055565b6001600160a01b0382166111cd576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6111d960008383611262565b6002546111e690826110f6565b6002556001600160a01b03821660009081526020819052604090205461120c90826110f6565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b816001600160a01b0316836001600160a01b0316141561128157610b98565b6001600160a01b038316156112b357600061129b846106e0565b90506112b184826112ac8186611379565b6113bb565b505b6001600160a01b038216156112e05760006112cd836106e0565b90506112de83826112ac81866110f6565b505b603c546001600160a01b0316801561137357806001600160a01b0316634a3931498585856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561135a57600080fd5b505af115801561136e573d6000803e3d6000fd5b505050505b50505050565b600061115083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061105f565b6001600160a01b0383166000908152603b6020908152604080832054603a909252909120439190811580159061140f575060001982016000908152602082905260409020546001600160801b038481169116145b15611444576000198201600090815260208290526040902080546001600160801b03808716600160801b0291161790556114bd565b6040805180820182526001600160801b038086168252868116602080840191825260008781528682528581209451855493518516600160801b029085166fffffffffffffffffffffffffffffffff1990941693909317909316919091179092556001600160a01b0389168152603b909152206001830190555b604080516001600160a01b03881681526001600160801b03808816602083015286168183015290517f2cd3c83ddac2953ee75f53265d9ea4463eaf05030e5459a1b7e63819b7ce88f79181900360600190a1505050505050565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261154d5760008555611593565b82601f1061156657805160ff1916838001178555611593565b82800160010185558215611593579182015b82811115611593578251825591602001919060010190611578565b5061159f9291506115a3565b5090565b5b8082111561159f57600081556001016115a456fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656445524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220b3be6f13ee0f4eec60a08ebd7aac8d9c7d5f023bc04c7f00b2fc51ffc93db36064736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/AaveTokenV2Mock__factory.ts b/packages/chain-events/src/contractTypes/factories/AaveTokenV2Mock__factory.ts new file mode 100644 index 00000000000..290215b4516 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/AaveTokenV2Mock__factory.ts @@ -0,0 +1,797 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { AaveTokenV2Mock } from "../AaveTokenV2Mock"; + +export class AaveTokenV2Mock__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): AaveTokenV2Mock { + return super.attach(address) as AaveTokenV2Mock; + } + connect(signer: Signer): AaveTokenV2Mock__factory { + return super.connect(signer) as AaveTokenV2Mock__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): AaveTokenV2Mock { + return new Contract(address, _abi, signerOrProvider) as AaveTokenV2Mock; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "delegatee", + type: "address", + }, + { + indexed: false, + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "DelegateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "DelegatedPowerChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DELEGATE_BY_TYPE_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DELEGATE_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "EIP712_REVISION", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PERMIT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "REVISION", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "_aaveGovernance", + outputs: [ + { + internalType: "contract ITransferHook", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "_nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "_votingSnapshots", + outputs: [ + { + internalType: "uint128", + name: "blockNumber", + type: "uint128", + }, + { + internalType: "uint128", + name: "value", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "_votingSnapshotsCounts", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + ], + name: "delegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "delegateBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "delegateByType", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "delegateByTypeBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegator", + type: "address", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "getDelegateeByType", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "getPowerAtBlock", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "getPowerCurrent", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "minter", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "totalSupplyAt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405260006006553480156200001657600080fd5b50604080518082018252600a81526920b0bb32902a37b5b2b760b11b6020808301918252835180850190945260048452634141564560e01b908401528151919291620000659160039162000091565b5080516200007b90600490602084019062000091565b50506005805460ff19166012179055506200013d565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620000c9576000855562000114565b82601f10620000e457805160ff191683800117855562000114565b8280016001018555821562000114579182015b8281111562000114578251825591602001919060010190620000f7565b506200012292915062000126565b5090565b5b8082111562000122576000815560010162000127565b611ff5806200014d6000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80638129fc1c1161010f578063c2ffbb91116100a2578063dc937e1c11610071578063dc937e1c14610669578063dd62ed3e14610698578063dde43cba146106c6578063f713d8a8146106ce576101f0565b8063c2ffbb9114610594578063c3863ada146105c9578063c3cda520146105d1578063d505accf14610618576101f0565b8063a9059cbb116100de578063a9059cbb1461050b578063aa9fbe0214610537578063b2f4201d1461053f578063b9844d8d1461056e576101f0565b80638129fc1c146104b257806395d89b41146104ba578063981b24d0146104c2578063a457c2d7146104df576101f0565b806340c10f19116101875780636f50458d116101565780636f50458d1461041357806370a082311461045e57806378160376146104845780637bb73c971461048c576101f0565b806340c10f191461035c57806341cbf54a1461038a5780635b3cc0cf146103925780635c19a95c146103ed576101f0565b806330adf81f116101c357806330adf81f14610302578063313ce5671461030a5780633644e515146103285780633950935114610330576101f0565b806306fdde03146101f5578063095ea7b31461027257806318160ddd146102b257806323b872dd146102cc575b600080fd5b6101fd61071f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561023757818101518382015260200161021f565b50505050905090810190601f1680156102645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61029e6004803603604081101561028857600080fd5b506001600160a01b0381351690602001356107b5565b604080519115158252519081900360200190f35b6102ba6107d3565b60408051918252519081900360200190f35b61029e600480360360608110156102e257600080fd5b506001600160a01b038135811691602081013590911690604001356107d9565b6102ba610860565b610312610884565b6040805160ff9092168252519081900360200190f35b6102ba61088d565b61029e6004803603604081101561034657600080fd5b506001600160a01b038135169060200135610893565b6103886004803603604081101561037257600080fd5b506001600160a01b0381351690602001356108e1565b005b6102ba6108ef565b6103be600480360360408110156103a857600080fd5b506001600160a01b038135169060200135610913565b60405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390f35b6103886004803603602081101561040357600080fd5b50356001600160a01b0316610944565b6104426004803603604081101561042957600080fd5b5080356001600160a01b0316906020013560ff1661095f565b604080516001600160a01b039092168252519081900360200190f35b6102ba6004803603602081101561047457600080fd5b50356001600160a01b0316610981565b6101fd61099c565b6102ba600480360360208110156104a257600080fd5b50356001600160a01b03166109b9565b6103886109cb565b6101fd610a1c565b6102ba600480360360208110156104d857600080fd5b5035610a7d565b61029e600480360360408110156104f557600080fd5b506001600160a01b038135169060200135610a87565b61029e6004803603604081101561052157600080fd5b506001600160a01b038135169060200135610aef565b6102ba610b03565b6102ba6004803603604081101561055557600080fd5b5080356001600160a01b0316906020013560ff16610b27565b6102ba6004803603602081101561058457600080fd5b50356001600160a01b0316610b4f565b6102ba600480360360608110156105aa57600080fd5b5080356001600160a01b0316906020810135906040013560ff16610b61565b610442610b8a565b610388600480360360c08110156105e757600080fd5b506001600160a01b038135169060208101359060408101359060ff6060820135169060808101359060a00135610b99565b610388600480360360e081101561062e57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135610dbb565b6103886004803603604081101561067f57600080fd5b5080356001600160a01b0316906020013560ff16610ff7565b6102ba600480360360408110156106ae57600080fd5b506001600160a01b0381358116916020013516611002565b6102ba61102d565b610388600480360360e08110156106e457600080fd5b506001600160a01b038135169060ff602082013581169160408101359160608201359160808101359091169060a08101359060c00135611032565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ab5780601f10610780576101008083540402835291602001916107ab565b820191906000526020600020905b81548152906001019060200180831161078e57829003601f168201915b5050505050905090565b60006107c96107c2611265565b8484611269565b5060015b92915050565b60025490565b60006107e6848484611355565b610856846107f2611265565b61085185604051806060016040528060288152602001611efc602891396001600160a01b038a16600090815260016020526040812090610830611265565b6001600160a01b0316815260208101919091526040016000205491906114b0565b611269565b5060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60055460ff1690565b603d5481565b60006107c96108a0611265565b8461085185600160006108b1611265565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611547565b6108eb82826115a8565b5050565b7f9a9a49b990ba9bb39f8048c490a40ab25c18f55d208d5fbcf958261a9b48716d81565b603a6020908152600092835260408084209091529082529020546001600160801b0380821691600160801b90041682565b61095033826000611698565b61095c33826001611698565b50565b60008061096b836117a9565b9250505061097984826117e3565b949350505050565b6001600160a01b031660009081526020819052604090205490565b604051806040016040528060018152602001603160f81b81525081565b603b6020526000908152604090205481565b60006109d561180e565b90506006548111610a175760405162461bcd60e51b815260040180806020018281038252602e815260200180611f24602e913960400191505060405180910390fd5b600655565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ab5780601f10610780576101008083540402835291602001916107ab565b60006107cd6107d3565b60006107c9610a94611265565b8461085185604051806060016040528060258152602001611f9b6025913960016000610abe611265565b6001600160a01b03908116825260208083019390935260409182016000908120918d168152925290205491906114b0565b60006107c9610afc611265565b8484611355565b7f10d8d059343739efce7dad10d09f0806da52b252b3e6a7951920d2d6ec4102e581565b6000806000610b35846117a9565b5091509150610b4682828743611813565b95945050505050565b60396020526000908152604090205481565b6000806000610b6f846117a9565b5091509150610b8082828888611813565b9695505050505050565b603c546001600160a01b031681565b604080517f9a9a49b990ba9bb39f8048c490a40ab25c18f55d208d5fbcf958261a9b48716d6020808301919091526001600160a01b038916828401526060820188905260808083018890528351808403909101815260a083018452805190820120603d5461190160f01b60c085015260c284015260e2808401829052845180850390910181526101028401808652815191840191909120600091829052610122850180875281905260ff891661014286015261016285018890526101828501879052945191949390926001926101a280840193601f198301929081900390910190855afa158015610c8e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610cea576040805162461bcd60e51b8152602060048201526011602482015270494e56414c49445f5349474e415455524560781b604482015290519081900360640190fd5b6001600160a01b03811660009081526039602052604090208054600181019091558814610d4e576040805162461bcd60e51b815260206004820152600d60248201526c494e56414c49445f4e4f4e434560981b604482015290519081900360640190fd5b86421115610d98576040805162461bcd60e51b815260206004820152601260248201527124a72b20a624a22fa2ac2824a920aa24a7a760711b604482015290519081900360640190fd5b610da4818a6000611698565b610db0818a6001611698565b505050505050505050565b6001600160a01b038716610e06576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22fa7aba722a960991b604482015290519081900360640190fd5b83421115610e50576040805162461bcd60e51b815260206004820152601260248201527124a72b20a624a22fa2ac2824a920aa24a7a760711b604482015290519081900360640190fd5b6001600160a01b03808816600081815260396020908152604080832054603d5482517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958c166060860152608085018b905260a0850181905260c08086018b90528251808703909101815260e08601835280519084012061190160f01b6101008701526101028601969096526101228086019690965281518086039096018652610142850180835286519684019690962093909552610162840180825283905260ff88166101828501526101a284018790526101c284018690525191926001926101e28083019392601f198301929081900390910190855afa158015610f65573d6000803e3d6000fd5b505050602060405103516001600160a01b0316896001600160a01b031614610fc8576040805162461bcd60e51b8152602060048201526011602482015270494e56414c49445f5349474e415455524560781b604482015290519081900360640190fd5b610fd3826001611547565b6001600160a01b038a16600090815260396020526040902055610db0898989611269565b6108eb338383611698565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600281565b60007f10d8d059343739efce7dad10d09f0806da52b252b3e6a7951920d2d6ec4102e58888600181111561106257fe5b604080516020808201959095526001600160a01b039093168382015260608301919091526080820189905260a08083018990528151808403909101815260c083018252805190840120603d5461190160f01b60e085015260e2840152610102808401829052825180850390910181526101228401808452815191860191909120600091829052610142850180855281905260ff8a1661016286015261018285018990526101a285018890529251919550919391926001926101c2808301939192601f198301929081900390910190855afa158015611144573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166111a0576040805162461bcd60e51b8152602060048201526011602482015270494e56414c49445f5349474e415455524560781b604482015290519081900360640190fd5b6001600160a01b03811660009081526039602052604090208054600181019091558814611204576040805162461bcd60e51b815260206004820152600d60248201526c494e56414c49445f4e4f4e434560981b604482015290519081900360640190fd5b8642111561124e576040805162461bcd60e51b815260206004820152601260248201527124a72b20a624a22fa2ac2824a920aa24a7a760711b604482015290519081900360640190fd5b611259818b8b611698565b50505050505050505050565b3390565b6001600160a01b0383166112ae5760405162461bcd60e51b8152600401808060200182810382526024815260200180611f776024913960400191505060405180910390fd5b6001600160a01b0382166112f35760405162461bcd60e51b8152600401808060200182810382526022815260200180611eb46022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831661139a5760405162461bcd60e51b8152600401808060200182810382526025815260200180611f526025913960400191505060405180910390fd5b6001600160a01b0382166113df5760405162461bcd60e51b8152600401808060200182810382526023815260200180611e916023913960400191505060405180910390fd5b6113ea838383611a2e565b61142781604051806060016040528060268152602001611ed6602691396001600160a01b03861660009081526020819052604090205491906114b0565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546114569082611547565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561153f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156115045781810151838201526020016114ec565b50505050905090810190601f1680156115315780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156115a1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216611603576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61160f60008383611a2e565b60025461161c9082611547565b6002556001600160a01b0382166000908152602081905260409020546116429082611547565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0382166116e7576040805162461bcd60e51b8152602060048201526011602482015270494e56414c49445f44454c45474154454560781b604482015290519081900360640190fd5b60006116f2826117a9565b92505050600061170185610981565b9050600061170f86846117e3565b6001600160a01b03878116600090815260208690526040902080546001600160a01b031916918816919091179055905061174b81868487611b21565b846001600160a01b0316866001600160a01b03167fe8d51c8e11bd570db1734c8ec775785330e77007feed45c43b608ef33ff914bd866040518082600181111561179157fe5b815260200191505060405180910390a3505050505050565b60008080808460018111156117ba57fe5b14156117d05750603a9150603b9050603e6117dc565b50603f91506040905060415b9193909250565b6001600160a01b03808316600090815260208390526040812054909116806115a157839150506107cd565b600290565b600043821115611861576040805162461bcd60e51b815260206004820152601460248201527324a72b20a624a22fa12627a1a5afa72aa6a122a960611b604482015290519081900360640190fd5b6001600160a01b038316600090815260208590526040902054806118905761188884610981565b915050610979565b6001600160a01b038416600090815260208781526040808320600019850184529091529020546001600160801b03168310611903576001600160a01b038416600090815260208781526040808320600019909401835292905220546001600160801b03600160801b909104169050610979565b6001600160a01b0384166000908152602087815260408083208380529091529020546001600160801b031683101561193f576000915050610979565b600060001982015b818111156119f157600282820304810361195f611e79565b506001600160a01b038716600090815260208a815260408083208484528252918290208251808401909352546001600160801b03808216808552600160801b90920416918301919091528714156119c957602001516001600160801b031694506109799350505050565b80516001600160801b03168711156119e3578193506119ea565b6001820392505b5050611947565b506001600160a01b0385166000908152602088815260408083209383529290522054600160801b90046001600160801b0316915050949350505050565b6000611a3b84603e6117e3565b90506000611a4a84603e6117e3565b9050611a598282856000611b21565b6000611a668660416117e3565b90506000611a758660416117e3565b9050611a848282876001611b21565b603c546001600160a01b03168015611b1757806001600160a01b0316634a3931498989896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611afe57600080fd5b505af1158015611b12573d6000803e3d6000fd5b505050505b5050505050505050565b826001600160a01b0316846001600160a01b03161415611b4057611d2a565b600080611b4c836117a9565b5090925090506001600160a01b03861615611c3f576001600160a01b0386166000908152602082905260408120548015611bbd576001600160a01b03881660009081526020858152604080832060001985018452909152902054600160801b90046001600160801b03169150611bc9565b611bc688610981565b91505b611bdf84848a85611bda818c611d30565b611d72565b6001600160a01b0388167fa0a19463ee116110c9b282012d9b65cc5522dc38a9520340cbaf3142e550127f611c148489611d30565b8760405180838152602001826001811115611c2b57fe5b81526020019250505060405180910390a250505b6001600160a01b03851615611d27576001600160a01b0385166000908152602082905260408120548015611caa576001600160a01b03871660009081526020858152604080832060001985018452909152902054600160801b90046001600160801b03169150611cb6565b611cb387610981565b91505b611cc784848985611bda818c611547565b6001600160a01b0387167fa0a19463ee116110c9b282012d9b65cc5522dc38a9520340cbaf3142e550127f611cfc8489611547565b8760405180838152602001826001811115611d1357fe5b81526020019250505060405180910390a250505b50505b50505050565b60006115a183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506114b0565b6001600160a01b03831660009081526020858152604080832054918890529091204391908115801590611dc3575060001982016000908152602082905260409020546001600160801b038481169116145b15611df8576000198201600090815260208290526040902080546001600160801b03808716600160801b029116179055611b17565b6040805180820182526001600160801b038086168252868116602080840191825260008781528682528581209451855493518516600160801b029085166fffffffffffffffffffffffffffffffff1990941693909317909316919091179092556001600160a01b038916815290899052206001830190555050505050505050565b60408051808201909152600080825260208201529056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656445524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122012b47fdc939fc8d50edf884dab3716a0426b45c8d488a8cf5c9e8258220f51b064736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/AaveTokenV2__factory.ts b/packages/chain-events/src/contractTypes/factories/AaveTokenV2__factory.ts new file mode 100644 index 00000000000..cc7fb1e59a7 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/AaveTokenV2__factory.ts @@ -0,0 +1,784 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { AaveTokenV2 } from "../AaveTokenV2"; + +export class AaveTokenV2__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): AaveTokenV2 { + return super.attach(address) as AaveTokenV2; + } + connect(signer: Signer): AaveTokenV2__factory { + return super.connect(signer) as AaveTokenV2__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): AaveTokenV2 { + return new Contract(address, _abi, signerOrProvider) as AaveTokenV2; + } +} + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "delegatee", + type: "address", + }, + { + indexed: false, + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "DelegateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "DelegatedPowerChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DELEGATE_BY_TYPE_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DELEGATE_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "EIP712_REVISION", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PERMIT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "REVISION", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "_aaveGovernance", + outputs: [ + { + internalType: "contract ITransferHook", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "_nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "_votingSnapshots", + outputs: [ + { + internalType: "uint128", + name: "blockNumber", + type: "uint128", + }, + { + internalType: "uint128", + name: "value", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "_votingSnapshotsCounts", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + ], + name: "delegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "delegateBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "delegateByType", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "delegateByTypeBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegator", + type: "address", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "getDelegateeByType", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "getPowerAtBlock", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "getPowerCurrent", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "totalSupplyAt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405260006006553480156200001657600080fd5b50604080518082018252600a81526920b0bb32902a37b5b2b760b11b6020808301918252835180850190945260048452634141564560e01b908401528151919291620000659160039162000091565b5080516200007b90600490602084019062000091565b50506005805460ff19166012179055506200013d565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620000c9576000855562000114565b82601f10620000e457805160ff191683800117855562000114565b8280016001018555821562000114579182015b8281111562000114578251825591602001919060010190620000f7565b506200012292915062000126565b5090565b5b8082111562000122576000815560010162000127565b611ec4806200014d6000396000f3fe608060405234801561001057600080fd5b50600436106101e55760003560e01c80638129fc1c1161010f578063c2ffbb91116100a2578063dc937e1c11610071578063dc937e1c14610632578063dd62ed3e14610661578063dde43cba1461068f578063f713d8a814610697576101e5565b8063c2ffbb911461055d578063c3863ada14610592578063c3cda5201461059a578063d505accf146105e1576101e5565b8063a9059cbb116100de578063a9059cbb146104d4578063aa9fbe0214610500578063b2f4201d14610508578063b9844d8d14610537576101e5565b80638129fc1c1461047b57806395d89b4114610483578063981b24d01461048b578063a457c2d7146104a8576101e5565b806339509351116101875780636f50458d116101565780636f50458d146103dc57806370a0823114610427578063781603761461044d5780637bb73c9714610455576101e5565b8063395093511461032557806341cbf54a146103515780635b3cc0cf146103595780635c19a95c146103b4576101e5565b806323b872dd116101c357806323b872dd146102c157806330adf81f146102f7578063313ce567146102ff5780633644e5151461031d576101e5565b806306fdde03146101ea578063095ea7b31461026757806318160ddd146102a7575b600080fd5b6101f26106e8565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561022c578181015183820152602001610214565b50505050905090810190601f1680156102595780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102936004803603604081101561027d57600080fd5b506001600160a01b03813516906020013561077e565b604080519115158252519081900360200190f35b6102af61079c565b60408051918252519081900360200190f35b610293600480360360608110156102d757600080fd5b506001600160a01b038135811691602081013590911690604001356107a2565b6102af610829565b61030761084d565b6040805160ff9092168252519081900360200190f35b6102af610856565b6102936004803603604081101561033b57600080fd5b506001600160a01b03813516906020013561085c565b6102af6108aa565b6103856004803603604081101561036f57600080fd5b506001600160a01b0381351690602001356108ce565b60405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390f35b6103da600480360360208110156103ca57600080fd5b50356001600160a01b03166108ff565b005b61040b600480360360408110156103f257600080fd5b5080356001600160a01b0316906020013560ff1661091a565b604080516001600160a01b039092168252519081900360200190f35b6102af6004803603602081101561043d57600080fd5b50356001600160a01b031661093c565b6101f2610957565b6102af6004803603602081101561046b57600080fd5b50356001600160a01b0316610974565b6103da610986565b6101f26109d7565b6102af600480360360208110156104a157600080fd5b5035610a38565b610293600480360360408110156104be57600080fd5b506001600160a01b038135169060200135610a42565b610293600480360360408110156104ea57600080fd5b506001600160a01b038135169060200135610aaa565b6102af610abe565b6102af6004803603604081101561051e57600080fd5b5080356001600160a01b0316906020013560ff16610ae2565b6102af6004803603602081101561054d57600080fd5b50356001600160a01b0316610b0a565b6102af6004803603606081101561057357600080fd5b5080356001600160a01b0316906020810135906040013560ff16610b1c565b61040b610b45565b6103da600480360360c08110156105b057600080fd5b506001600160a01b038135169060208101359060408101359060ff6060820135169060808101359060a00135610b54565b6103da600480360360e08110156105f757600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135610d76565b6103da6004803603604081101561064857600080fd5b5080356001600160a01b0316906020013560ff16610fb2565b6102af6004803603604081101561067757600080fd5b506001600160a01b0381358116916020013516610fc1565b6102af610fec565b6103da600480360360e08110156106ad57600080fd5b506001600160a01b038135169060ff602082013581169160408101359160608201359160808101359091169060a08101359060c00135610ff1565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107745780601f1061074957610100808354040283529160200191610774565b820191906000526020600020905b81548152906001019060200180831161075757829003601f168201915b5050505050905090565b600061079261078b611224565b8484611228565b5060015b92915050565b60025490565b60006107af848484611314565b61081f846107bb611224565b61081a85604051806060016040528060288152602001611dcb602891396001600160a01b038a166000908152600160205260408120906107f9611224565b6001600160a01b03168152602081019190915260400160002054919061146f565b611228565b5060019392505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60055460ff1690565b603d5481565b6000610792610869611224565b8461081a856001600061087a611224565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611506565b7f9a9a49b990ba9bb39f8048c490a40ab25c18f55d208d5fbcf958261a9b48716d81565b603a6020908152600092835260408084209091529082529020546001600160801b0380821691600160801b90041682565b61090b33826000611567565b61091733826001611567565b50565b60008061092683611678565b9250505061093484826116b2565b949350505050565b6001600160a01b031660009081526020819052604090205490565b604051806040016040528060018152602001603160f81b81525081565b603b6020526000908152604090205481565b60006109906116dd565b905060065481116109d25760405162461bcd60e51b815260040180806020018281038252602e815260200180611df3602e913960400191505060405180910390fd5b600655565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107745780601f1061074957610100808354040283529160200191610774565b600061079661079c565b6000610792610a4f611224565b8461081a85604051806060016040528060258152602001611e6a6025913960016000610a79611224565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919061146f565b6000610792610ab7611224565b8484611314565b7f10d8d059343739efce7dad10d09f0806da52b252b3e6a7951920d2d6ec4102e581565b6000806000610af084611678565b5091509150610b01828287436116e2565b95945050505050565b60396020526000908152604090205481565b6000806000610b2a84611678565b5091509150610b3b828288886116e2565b9695505050505050565b603c546001600160a01b031681565b604080517f9a9a49b990ba9bb39f8048c490a40ab25c18f55d208d5fbcf958261a9b48716d6020808301919091526001600160a01b038916828401526060820188905260808083018890528351808403909101815260a083018452805190820120603d5461190160f01b60c085015260c284015260e2808401829052845180850390910181526101028401808652815191840191909120600091829052610122850180875281905260ff891661014286015261016285018890526101828501879052945191949390926001926101a280840193601f198301929081900390910190855afa158015610c49573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610ca5576040805162461bcd60e51b8152602060048201526011602482015270494e56414c49445f5349474e415455524560781b604482015290519081900360640190fd5b6001600160a01b03811660009081526039602052604090208054600181019091558814610d09576040805162461bcd60e51b815260206004820152600d60248201526c494e56414c49445f4e4f4e434560981b604482015290519081900360640190fd5b86421115610d53576040805162461bcd60e51b815260206004820152601260248201527124a72b20a624a22fa2ac2824a920aa24a7a760711b604482015290519081900360640190fd5b610d5f818a6000611567565b610d6b818a6001611567565b505050505050505050565b6001600160a01b038716610dc1576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22fa7aba722a960991b604482015290519081900360640190fd5b83421115610e0b576040805162461bcd60e51b815260206004820152601260248201527124a72b20a624a22fa2ac2824a920aa24a7a760711b604482015290519081900360640190fd5b6001600160a01b03808816600081815260396020908152604080832054603d5482517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958c166060860152608085018b905260a0850181905260c08086018b90528251808703909101815260e08601835280519084012061190160f01b6101008701526101028601969096526101228086019690965281518086039096018652610142850180835286519684019690962093909552610162840180825283905260ff88166101828501526101a284018790526101c284018690525191926001926101e28083019392601f198301929081900390910190855afa158015610f20573d6000803e3d6000fd5b505050602060405103516001600160a01b0316896001600160a01b031614610f83576040805162461bcd60e51b8152602060048201526011602482015270494e56414c49445f5349474e415455524560781b604482015290519081900360640190fd5b610f8e826001611506565b6001600160a01b038a16600090815260396020526040902055610d6b898989611228565b610fbd338383611567565b5050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600281565b60007f10d8d059343739efce7dad10d09f0806da52b252b3e6a7951920d2d6ec4102e58888600181111561102157fe5b604080516020808201959095526001600160a01b039093168382015260608301919091526080820189905260a08083018990528151808403909101815260c083018252805190840120603d5461190160f01b60e085015260e2840152610102808401829052825180850390910181526101228401808452815191860191909120600091829052610142850180855281905260ff8a1661016286015261018285018990526101a285018890529251919550919391926001926101c2808301939192601f198301929081900390910190855afa158015611103573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661115f576040805162461bcd60e51b8152602060048201526011602482015270494e56414c49445f5349474e415455524560781b604482015290519081900360640190fd5b6001600160a01b038116600090815260396020526040902080546001810190915588146111c3576040805162461bcd60e51b815260206004820152600d60248201526c494e56414c49445f4e4f4e434560981b604482015290519081900360640190fd5b8642111561120d576040805162461bcd60e51b815260206004820152601260248201527124a72b20a624a22fa2ac2824a920aa24a7a760711b604482015290519081900360640190fd5b611218818b8b611567565b50505050505050505050565b3390565b6001600160a01b03831661126d5760405162461bcd60e51b8152600401808060200182810382526024815260200180611e466024913960400191505060405180910390fd5b6001600160a01b0382166112b25760405162461bcd60e51b8152600401808060200182810382526022815260200180611d836022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166113595760405162461bcd60e51b8152600401808060200182810382526025815260200180611e216025913960400191505060405180910390fd5b6001600160a01b03821661139e5760405162461bcd60e51b8152600401808060200182810382526023815260200180611d606023913960400191505060405180910390fd5b6113a98383836118fd565b6113e681604051806060016040528060268152602001611da5602691396001600160a01b038616600090815260208190526040902054919061146f565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546114159082611506565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156114fe5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156114c35781810151838201526020016114ab565b50505050905090810190601f1680156114f05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015611560576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b0382166115b6576040805162461bcd60e51b8152602060048201526011602482015270494e56414c49445f44454c45474154454560781b604482015290519081900360640190fd5b60006115c182611678565b9250505060006115d08561093c565b905060006115de86846116b2565b6001600160a01b03878116600090815260208690526040902080546001600160a01b031916918816919091179055905061161a818684876119f0565b846001600160a01b0316866001600160a01b03167fe8d51c8e11bd570db1734c8ec775785330e77007feed45c43b608ef33ff914bd866040518082600181111561166057fe5b815260200191505060405180910390a3505050505050565b600080808084600181111561168957fe5b141561169f5750603a9150603b9050603e6116ab565b50603f91506040905060415b9193909250565b6001600160a01b03808316600090815260208390526040812054909116806115605783915050610796565b600290565b600043821115611730576040805162461bcd60e51b815260206004820152601460248201527324a72b20a624a22fa12627a1a5afa72aa6a122a960611b604482015290519081900360640190fd5b6001600160a01b0383166000908152602085905260409020548061175f576117578461093c565b915050610934565b6001600160a01b038416600090815260208781526040808320600019850184529091529020546001600160801b031683106117d2576001600160a01b038416600090815260208781526040808320600019909401835292905220546001600160801b03600160801b909104169050610934565b6001600160a01b0384166000908152602087815260408083208380529091529020546001600160801b031683101561180e576000915050610934565b600060001982015b818111156118c057600282820304810361182e611d48565b506001600160a01b038716600090815260208a815260408083208484528252918290208251808401909352546001600160801b03808216808552600160801b909204169183019190915287141561189857602001516001600160801b031694506109349350505050565b80516001600160801b03168711156118b2578193506118b9565b6001820392505b5050611816565b506001600160a01b0385166000908152602088815260408083209383529290522054600160801b90046001600160801b0316915050949350505050565b600061190a84603e6116b2565b9050600061191984603e6116b2565b905061192882828560006119f0565b60006119358660416116b2565b905060006119448660416116b2565b905061195382828760016119f0565b603c546001600160a01b031680156119e657806001600160a01b0316634a3931498989896040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b1580156119cd57600080fd5b505af11580156119e1573d6000803e3d6000fd5b505050505b5050505050505050565b826001600160a01b0316846001600160a01b03161415611a0f57611bf9565b600080611a1b83611678565b5090925090506001600160a01b03861615611b0e576001600160a01b0386166000908152602082905260408120548015611a8c576001600160a01b03881660009081526020858152604080832060001985018452909152902054600160801b90046001600160801b03169150611a98565b611a958861093c565b91505b611aae84848a85611aa9818c611bff565b611c41565b6001600160a01b0388167fa0a19463ee116110c9b282012d9b65cc5522dc38a9520340cbaf3142e550127f611ae38489611bff565b8760405180838152602001826001811115611afa57fe5b81526020019250505060405180910390a250505b6001600160a01b03851615611bf6576001600160a01b0385166000908152602082905260408120548015611b79576001600160a01b03871660009081526020858152604080832060001985018452909152902054600160801b90046001600160801b03169150611b85565b611b828761093c565b91505b611b9684848985611aa9818c611506565b6001600160a01b0387167fa0a19463ee116110c9b282012d9b65cc5522dc38a9520340cbaf3142e550127f611bcb8489611506565b8760405180838152602001826001811115611be257fe5b81526020019250505060405180910390a250505b50505b50505050565b600061156083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061146f565b6001600160a01b03831660009081526020858152604080832054918890529091204391908115801590611c92575060001982016000908152602082905260409020546001600160801b038481169116145b15611cc7576000198201600090815260208290526040902080546001600160801b03808716600160801b0291161790556119e6565b6040805180820182526001600160801b038086168252868116602080840191825260008781528682528581209451855493518516600160801b029085166fffffffffffffffffffffffffffffffff1990941693909317909316919091179092556001600160a01b038916815290899052206001830190555050505050505050565b60408051808201909152600080825260208201529056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656445524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220de97f5642a5d2a6ad17ab293ee3697c796214b2f93ef2a4236d81ea186bdb2dc64736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/AaveToken__factory.ts b/packages/chain-events/src/contractTypes/factories/AaveToken__factory.ts new file mode 100644 index 00000000000..75b6995689b --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/AaveToken__factory.ts @@ -0,0 +1,541 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { AaveToken } from "../AaveToken"; + +export class AaveToken__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): AaveToken { + return super.attach(address) as AaveToken; + } + connect(signer: Signer): AaveToken__factory { + return super.connect(signer) as AaveToken__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): AaveToken { + return new Contract(address, _abi, signerOrProvider) as AaveToken; + } +} + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: false, + internalType: "uint128", + name: "oldValue", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "newValue", + type: "uint128", + }, + ], + name: "SnapshotDone", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "EIP712_REVISION", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PERMIT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "REVISION", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "_aaveGovernance", + outputs: [ + { + internalType: "contract ITransferHook", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "_countsSnapshots", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "_nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "_snapshots", + outputs: [ + { + internalType: "uint128", + name: "blockNumber", + type: "uint128", + }, + { + internalType: "uint128", + name: "value", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "migrator", + type: "address", + }, + { + internalType: "address", + name: "distributor", + type: "address", + }, + { + internalType: "contract ITransferHook", + name: "aaveGovernance", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405260006006553480156200001657600080fd5b50604080518082018252600a81526920b0bb32902a37b5b2b760b11b6020808301918252835180850190945260048452634141564560e01b908401528151919291620000659160039162000091565b5080516200007b90600490602084019062000091565b50506005805460ff19166012179055506200013d565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620000c9576000855562000114565b82601f10620000e457805160ff191683800117855562000114565b8280016001018555821562000114579182015b8281111562000114578251825591602001919060010190620000f7565b506200012292915062000126565b5090565b5b8082111562000122576000815560010162000127565b611541806200014d6000396000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806378160376116100b8578063b9844d8d1161007c578063b9844d8d146103b2578063c0c53b8b146103d8578063c3863ada14610412578063d505accf14610436578063dd62ed3e14610487578063dde43cba146104b557610137565b806378160376146103245780638779588c1461032c57806395d89b4114610352578063a457c2d71461035a578063a9059cbb1461038657610137565b806330adf81f116100ff57806330adf81f146102a4578063313ce567146102ac5780633644e515146102ca57806339509351146102d257806370a08231146102fe57610137565b806306fdde031461013c578063095ea7b3146101b957806318160ddd146101f957806323b872dd146102135780632acbf82314610249575b600080fd5b6101446104bd565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017e578181015183820152602001610166565b50505050905090810190601f1680156101ab5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101e5600480360360408110156101cf57600080fd5b506001600160a01b038135169060200135610553565b604080519115158252519081900360200190f35b610201610570565b60408051918252519081900360200190f35b6101e56004803603606081101561022957600080fd5b506001600160a01b03813581169160208101359091169060400135610576565b6102756004803603604081101561025f57600080fd5b506001600160a01b0381351690602001356105fd565b60405180836001600160801b03168152602001826001600160801b031681526020019250505060405180910390f35b61020161062e565b6102b4610652565b6040805160ff9092168252519081900360200190f35b61020161065b565b6101e5600480360360408110156102e857600080fd5b506001600160a01b038135169060200135610661565b6102016004803603602081101561031457600080fd5b50356001600160a01b03166106af565b6101446106ca565b6102016004803603602081101561034257600080fd5b50356001600160a01b03166106e7565b6101446106f9565b6101e56004803603604081101561037057600080fd5b506001600160a01b03813516906020013561075a565b6101e56004803603604081101561039c57600080fd5b506001600160a01b0381351690602001356107c2565b610201600480360360208110156103c857600080fd5b50356001600160a01b03166107d6565b610410600480360360608110156103ee57600080fd5b506001600160a01b0381358116916020810135821691604090910135166107e8565b005b61041a6109b1565b604080516001600160a01b039092168252519081900360200190f35b610410600480360360e081101561044c57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c001356109c0565b6102016004803603604081101561049d57600080fd5b506001600160a01b0381358116916020013516610c07565b610201610c32565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105495780601f1061051e57610100808354040283529160200191610549565b820191906000526020600020905b81548152906001019060200180831161052c57829003601f168201915b5050505050905090565b6000610567610560610c37565b8484610c3b565b50600192915050565b60025490565b6000610583848484610d27565b6105f38461058f610c37565b6105ee85604051806060016040528060288152602001611448602891396001600160a01b038a166000908152600160205260408120906105cd610c37565b6001600160a01b031681526020810191909152604001600020549190610e82565b610c3b565b5060019392505050565b603a6020908152600092835260408084209091529082529020546001600160801b0380821691600160801b90041682565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b60055460ff1690565b603d5481565b600061056761066e610c37565b846105ee856001600061067f610c37565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490610f19565b6001600160a01b031660009081526020819052604090205490565b604051806040016040528060018152602001603160f81b81525081565b603b6020526000908152604090205481565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105495780601f1061051e57610100808354040283529160200191610549565b6000610567610767610c37565b846105ee856040518060600160405280602581526020016114e76025913960016000610791610c37565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610e82565b60006105676107cf610c37565b8484610d27565b60396020526000908152604090205481565b60006107f2610f7a565b905060065481116108345760405162461bcd60e51b815260040180806020018281038252602e815260200180611470602e913960400191505060405180910390fd5b6006819055604080518082018252600a8082526920b0bb32902a37b5b2b760b11b60209283018190528351808501855260018152603160f81b9084015283517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818501527fc79ca22c0992a4cca3636d52362fc61ce7d8001b81a7b225d701c42fb0636f32818601527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606082015246608082018190523060a0808401919091528651808403909101815260c0830180885281519190960120603d5561010082019095529282905260e09092019182526109309160039161133b565b50604080518082019091526004808252634141564560e01b602090920191825261095a918161133b565b506109656012610f7f565b603c80546001600160a01b0319166001600160a01b038516179055610995856a0ac0db698068112d000000610f95565b6109aa846a027b46536c66c8e3000000610f95565b5050505050565b603c546001600160a01b031681565b6001600160a01b038716610a0b576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22fa7aba722a960991b604482015290519081900360640190fd5b83421115610a55576040805162461bcd60e51b815260206004820152601260248201527124a72b20a624a22fa2ac2824a920aa24a7a760711b604482015290519081900360640190fd5b6001600160a01b03808816600081815260396020908152604080832054603d5482517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958c166060860152608085018b905260a0850181905260c08086018b90528251808703909101815260e08601835280519084012061190160f01b6101008701526101028601969096526101228086019690965281518086039096018652610142850180835286519684019690962093909552610162840180825283905260ff88166101828501526101a284018790526101c284018690525191926001926101e28083019392601f198301929081900390910190855afa158015610b6a573d6000803e3d6000fd5b505050602060405103516001600160a01b0316896001600160a01b031614610bcd576040805162461bcd60e51b8152602060048201526011602482015270494e56414c49445f5349474e415455524560781b604482015290519081900360640190fd5b610bd8826001610f19565b6001600160a01b038a16600090815260396020526040902055610bfc898989610c3b565b505050505050505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600181565b3390565b6001600160a01b038316610c805760405162461bcd60e51b81526004018080602001828103825260248152602001806114c36024913960400191505060405180910390fd5b6001600160a01b038216610cc55760405162461bcd60e51b81526004018080602001828103825260228152602001806114006022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610d6c5760405162461bcd60e51b815260040180806020018281038252602581526020018061149e6025913960400191505060405180910390fd5b6001600160a01b038216610db15760405162461bcd60e51b81526004018080602001828103825260238152602001806113dd6023913960400191505060405180910390fd5b610dbc838383611085565b610df981604051806060016040528060268152602001611422602691396001600160a01b0386166000908152602081905260409020549190610e82565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610e289082610f19565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610f115760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610ed6578181015183820152602001610ebe565b50505050905090810190601f168015610f035780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610f73576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600190565b6005805460ff191660ff92909216919091179055565b6001600160a01b038216610ff0576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b610ffc60008383611085565b6002546110099082610f19565b6002556001600160a01b03821660009081526020819052604090205461102f9082610f19565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b816001600160a01b0316836001600160a01b031614156110a457611198565b6001600160a01b038316156110d65760006110be846106af565b90506110d484826110cf818661119d565b6111df565b505b6001600160a01b038216156111035760006110f0836106af565b905061110183826110cf8186610f19565b505b603c546001600160a01b0316801561119657806001600160a01b0316634a3931498585856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561117d57600080fd5b505af1158015611191573d6000803e3d6000fd5b505050505b505b505050565b6000610f7383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e82565b6001600160a01b0383166000908152603b6020908152604080832054603a9092529091204391908115801590611233575060001982016000908152602082905260409020546001600160801b038481169116145b15611268576000198201600090815260208290526040902080546001600160801b03808716600160801b0291161790556112e1565b6040805180820182526001600160801b038086168252868116602080840191825260008781528682528581209451855493518516600160801b029085166fffffffffffffffffffffffffffffffff1990941693909317909316919091179092556001600160a01b0389168152603b909152206001830190555b604080516001600160a01b03881681526001600160801b03808816602083015286168183015290517f2cd3c83ddac2953ee75f53265d9ea4463eaf05030e5459a1b7e63819b7ce88f79181900360600190a1505050505050565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261137157600085556113b7565b82601f1061138a57805160ff19168380011785556113b7565b828001600101855582156113b7579182015b828111156113b757825182559160200191906001019061139c565b506113c39291506113c7565b5090565b5b808211156113c357600081556001016113c856fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656445524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220c1493cd58f4876c2a06be8072eb4231a03c6cf000fb20ae62469f58c1eec5ca564736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/AccessControl__factory.ts b/packages/chain-events/src/contractTypes/factories/AccessControl__factory.ts new file mode 100644 index 00000000000..8175c3d9596 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/AccessControl__factory.ts @@ -0,0 +1,224 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { AccessControl } from "../AccessControl"; + +export class AccessControl__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): AccessControl { + return new Contract(address, _abi, signerOrProvider) as AccessControl; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "getRoleAdmin", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/BaseAdminUpgradeabilityProxy__factory.ts b/packages/chain-events/src/contractTypes/factories/BaseAdminUpgradeabilityProxy__factory.ts new file mode 100644 index 00000000000..a54a87766fb --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/BaseAdminUpgradeabilityProxy__factory.ts @@ -0,0 +1,155 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { BaseAdminUpgradeabilityProxy } from "../BaseAdminUpgradeabilityProxy"; + +export class BaseAdminUpgradeabilityProxy__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + overrides || {} + ) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): BaseAdminUpgradeabilityProxy { + return super.attach(address) as BaseAdminUpgradeabilityProxy; + } + connect(signer: Signer): BaseAdminUpgradeabilityProxy__factory { + return super.connect(signer) as BaseAdminUpgradeabilityProxy__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): BaseAdminUpgradeabilityProxy { + return new Contract( + address, + _abi, + signerOrProvider + ) as BaseAdminUpgradeabilityProxy; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "previousAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "AdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "changeAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "implementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "upgradeTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50610652806100206000396000f3fe60806040526004361061004a5760003560e01c80633659cfe6146100545780634f1ef286146100875780635c60da1b146101075780638f28397014610138578063f851a4401461016b575b610052610180565b005b34801561006057600080fd5b506100526004803603602081101561007757600080fd5b50356001600160a01b031661019a565b6100526004803603604081101561009d57600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100c857600080fd5b8201836020820111156100da57600080fd5b803590602001918460018302840111640100000000831117156100fc57600080fd5b5090925090506101d4565b34801561011357600080fd5b5061011c610281565b604080516001600160a01b039092168252519081900360200190f35b34801561014457600080fd5b506100526004803603602081101561015b57600080fd5b50356001600160a01b03166102be565b34801561017757600080fd5b5061011c610378565b6101886103a3565b610198610193610403565b610428565b565b6101a261044c565b6001600160a01b0316336001600160a01b031614156101c9576101c481610471565b6101d1565b6101d1610180565b50565b6101dc61044c565b6001600160a01b0316336001600160a01b03161415610274576101fe83610471565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d806000811461025b576040519150601f19603f3d011682016040523d82523d6000602084013e610260565b606091505b505090508061026e57600080fd5b5061027c565b61027c610180565b505050565b600061028b61044c565b6001600160a01b0316336001600160a01b031614156102b3576102ac610403565b90506102bb565b6102bb610180565b90565b6102c661044c565b6001600160a01b0316336001600160a01b031614156101c9576001600160a01b0381166103245760405162461bcd60e51b81526004018080602001828103825260368152602001806105ac6036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61034d61044c565b604080516001600160a01b03928316815291841660208301528051918290030190a16101c4816104b1565b600061038261044c565b6001600160a01b0316336001600160a01b031614156102b3576102ac61044c565b6103ab61044c565b6001600160a01b0316336001600160a01b031614156103fb5760405162461bcd60e51b815260040180806020018281038252603281526020018061057a6032913960400191505060405180910390fd5b610198610198565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015610447573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b61047a816104d5565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b6104de8161053d565b6105195760405162461bcd60e51b815260040180806020018281038252603b8152602001806105e2603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061057157508115155b94935050505056fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220cfe0ef50db6a668875331bc0482bd8a95b7b16befba4ad6e488800f28191bb9664736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/BaseUpgradeabilityProxy__factory.ts b/packages/chain-events/src/contractTypes/factories/BaseUpgradeabilityProxy__factory.ts new file mode 100644 index 00000000000..5550568fde1 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/BaseUpgradeabilityProxy__factory.ts @@ -0,0 +1,64 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { BaseUpgradeabilityProxy } from "../BaseUpgradeabilityProxy"; + +export class BaseUpgradeabilityProxy__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): BaseUpgradeabilityProxy { + return super.attach(address) as BaseUpgradeabilityProxy; + } + connect(signer: Signer): BaseUpgradeabilityProxy__factory { + return super.connect(signer) as BaseUpgradeabilityProxy__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): BaseUpgradeabilityProxy { + return new Contract( + address, + _abi, + signerOrProvider + ) as BaseUpgradeabilityProxy; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + stateMutability: "payable", + type: "fallback", + }, +]; + +const _bytecode = + "0x6080604052348015600f57600080fd5b50609e8061001e6000396000f3fe6080604052600a600c565b005b6012601e565b601e601a6020565b6045565b565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e8080156063573d6000f35b3d6000fdfea2646970667358221220e4901ea3762a7fb5b5f80384443773d099f4d8473d4418fed0d26a5bdc17d9f564736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/CompInterface__factory.ts b/packages/chain-events/src/contractTypes/factories/CompInterface__factory.ts new file mode 100644 index 00000000000..abb1e727c84 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/CompInterface__factory.ts @@ -0,0 +1,46 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { CompInterface } from "../CompInterface"; + +export class CompInterface__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): CompInterface { + return new Contract(address, _abi, signerOrProvider) as CompInterface; + } +} + +const _abi = [ + { + constant: true, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getPriorVotes", + outputs: [ + { + internalType: "uint96", + name: "", + type: "uint96", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/Context__factory.ts b/packages/chain-events/src/contractTypes/factories/Context__factory.ts new file mode 100644 index 00000000000..b4b582faa8f --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/Context__factory.ts @@ -0,0 +1,26 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { Context } from "../Context"; + +export class Context__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Context { + return new Contract(address, _abi, signerOrProvider) as Context; + } +} + +const _abi = [ + { + inputs: [], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/ERC165__factory.ts b/packages/chain-events/src/contractTypes/factories/ERC165__factory.ts new file mode 100644 index 00000000000..dc5e4f9a697 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ERC165__factory.ts @@ -0,0 +1,44 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { ERC165 } from "../ERC165"; + +export class ERC165__factory { + static connect(address: string, signerOrProvider: Signer | Provider): ERC165 { + return new Contract(address, _abi, signerOrProvider) as ERC165; + } +} + +const _abi = [ + { + inputs: [], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + constant: true, + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/ERC20Permit__factory.ts b/packages/chain-events/src/contractTypes/factories/ERC20Permit__factory.ts new file mode 100644 index 00000000000..7cd0a4f946f --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ERC20Permit__factory.ts @@ -0,0 +1,365 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { ERC20Permit } from "../ERC20Permit"; + +export class ERC20Permit__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ERC20Permit { + return new Contract(address, _abi, signerOrProvider) as ERC20Permit; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/ERC20VotesComp__factory.ts b/packages/chain-events/src/contractTypes/factories/ERC20VotesComp__factory.ts new file mode 100644 index 00000000000..b07f25de3f9 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ERC20VotesComp__factory.ts @@ -0,0 +1,645 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { ERC20VotesComp } from "../ERC20VotesComp"; + +export class ERC20VotesComp__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ERC20VotesComp { + return new Contract(address, _abi, signerOrProvider) as ERC20VotesComp; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "fromDelegate", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "toDelegate", + type: "address", + }, + ], + name: "DelegateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegate", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "previousBalance", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newBalance", + type: "uint256", + }, + ], + name: "DelegateVotesChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint32", + name: "pos", + type: "uint32", + }, + ], + name: "checkpoints", + outputs: [ + { + components: [ + { + internalType: "uint32", + name: "fromBlock", + type: "uint32", + }, + { + internalType: "uint224", + name: "votes", + type: "uint224", + }, + ], + internalType: "struct ERC20Votes.Checkpoint", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + ], + name: "delegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "delegateBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "delegates", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "getCurrentVotes", + outputs: [ + { + internalType: "uint96", + name: "", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getPastTotalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getPastVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getPriorVotes", + outputs: [ + { + internalType: "uint96", + name: "", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "numCheckpoints", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/ERC20VotesMock__factory.ts b/packages/chain-events/src/contractTypes/factories/ERC20VotesMock__factory.ts new file mode 100644 index 00000000000..f35b2e368ef --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ERC20VotesMock__factory.ts @@ -0,0 +1,698 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { ERC20VotesMock } from "../ERC20VotesMock"; + +export class ERC20VotesMock__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + name: string, + symbol: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + name, + symbol, + overrides || {} + ) as Promise; + } + getDeployTransaction( + name: string, + symbol: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(name, symbol, overrides || {}); + } + attach(address: string): ERC20VotesMock { + return super.attach(address) as ERC20VotesMock; + } + connect(signer: Signer): ERC20VotesMock__factory { + return super.connect(signer) as ERC20VotesMock__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ERC20VotesMock { + return new Contract(address, _abi, signerOrProvider) as ERC20VotesMock; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "string", + name: "symbol", + type: "string", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "fromDelegate", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "toDelegate", + type: "address", + }, + ], + name: "DelegateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegate", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "previousBalance", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newBalance", + type: "uint256", + }, + ], + name: "DelegateVotesChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "burn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint32", + name: "pos", + type: "uint32", + }, + ], + name: "checkpoints", + outputs: [ + { + components: [ + { + internalType: "uint32", + name: "fromBlock", + type: "uint32", + }, + { + internalType: "uint224", + name: "votes", + type: "uint224", + }, + ], + internalType: "struct ERC20Votes.Checkpoint", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + ], + name: "delegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "delegateBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "delegates", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getChainId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getPastTotalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getPastVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "numCheckpoints", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x6101406040527f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9610120523480156200003757600080fd5b50604051620021cb380380620021cb8339810160408190526200005a9162000295565b8180604051806040016040528060018152602001603160f81b81525084848160039080519060200190620000909291906200013c565b508051620000a69060049060208401906200013c565b5050825160209384012082519284019290922060c083815260e08290524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818a0181905281830198909852606081019590955260808086019390935230858301528051808603909201825293909201909252805194019390932090925261010052506200034f92505050565b8280546200014a90620002fc565b90600052602060002090601f0160209004810192826200016e5760008555620001b9565b82601f106200018957805160ff1916838001178555620001b9565b82800160010185558215620001b9579182015b82811115620001b95782518255916020019190600101906200019c565b50620001c7929150620001cb565b5090565b5b80821115620001c75760008155600101620001cc565b600082601f830112620001f3578081fd5b81516001600160401b038082111562000210576200021062000339565b604051601f8301601f19908116603f011681019082821181831017156200023b576200023b62000339565b8160405283815260209250868385880101111562000257578485fd5b8491505b838210156200027a57858201830151818301840152908201906200025b565b838211156200028b57848385830101525b9695505050505050565b60008060408385031215620002a8578182fd5b82516001600160401b0380821115620002bf578384fd5b620002cd86838701620001e2565b93506020850151915080821115620002e3578283fd5b50620002f285828601620001e2565b9150509250929050565b600181811c908216806200031157607f821691505b602082108114156200033357634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160a05160c05160e0516101005161012051611e2c6200039f60003960006109ab01526000610ea101526000610ef001526000610ecb01526000610e4f01526000610e780152611e2c6000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80636fcfff45116100de5780639dc29fac11610097578063c3cda52011610071578063c3cda52014610358578063d505accf1461036b578063dd62ed3e1461037e578063f1127ed8146103b757600080fd5b80639dc29fac1461031f578063a457c2d714610332578063a9059cbb1461034557600080fd5b80636fcfff451461028d57806370a08231146102b55780637ecebe00146102de5780638e539e8c146102f157806395d89b41146103045780639ab24eb01461030c57600080fd5b80633644e515116101305780633644e515146101f357806339509351146101fb5780633a46b1a81461020e57806340c10f1914610221578063587cde1e146102365780635c19a95c1461027a57600080fd5b806306fdde0314610178578063095ea7b31461019657806318160ddd146101b957806323b872dd146101cb578063313ce567146101de5780633408e470146101ed575b600080fd5b6101806103f4565b60405161018d9190611d09565b60405180910390f35b6101a96101a4366004611c33565b610486565b604051901515815260200161018d565b6002545b60405190815260200161018d565b6101a96101d9366004611b8f565b61049c565b6040516012815260200161018d565b466101bd565b6101bd61054b565b6101a9610209366004611c33565b61055a565b6101bd61021c366004611c33565b610596565b61023461022f366004611c33565b610610565b005b610262610244366004611b43565b6001600160a01b039081166000908152600660205260409020541690565b6040516001600160a01b03909116815260200161018d565b610234610288366004611b43565b61061e565b6102a061029b366004611b43565b61062b565b60405163ffffffff909116815260200161018d565b6101bd6102c3366004611b43565b6001600160a01b031660009081526020819052604090205490565b6101bd6102ec366004611b43565b610653565b6101bd6102ff366004611cf1565b610671565b6101806106cd565b6101bd61031a366004611b43565b6106dc565b61023461032d366004611c33565b610771565b6101a9610340366004611c33565b61077b565b6101a9610353366004611c33565b610814565b610234610366366004611c5c565b610821565b610234610379366004611bca565b610957565b6101bd61038c366004611b5d565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6103ca6103c5366004611cb3565b610abb565b60408051825163ffffffff1681526020928301516001600160e01b0316928101929092520161018d565b60606003805461040390611dab565b80601f016020809104026020016040519081016040528092919081815260200182805461042f90611dab565b801561047c5780601f106104515761010080835404028352916020019161047c565b820191906000526020600020905b81548152906001019060200180831161045f57829003601f168201915b5050505050905090565b6000610493338484610b4d565b50600192915050565b60006104a9848484610c71565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156105335760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6105408533858403610b4d565b506001949350505050565b6000610555610e4b565b905090565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610493918590610591908690611d5c565b610b4d565b60004382106105e75760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e656400604482015260640161052a565b6001600160a01b03831660009081526007602052604090206106099083610f3e565b9392505050565b61061a8282611017565b5050565b61062833826110a1565b50565b6001600160a01b03811660009081526007602052604081205461064d9061111a565b92915050565b6001600160a01b03811660009081526005602052604081205461064d565b60004382106106c25760405162461bcd60e51b815260206004820152601f60248201527f4552433230566f7465733a20626c6f636b206e6f7420796574206d696e656400604482015260640161052a565b61064d600883610f3e565b60606004805461040390611dab565b6001600160a01b038116600090815260076020526040812054801561075e576001600160a01b038316600090815260076020526040902061071e600183611d94565b8154811061073c57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316610761565b60005b6001600160e01b03169392505050565b61061a8282611183565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156107fd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161052a565b61080a3385858403610b4d565b5060019392505050565b6000610493338484610c71565b834211156108715760405162461bcd60e51b815260206004820152601d60248201527f4552433230566f7465733a207369676e61747572652065787069726564000000604482015260640161052a565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906108eb906108e39060a0016040516020818303038152906040528051906020012061119b565b8585856111e9565b90506108f681611211565b86146109445760405162461bcd60e51b815260206004820152601960248201527f4552433230566f7465733a20696e76616c6964206e6f6e636500000000000000604482015260640161052a565b61094e81886110a1565b50505050505050565b834211156109a75760405162461bcd60e51b815260206004820152601d60248201527f45524332305065726d69743a206578706972656420646561646c696e65000000604482015260640161052a565b60007f00000000000000000000000000000000000000000000000000000000000000008888886109d68c611211565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090506000610a318261119b565b90506000610a41828787876111e9565b9050896001600160a01b0316816001600160a01b031614610aa45760405162461bcd60e51b815260206004820152601e60248201527f45524332305065726d69743a20696e76616c6964207369676e61747572650000604482015260640161052a565b610aaf8a8a8a610b4d565b50505050505050505050565b60408051808201909152600080825260208201526001600160a01b0383166000908152600760205260409020805463ffffffff8416908110610b0d57634e487b7160e01b600052603260045260246000fd5b60009182526020918290206040805180820190915291015463ffffffff8116825264010000000090046001600160e01b0316918101919091529392505050565b6001600160a01b038316610baf5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161052a565b6001600160a01b038216610c105760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161052a565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cd55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161052a565b6001600160a01b038216610d375760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161052a565b6001600160a01b03831660009081526020819052604090205481811015610daf5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161052a565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610de6908490611d5c565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610e3291815260200190565b60405180910390a3610e4584848461123e565b50505050565b60007f0000000000000000000000000000000000000000000000000000000000000000461415610e9a57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b8154600090815b81811015610fb0576000610f598284611270565b905084868281548110610f7c57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff161115610f9c57809250610faa565b610fa7816001611d5c565b91505b50610f45565b81156110025784610fc2600184611d94565b81548110610fe057634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b0316611005565b60005b6001600160e01b031695945050505050565b611021828261128b565b6002546001600160e01b0310156110935760405162461bcd60e51b815260206004820152603060248201527f4552433230566f7465733a20746f74616c20737570706c79207269736b73206f60448201526f766572666c6f77696e6720766f74657360801b606482015260840161052a565b610e4560086113728361137e565b6001600160a01b038281166000818152600660208181526040808420805485845282862054949093528787166001600160a01b03198416811790915590519190951694919391928592917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4610e45828483611521565b600063ffffffff82111561117f5760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201526532206269747360d01b606482015260840161052a565b5090565b61118d828261165e565b610e4560086117b38361137e565b600061064d6111a8610e4b565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008060006111fa878787876117bf565b91509150611207816118ac565b5095945050505050565b6001600160a01b03811660009081526005602052604090208054600181018255905b50919050565b505050565b6001600160a01b0383811660009081526006602052604080822054858416835291205461123992918216911683611521565b600061127f6002848418611d74565b61060990848416611d5c565b6001600160a01b0382166112e15760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161052a565b80600260008282546112f39190611d5c565b90915550506001600160a01b03821660009081526020819052604081208054839290611320908490611d5c565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a361061a6000838361123e565b60006106098284611d5c565b8254600090819080156113d75785611397600183611d94565b815481106113b557634e487b7160e01b600052603260045260246000fd5b60009182526020909120015464010000000090046001600160e01b03166113da565b60005b6001600160e01b031692506113f383858763ffffffff16565b915060008111801561143f5750438661140d600184611d94565b8154811061142b57634e487b7160e01b600052603260045260246000fd5b60009182526020909120015463ffffffff16145b156114ad5761144d82611aad565b86611459600184611d94565b8154811061147757634e487b7160e01b600052603260045260246000fd5b9060005260206000200160000160046101000a8154816001600160e01b0302191690836001600160e01b03160217905550611518565b8560405180604001604052806114c24361111a565b63ffffffff1681526020016114d685611aad565b6001600160e01b0390811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b50935093915050565b816001600160a01b0316836001600160a01b0316141580156115435750600081115b15611239576001600160a01b038316156115d1576001600160a01b0383166000908152600760205260408120819061157e906117b38561137e565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516115c6929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615611239576001600160a01b03821660009081526007602052604081208190611607906113728561137e565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405161164f929190918252602082015260400190565b60405180910390a25050505050565b6001600160a01b0382166116be5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161052a565b6001600160a01b038216600090815260208190526040902054818110156117325760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161052a565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611761908490611d94565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a36112398360008461123e565b60006106098284611d94565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156117f657506000905060036118a3565b8460ff16601b1415801561180e57508460ff16601c14155b1561181f57506000905060046118a3565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611873573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661189c576000600192509250506118a3565b9150600090505b94509492505050565b60008160048111156118ce57634e487b7160e01b600052602160045260246000fd5b14156118d75750565b60018160048111156118f957634e487b7160e01b600052602160045260246000fd5b14156119475760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161052a565b600281600481111561196957634e487b7160e01b600052602160045260246000fd5b14156119b75760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161052a565b60038160048111156119d957634e487b7160e01b600052602160045260246000fd5b1415611a325760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161052a565b6004816004811115611a5457634e487b7160e01b600052602160045260246000fd5b14156106285760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161052a565b60006001600160e01b0382111561117f5760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e20326044820152663234206269747360c81b606482015260840161052a565b80356001600160a01b0381168114611b2d57600080fd5b919050565b803560ff81168114611b2d57600080fd5b600060208284031215611b54578081fd5b61060982611b16565b60008060408385031215611b6f578081fd5b611b7883611b16565b9150611b8660208401611b16565b90509250929050565b600080600060608486031215611ba3578081fd5b611bac84611b16565b9250611bba60208501611b16565b9150604084013590509250925092565b600080600080600080600060e0888a031215611be4578283fd5b611bed88611b16565b9650611bfb60208901611b16565b95506040880135945060608801359350611c1760808901611b32565b925060a0880135915060c0880135905092959891949750929550565b60008060408385031215611c45578182fd5b611c4e83611b16565b946020939093013593505050565b60008060008060008060c08789031215611c74578182fd5b611c7d87611b16565b95506020870135945060408701359350611c9960608801611b32565b92506080870135915060a087013590509295509295509295565b60008060408385031215611cc5578182fd5b611cce83611b16565b9150602083013563ffffffff81168114611ce6578182fd5b809150509250929050565b600060208284031215611d02578081fd5b5035919050565b6000602080835283518082850152825b81811015611d3557858101830151858201604001528201611d19565b81811115611d465783604083870101525b50601f01601f1916929092016040019392505050565b60008219821115611d6f57611d6f611de0565b500190565b600082611d8f57634e487b7160e01b81526012600452602481fd5b500490565b600082821015611da657611da6611de0565b500390565b600181811c90821680611dbf57607f821691505b6020821081141561123357634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fdfea26469706673582212200f5fb4189d7ccb4e17b08af4e38c8a261ee020dd23f103b8b8b04cb130db2d1f64736f6c63430008040033"; diff --git a/packages/chain-events/src/contractTypes/factories/ERC20Votes__factory.ts b/packages/chain-events/src/contractTypes/factories/ERC20Votes__factory.ts new file mode 100644 index 00000000000..47b1a1bc7c7 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ERC20Votes__factory.ts @@ -0,0 +1,602 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { ERC20Votes } from "../ERC20Votes"; + +export class ERC20Votes__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ERC20Votes { + return new Contract(address, _abi, signerOrProvider) as ERC20Votes; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "fromDelegate", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "toDelegate", + type: "address", + }, + ], + name: "DelegateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegate", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "previousBalance", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newBalance", + type: "uint256", + }, + ], + name: "DelegateVotesChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint32", + name: "pos", + type: "uint32", + }, + ], + name: "checkpoints", + outputs: [ + { + components: [ + { + internalType: "uint32", + name: "fromBlock", + type: "uint32", + }, + { + internalType: "uint224", + name: "votes", + type: "uint224", + }, + ], + internalType: "struct ERC20Votes.Checkpoint", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + ], + name: "delegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "delegateBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "delegates", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getPastTotalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getPastVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "numCheckpoints", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/ERC20__factory.ts b/packages/chain-events/src/contractTypes/factories/ERC20__factory.ts new file mode 100644 index 00000000000..daefaa53569 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ERC20__factory.ts @@ -0,0 +1,287 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { ERC20 } from "../ERC20"; + +export class ERC20__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): ERC20 { + return super.attach(address) as ERC20; + } + connect(signer: Signer): ERC20__factory { + return super.connect(signer) as ERC20__factory; + } + static connect(address: string, signerOrProvider: Signer | Provider): ERC20 { + return new Contract(address, _abi, signerOrProvider) as ERC20; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b506104e9806100206000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610149578063a457c2d71461016f578063a9059cbb1461019b578063dd62ed3e146101c757610088565b8063095ea7b31461008d57806318160ddd146100cd57806323b872dd146100e7578063395093511461011d575b600080fd5b6100b9600480360360408110156100a357600080fd5b506001600160a01b0381351690602001356101f5565b604080519115158252519081900360200190f35b6100d561020b565b60408051918252519081900360200190f35b6100b9600480360360608110156100fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610211565b6100b96004803603604081101561013357600080fd5b506001600160a01b038135169060200135610268565b6100d56004803603602081101561015f57600080fd5b50356001600160a01b03166102a4565b6100b96004803603604081101561018557600080fd5b506001600160a01b0381351690602001356102bf565b6100b9600480360360408110156101b157600080fd5b506001600160a01b0381351690602001356102fb565b6100d5600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610308565b6000610202338484610333565b50600192915050565b60025490565b600061021e8484846103bb565b6001600160a01b03841660009081526001602090815260408083203380855292529091205461025e918691610259908663ffffffff61048616565b610333565b5060019392505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610202918590610259908663ffffffff61049b16565b6001600160a01b031660009081526020819052604090205490565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610202918590610259908663ffffffff61048616565b60006102023384846103bb565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03821661034657600080fd5b6001600160a01b03831661035957600080fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0382166103ce57600080fd5b6001600160a01b0383166000908152602081905260409020546103f7908263ffffffff61048616565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461042c908263ffffffff61049b16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282111561049557600080fd5b50900390565b6000828201838110156104ad57600080fd5b939250505056fea265627a7a72315820dd4a124a1adb922bcd37081038befba5701b9f01e6ac47842708ecfd2a9fc19364736f6c63430005100032"; diff --git a/packages/chain-events/src/contractTypes/factories/ERC721__factory.ts b/packages/chain-events/src/contractTypes/factories/ERC721__factory.ts new file mode 100644 index 00000000000..b85127f19e2 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ERC721__factory.ts @@ -0,0 +1,351 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { ERC721 } from "../ERC721"; + +export class ERC721__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): ERC721 { + return super.attach(address) as ERC721; + } + connect(signer: Signer): ERC721__factory { + return super.connect(signer) as ERC721__factory; + } + static connect(address: string, signerOrProvider: Signer | Provider): ERC721 { + return new Contract(address, _abi, signerOrProvider) as ERC721; + } +} + +const _abi = [ + { + inputs: [], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "approved", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "ApprovalForAll", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "approve", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "getApproved", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "isApprovedForAll", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "ownerOf", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "safeTransferFrom", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "safeTransferFrom", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "setApprovalForAll", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b5061002a6301ffc9a760e01b6001600160e01b0361004816565b6100436380ac58cd60e01b6001600160e01b0361004816565b6100cc565b6001600160e01b031980821614156100a7576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b610f94806100db6000396000f3fe608060405234801561001057600080fd5b506004361061009e5760003560e01c80636352211e116100665780636352211e146101b157806370a08231146101ce578063a22cb46514610206578063b88d4fde14610234578063e985e9c5146102fa5761009e565b806301ffc9a7146100a3578063081812fc146100de578063095ea7b31461011757806323b872dd1461014557806342842e0e1461017b575b600080fd5b6100ca600480360360208110156100b957600080fd5b50356001600160e01b031916610328565b604080519115158252519081900360200190f35b6100fb600480360360208110156100f457600080fd5b5035610347565b604080516001600160a01b039092168252519081900360200190f35b6101436004803603604081101561012d57600080fd5b506001600160a01b0381351690602001356103a9565b005b6101436004803603606081101561015b57600080fd5b506001600160a01b038135811691602081013590911690604001356104d1565b6101436004803603606081101561019157600080fd5b506001600160a01b0381358116916020810135909116906040013561052d565b6100fb600480360360208110156101c757600080fd5b5035610548565b6101f4600480360360208110156101e457600080fd5b50356001600160a01b03166105a2565b60408051918252519081900360200190f35b6101436004803603604081101561021c57600080fd5b506001600160a01b038135169060200135151561060a565b6101436004803603608081101561024a57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561028557600080fd5b82018360208201111561029757600080fd5b803590602001918460018302840111640100000000831117156102b957600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061070f945050505050565b6100ca6004803603604081101561031057600080fd5b506001600160a01b038135811691602001351661076d565b6001600160e01b03191660009081526020819052604090205460ff1690565b60006103528261079b565b61038d5760405162461bcd60e51b815260040180806020018281038252602c815260200180610eb9602c913960400191505060405180910390fd5b506000908152600260205260409020546001600160a01b031690565b60006103b482610548565b9050806001600160a01b0316836001600160a01b031614156104075760405162461bcd60e51b8152600401808060200182810382526021815260200180610f0e6021913960400191505060405180910390fd5b806001600160a01b03166104196107b8565b6001600160a01b0316148061043a575061043a816104356107b8565b61076d565b6104755760405162461bcd60e51b8152600401808060200182810382526038815260200180610e2e6038913960400191505060405180910390fd5b60008281526002602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6104e26104dc6107b8565b826107bc565b61051d5760405162461bcd60e51b8152600401808060200182810382526031815260200180610f2f6031913960400191505060405180910390fd5b610528838383610860565b505050565b6105288383836040518060200160405280600081525061070f565b6000818152600160205260408120546001600160a01b03168061059c5760405162461bcd60e51b8152600401808060200182810382526029815260200180610e906029913960400191505060405180910390fd5b92915050565b60006001600160a01b0382166105e95760405162461bcd60e51b815260040180806020018281038252602a815260200180610e66602a913960400191505060405180910390fd5b6001600160a01b038216600090815260036020526040902061059c906109a4565b6106126107b8565b6001600160a01b0316826001600160a01b03161415610678576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b80600460006106856107b8565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556106c96107b8565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b61072061071a6107b8565b836107bc565b61075b5760405162461bcd60e51b8152600401808060200182810382526031815260200180610f2f6031913960400191505060405180910390fd5b610767848484846109a8565b50505050565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205460ff1690565b6000908152600160205260409020546001600160a01b0316151590565b3390565b60006107c78261079b565b6108025760405162461bcd60e51b815260040180806020018281038252602c815260200180610e02602c913960400191505060405180910390fd5b600061080d83610548565b9050806001600160a01b0316846001600160a01b031614806108485750836001600160a01b031661083d84610347565b6001600160a01b0316145b806108585750610858818561076d565b949350505050565b826001600160a01b031661087382610548565b6001600160a01b0316146108b85760405162461bcd60e51b8152600401808060200182810382526029815260200180610ee56029913960400191505060405180910390fd5b6001600160a01b0382166108fd5760405162461bcd60e51b8152600401808060200182810382526024815260200180610dde6024913960400191505060405180910390fd5b610906816109fa565b6001600160a01b038316600090815260036020526040902061092790610a37565b6001600160a01b038216600090815260036020526040902061094890610a4e565b60008181526001602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b5490565b6109b3848484610860565b6109bf84848484610a57565b6107675760405162461bcd60e51b8152600401808060200182810382526032815260200180610dac6032913960400191505060405180910390fd5b6000818152600260205260409020546001600160a01b031615610a3457600081815260026020526040902080546001600160a01b03191690555b50565b8054610a4a90600163ffffffff610c9216565b9055565b80546001019055565b6000610a6b846001600160a01b0316610cdb565b610a7757506001610858565b600060606001600160a01b038616630a85bd0160e11b610a956107b8565b89888860405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610b0e578181015183820152602001610af6565b50505050905090810190601f168015610b3b5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909a16999099178952518151919890975087965094509250829150849050835b60208310610ba35780518252601f199092019160209182019101610b84565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610c05576040519150601f19603f3d011682016040523d82523d6000602084013e610c0a565b606091505b509150915081610c5b57805115610c245780518082602001fd5b60405162461bcd60e51b8152600401808060200182810382526032815260200180610dac6032913960400191505060405180910390fd5b6000818060200190516020811015610c7257600080fd5b50516001600160e01b031916630a85bd0160e11b14935061085892505050565b6000610cd483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610d14565b9392505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610858575050151592915050565b60008184841115610da35760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610d68578181015183820152602001610d50565b50505050905090810190601f168015610d955780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50505090039056fe4552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a265627a7a72315820a41618b522e59a66ce8573b2c6222da9fb280fe76333872c4dfe3b0acb38d00864736f6c63430005100032"; diff --git a/packages/chain-events/src/contractTypes/factories/ERC777__factory.ts b/packages/chain-events/src/contractTypes/factories/ERC777__factory.ts new file mode 100644 index 00000000000..f743d6a16b4 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ERC777__factory.ts @@ -0,0 +1,669 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { ERC777 } from "../ERC777"; + +export class ERC777__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + name: string, + symbol: string, + defaultOperators: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + name, + symbol, + defaultOperators, + overrides || {} + ) as Promise; + } + getDeployTransaction( + name: string, + symbol: string, + defaultOperators: string[], + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + name, + symbol, + defaultOperators, + overrides || {} + ); + } + attach(address: string): ERC777 { + return super.attach(address) as ERC777; + } + connect(signer: Signer): ERC777__factory { + return super.connect(signer) as ERC777__factory; + } + static connect(address: string, signerOrProvider: Signer | Provider): ERC777 { + return new Contract(address, _abi, signerOrProvider) as ERC777; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "name", + type: "string", + }, + { + internalType: "string", + name: "symbol", + type: "string", + }, + { + internalType: "address[]", + name: "defaultOperators", + type: "address[]", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "tokenHolder", + type: "address", + }, + ], + name: "AuthorizedOperator", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "operatorData", + type: "bytes", + }, + ], + name: "Burned", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "operatorData", + type: "bytes", + }, + ], + name: "Minted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "tokenHolder", + type: "address", + }, + ], + name: "RevokedOperator", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "operatorData", + type: "bytes", + }, + ], + name: "Sent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "holder", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "authorizeOperator", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "tokenHolder", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "burn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "pure", + type: "function", + }, + { + constant: true, + inputs: [], + name: "defaultOperators", + outputs: [ + { + internalType: "address[]", + name: "", + type: "address[]", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "granularity", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "address", + name: "tokenHolder", + type: "address", + }, + ], + name: "isOperatorFor", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "bytes", + name: "operatorData", + type: "bytes", + }, + ], + name: "operatorBurn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "bytes", + name: "operatorData", + type: "bytes", + }, + ], + name: "operatorSend", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "revokeOperator", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "send", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "holder", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b506040516200239238038062002392833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405260200180516040519392919084640100000000821115620001bc57600080fd5b908301906020820185811115620001d257600080fd5b8251866020820283011164010000000082111715620001f057600080fd5b82525081516020918201928201910280838360005b838110156200021f57818101518382015260200162000205565b50505050919091016040525050845162000243925060029150602086019062000406565b5081516200025990600390602085019062000406565b5080516200026f9060049060208401906200048b565b5060005b600454811015620002cf57600160056000600484815481106200029257fe5b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff191691151591909117905560010162000273565b50604080516a22a9219b9b9baa37b5b2b760a91b8152815190819003600b0181206329965a1d60e01b82523060048301819052602483019190915260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad24916329965a1d91606480830192600092919082900301818387803b1580156200034e57600080fd5b505af115801562000363573d6000803e3d6000fd5b5050604080516922a92199182a37b5b2b760b11b8152815190819003600a0181206329965a1d60e01b82523060048301819052602483019190915260448201529051731820a4b7618bde71dce8cdc73aab6c95905fad2493506329965a1d9250606480830192600092919082900301818387803b158015620003e457600080fd5b505af1158015620003f9573d6000803e3d6000fd5b5050505050505062000538565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200044957805160ff191683800117855562000479565b8280016001018555821562000479579182015b82811115620004795782518255916020019190600101906200045c565b5062000487929150620004f1565b5090565b828054828255906000526020600020908101928215620004e3579160200282015b82811115620004e357825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620004ac565b506200048792915062000511565b6200050e91905b80821115620004875760008155600101620004f8565b90565b6200050e91905b80821115620004875780546001600160a01b031916815560010162000518565b611e4a80620005486000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c8063959b8c3f116100a2578063d95b637111610071578063d95b63711461052a578063dd62ed3e14610558578063fad8b32a14610586578063fc673c4f146105ac578063fe9d9303146106ea57610116565b8063959b8c3f1461041757806395d89b411461043d5780639bd9bbc614610445578063a9059cbb146104fe57610116565b806323b872dd116100e957806323b872dd1461024a578063313ce56714610280578063556f0dc71461029e57806362ad1b83146102a657806370a08231146103f157610116565b806306e485381461011b57806306fdde0314610173578063095ea7b3146101f057806318160ddd14610230575b600080fd5b610123610795565b60408051602080825283518183015283519192839290830191858101910280838360005b8381101561015f578181015183820152602001610147565b505050509050019250505060405180910390f35b61017b6107f7565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101b557818101518382015260200161019d565b50505050905090810190601f1680156101e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61021c6004803603604081101561020657600080fd5b506001600160a01b038135169060200135610881565b604080519115158252519081900360200190f35b6102386108a3565b60408051918252519081900360200190f35b61021c6004803603606081101561026057600080fd5b506001600160a01b038135811691602081013590911690604001356108a9565b610288610a2c565b6040805160ff9092168252519081900360200190f35b610238610a31565b6103ef600480360360a08110156102bc57600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b8111156102f657600080fd5b82018360208201111561030857600080fd5b803590602001918460018302840111600160201b8311171561032957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561037b57600080fd5b82018360208201111561038d57600080fd5b803590602001918460018302840111600160201b831117156103ae57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610a36945050505050565b005b6102386004803603602081101561040757600080fd5b50356001600160a01b0316610aa0565b6103ef6004803603602081101561042d57600080fd5b50356001600160a01b0316610abb565b61017b610c07565b6103ef6004803603606081101561045b57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561048a57600080fd5b82018360208201111561049c57600080fd5b803590602001918460018302840111600160201b831117156104bd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c68945050505050565b61021c6004803603604081101561051457600080fd5b506001600160a01b038135169060200135610c9a565b61021c6004803603604081101561054057600080fd5b506001600160a01b0381358116916020013516610d73565b6102386004803603604081101561056e57600080fd5b506001600160a01b0381358116916020013516610e15565b6103ef6004803603602081101561059c57600080fd5b50356001600160a01b0316610e40565b6103ef600480360360808110156105c257600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156105f157600080fd5b82018360208201111561060357600080fd5b803590602001918460018302840111600160201b8311171561062457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561067657600080fd5b82018360208201111561068857600080fd5b803590602001918460018302840111600160201b831117156106a957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610f8c945050505050565b6103ef6004803603604081101561070057600080fd5b81359190810190604081016020820135600160201b81111561072157600080fd5b82018360208201111561073357600080fd5b803590602001918460018302840111600160201b8311171561075457600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610ff2945050505050565b606060048054806020026020016040519081016040528092919081815260200182805480156107ed57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116107cf575b5050505050905090565b60028054604080516020601f60001961010060018716150201909416859004938401819004810282018101909252828152606093909290918301828280156107ed5780601f10610855576101008083540402835291602001916107ed565b820191906000526020600020905b81548152906001019060200180831161086357509395945050505050565b60008061088c611020565b9050610899818585611024565b5060019392505050565b60015490565b60006001600160a01b0383166108f05760405162461bcd60e51b8152600401808060200182810382526024815260200180611d316024913960400191505060405180910390fd5b6001600160a01b0384166109355760405162461bcd60e51b8152600401808060200182810382526026815260200180611daa6026913960400191505060405180910390fd5b600061093f611020565b905061096d8186868660405180602001604052806000815250604051806020016040528060008152506110cb565b610999818686866040518060200160405280600081525060405180602001604052806000815250611313565b6109f385826109ee86604051806060016040528060298152602001611d81602991396001600160a01b03808c166000908152600860209081526040808320938b1683529290522054919063ffffffff61152c16565b611024565b610a2181868686604051806020016040528060008152506040518060200160405280600081525060006115c3565b506001949350505050565b601290565b600190565b610a47610a41611020565b86610d73565b610a825760405162461bcd60e51b815260040180806020018281038252602c815260200180611d55602c913960400191505060405180910390fd5b610a99610a8d611020565b86868686866001611863565b5050505050565b6001600160a01b031660009081526020819052604090205490565b806001600160a01b0316610acd611020565b6001600160a01b03161415610b135760405162461bcd60e51b8152600401808060200182810382526024815260200180611c9f6024913960400191505060405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff1615610b765760076000610b40611020565b6001600160a01b03908116825260208083019390935260409182016000908120918516815292529020805460ff19169055610bbd565b600160066000610b84611020565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff19169115159190911790555b610bc5611020565b6001600160a01b0316816001600160a01b03167ff4caeb2d6ca8932a215a353d0703c326ec2d81fc68170f320eb2ab49e9df61f960405160405180910390a350565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107ed5780601f10610855576101008083540402835291602001916107ed565b610c95610c73611020565b610c7b611020565b858585604051806020016040528060008152506001611863565b505050565b60006001600160a01b038316610ce15760405162461bcd60e51b8152600401808060200182810382526024815260200180611d316024913960400191505060405180910390fd5b6000610ceb611020565b9050610d198182868660405180602001604052806000815250604051806020016040528060008152506110cb565b610d45818286866040518060200160405280600081525060405180602001604052806000815250611313565b61089981828686604051806020016040528060008152506040518060200160405280600081525060006115c3565b6000816001600160a01b0316836001600160a01b03161480610dde57506001600160a01b03831660009081526005602052604090205460ff168015610dde57506001600160a01b0380831660009081526007602090815260408083209387168352929052205460ff16155b80610e0e57506001600160a01b0380831660009081526006602090815260408083209387168352929052205460ff165b9392505050565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205490565b610e48611020565b6001600160a01b0316816001600160a01b03161415610e985760405162461bcd60e51b8152600401808060200182810382526021815260200180611cc36021913960400191505060405180910390fd5b6001600160a01b03811660009081526005602052604090205460ff1615610f0457600160076000610ec7611020565b6001600160a01b03908116825260208083019390935260409182016000908120918616815292529020805460ff1916911515919091179055610f42565b60066000610f10611020565b6001600160a01b03908116825260208083019390935260409182016000908120918516815292529020805460ff191690555b610f4a611020565b6001600160a01b0316816001600160a01b03167f50546e66e5f44d728365dc3908c63bc5cfeeab470722c1677e3073a6ac294aa160405160405180910390a350565b610f9d610f97611020565b85610d73565b610fd85760405162461bcd60e51b815260040180806020018281038252602c815260200180611d55602c913960400191505060405180910390fd5b610fec610fe3611020565b8585858561192e565b50505050565b61101c610ffd611020565b611005611020565b84846040518060200160405280600081525061192e565b5050565b3390565b6001600160a01b0382166110695760405162461bcd60e51b8152600401808060200182810382526023815260200180611df36023913960400191505060405180910390fd5b6001600160a01b03808416600081815260086020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6040805163555ddc6560e11b81526001600160a01b03871660048201527f29ddb589b1fb5fc7cf394961c1adf5f8c6454761adf795e67fe149f658abe89560248201529051600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b15801561114f57600080fd5b505afa158015611163573d6000803e3d6000fd5b505050506040513d602081101561117957600080fd5b505190506001600160a01b0381161561130a57806001600160a01b03166375ab97828888888888886040518763ffffffff1660e01b815260040180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561123f578181015183820152602001611227565b50505050905090810190601f16801561126c5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561129f578181015183820152602001611287565b50505050905090810190601f1680156112cc5780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b1580156112f157600080fd5b505af1158015611305573d6000803e3d6000fd5b505050505b50505050505050565b61135683604051806060016040528060278152602001611c56602791396001600160a01b038816600090815260208190526040902054919063ffffffff61152c16565b6001600160a01b03808716600090815260208190526040808220939093559086168152205461138b908463ffffffff611b5b16565b600080866001600160a01b03166001600160a01b0316815260200190815260200160002081905550836001600160a01b0316856001600160a01b0316876001600160a01b03167f06b541ddaa720db2b10a4d0cdac39b8d360425fc073085fac19bc82614677987868686604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561143c578181015183820152602001611424565b50505050905090810190601f1680156114695780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561149c578181015183820152602001611484565b50505050905090810190601f1680156114c95780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a4836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050565b600081848411156115bb5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611580578181015183820152602001611568565b50505050905090810190601f1680156115ad5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6040805163555ddc6560e11b81526001600160a01b03871660048201527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b60248201529051600091731820a4b7618bde71dce8cdc73aab6c95905fad249163aabbb8ca91604480820192602092909190829003018186803b15801561164757600080fd5b505afa15801561165b573d6000803e3d6000fd5b505050506040513d602081101561167157600080fd5b505190506001600160a01b0381161561180557806001600160a01b03166223de298989898989896040518763ffffffff1660e01b815260040180876001600160a01b03166001600160a01b03168152602001866001600160a01b03166001600160a01b03168152602001856001600160a01b03166001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b8381101561173657818101518382015260200161171e565b50505050905090810190601f1680156117635780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561179657818101518382015260200161177e565b50505050905090810190601f1680156117c35780820380516001836020036101000a031916815260200191505b5098505050505050505050600060405180830381600087803b1580156117e857600080fd5b505af11580156117fc573d6000803e3d6000fd5b50505050611859565b81156118595761181d866001600160a01b0316611bb5565b156118595760405162461bcd60e51b815260040180806020018281038252604d815260200180611ce4604d913960600191505060405180910390fd5b5050505050505050565b6001600160a01b0386166118a85760405162461bcd60e51b8152600401808060200182810382526022815260200180611c346022913960400191505060405180910390fd5b6001600160a01b038516611903576040805162461bcd60e51b815260206004820181905260248201527f4552433737373a2073656e6420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b6119118787878787876110cb565b61191f878787878787611313565b61130a878787878787876115c3565b6001600160a01b0384166119735760405162461bcd60e51b8152600401808060200182810382526022815260200180611c7d6022913960400191505060405180910390fd5b611982858560008686866110cb565b6119c583604051806060016040528060238152602001611dd0602391396001600160a01b038716600090815260208190526040902054919063ffffffff61152c16565b6001600160a01b0385166000908152602081905260409020556001546119f1908463ffffffff611bf116565b600181905550836001600160a01b0316856001600160a01b03167fa78a9be3a7b862d26933ad85fb11d80ef66b8f972d7cbba06621d583943a4098858585604051808481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611a76578181015183820152602001611a5e565b50505050905090810190601f168015611aa35780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611ad6578181015183820152602001611abe565b50505050905090810190601f168015611b035780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a36040805184815290516000916001600160a01b038716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050505050565b600082820183811015610e0e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611be957508115155b949350505050565b6000610e0e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061152c56fe4552433737373a2073656e642066726f6d20746865207a65726f20616464726573734552433737373a207472616e7366657220616d6f756e7420657863656564732062616c616e63654552433737373a206275726e2066726f6d20746865207a65726f20616464726573734552433737373a20617574686f72697a696e672073656c66206173206f70657261746f724552433737373a207265766f6b696e672073656c66206173206f70657261746f724552433737373a20746f6b656e20726563697069656e7420636f6e747261637420686173206e6f20696d706c656d656e74657220666f7220455243373737546f6b656e73526563697069656e744552433737373a207472616e7366657220746f20746865207a65726f20616464726573734552433737373a2063616c6c6572206973206e6f7420616e206f70657261746f7220666f7220686f6c6465724552433737373a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654552433737373a207472616e736665722066726f6d20746865207a65726f20616464726573734552433737373a206275726e20616d6f756e7420657863656564732062616c616e63654552433737373a20617070726f766520746f20746865207a65726f2061646472657373a265627a7a723158208c1bc4f779f353ddfc0be45b9957abc61149c8055303dc4b68f76adf17816f4664736f6c63430005100032"; diff --git a/packages/chain-events/src/contractTypes/factories/ExecutorWithTimelock__factory.ts b/packages/chain-events/src/contractTypes/factories/ExecutorWithTimelock__factory.ts new file mode 100644 index 00000000000..faa4199a132 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ExecutorWithTimelock__factory.ts @@ -0,0 +1,590 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { ExecutorWithTimelock } from "../ExecutorWithTimelock"; + +export class ExecutorWithTimelock__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + admin: string, + delay: BigNumberish, + gracePeriod: BigNumberish, + minimumDelay: BigNumberish, + maximumDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + admin, + delay, + gracePeriod, + minimumDelay, + maximumDelay, + overrides || {} + ) as Promise; + } + getDeployTransaction( + admin: string, + delay: BigNumberish, + gracePeriod: BigNumberish, + minimumDelay: BigNumberish, + maximumDelay: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + admin, + delay, + gracePeriod, + minimumDelay, + maximumDelay, + overrides || {} + ); + } + attach(address: string): ExecutorWithTimelock { + return super.attach(address) as ExecutorWithTimelock; + } + connect(signer: Signer): ExecutorWithTimelock__factory { + return super.connect(signer) as ExecutorWithTimelock__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ExecutorWithTimelock { + return new Contract( + address, + _abi, + signerOrProvider + ) as ExecutorWithTimelock; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "admin", + type: "address", + }, + { + internalType: "uint256", + name: "delay", + type: "uint256", + }, + { + internalType: "uint256", + name: "gracePeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "minimumDelay", + type: "uint256", + }, + { + internalType: "uint256", + name: "maximumDelay", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "actionHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "CancelledAction", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "actionHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + { + indexed: false, + internalType: "bytes", + name: "resultData", + type: "bytes", + }, + ], + name: "ExecutedAction", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "delay", + type: "uint256", + }, + ], + name: "NewDelay", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "actionHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "QueuedAction", + type: "event", + }, + { + inputs: [], + name: "GRACE_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAXIMUM_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINIMUM_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "acceptAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "cancelTransaction", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "executeTransaction", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "getAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "actionHash", + type: "bytes32", + }, + ], + name: "isActionQueued", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isProposalOverGracePeriod", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "queueTransaction", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "delay", + type: "uint256", + }, + ], + name: "setDelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "setPendingAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; + +const _bytecode = + "0x60e06040523480156200001157600080fd5b506040516200170338038062001703833981016040819052620000349162000130565b81841015620000605760405162461bcd60e51b8152600401620000579062000199565b60405180910390fd5b80841115620000835760405162461bcd60e51b81526004016200005790620001d0565b6002849055600080546001600160a01b0319166001600160a01b038716179055608083905260a082905260c08190526040517f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90620000e490869062000207565b60405180910390a17f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c856040516200011d919062000185565b60405180910390a1505050505062000210565b600080600080600060a0868803121562000148578081fd5b85516001600160a01b03811681146200015f578182fd5b602087015160408801516060890151608090990151929a91995097965090945092505050565b6001600160a01b0391909116815260200190565b6020808252601a908201527f44454c41595f53484f525445525f5448414e5f4d494e494d554d000000000000604082015260600190565b60208082526019908201527f44454c41595f4c4f4e4745525f5448414e5f4d4158494d554d00000000000000604082015260600190565b90815260200190565b60805160a05160c0516114b2620002516000398061046e5280610a6852508061082e5280610a28525080610547528061086a528061099752506114b26000f3fe6080604052600436106100e15760003560e01c8063b1b43ae51161007f578063cebc9a8211610059578063cebc9a8214610228578063d04681561461023d578063e177246e14610252578063f670a5f914610272576100e8565b8063b1b43ae5146101d1578063b1fc8796146101e6578063c1a287e214610213576100e8565b80636e9960c3116100bb5780636e9960c31461015a5780637d645fab1461017c5780638902ab65146101915780638d8fe2e3146101b1576100e8565b80630e18b681146100ed5780631dc40b51146101045780634dd18bf51461013a576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610102610292565b005b34801561011057600080fd5b5061012461011f366004610d9f565b61031c565b6040516101319190611111565b60405180910390f35b34801561014657600080fd5b50610102610155366004610d83565b6103e8565b34801561016657600080fd5b5061016f61045d565b604051610131919061109e565b34801561018857600080fd5b5061012461046c565b6101a461019f366004610d9f565b610490565b604051610131919061119a565b3480156101bd57600080fd5b506101246101cc366004610d9f565b610743565b3480156101dd57600080fd5b5061012461082c565b3480156101f257600080fd5b50610206610201366004610e39565b610850565b6040516101319190611106565b34801561021f57600080fd5b50610124610868565b34801561023457600080fd5b5061012461088c565b34801561024957600080fd5b5061016f610892565b34801561025e57600080fd5b5061010261026d366004610e39565b6108a1565b34801561027e57600080fd5b5061020661028d366004610e51565b6108fe565b6001546001600160a01b031633146102c55760405162461bcd60e51b81526004016102bc906111ad565b60405180910390fd5b60008054336001600160a01b031991821681179092556001805490911690556040517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c916103129161109e565b60405180910390a1565b600080546001600160a01b031633146103475760405162461bcd60e51b81526004016102bc90611279565b6000878787878787604051602001610364969594939291906110b2565b60408051601f19818403018152828252805160209182012060008181526003909252919020805460ff1916905591506001600160a01b038916907f87c481aa909c37502caa37394ab791c26b68fa4fa5ae56de104de36444ae9069906103d59084908b908b908b908b908b9061111a565b60405180910390a2979650505050505050565b3330146104075760405162461bcd60e51b81526004016102bc90611396565b600180546001600160a01b0319166001600160a01b0383161790556040517f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a7569061045290839061109e565b60405180910390a150565b6000546001600160a01b031690565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546060906001600160a01b031633146104bd5760405162461bcd60e51b81526004016102bc90611279565b60008787878787876040516020016104da969594939291906110b2565b60408051601f1981840301815291815281516020928301206000818152600390935291205490915060ff166105215760405162461bcd60e51b81526004016102bc906112cf565b834210156105415760405162461bcd60e51b81526004016102bc906111dc565b61056b847f00000000000000000000000000000000000000000000000000000000000000006109c5565b42111561058a5760405162461bcd60e51b81526004016102bc906112a0565b6000818152600360205260409020805460ff1916905585516060906105b05750846105dc565b8680519060200120866040516020016105ca929190611051565b60405160208183030381529060405290505b60006060851561066957893410156106065760405162461bcd60e51b81526004016102bc90611368565b8a6001600160a01b03168360405161061e9190611082565b600060405180830381855af49150503d8060008114610659576040519150601f19603f3d011682016040523d82523d6000602084013e61065e565b606091505b5090925090506106cb565b8a6001600160a01b03168a846040516106829190611082565b60006040518083038185875af1925050503d80600081146106bf576040519150601f19603f3d011682016040523d82523d6000602084013e6106c4565b606091505b5090925090505b816106e85760405162461bcd60e51b81526004016102bc906112fa565b8a6001600160a01b03167f97825080b472fa91fe888b62ec128814d60dec546a2dafb955e50923f4a1b7e7858c8c8c8c8c8860405161072d9796959493929190611139565b60405180910390a29a9950505050505050505050565b600080546001600160a01b0316331461076e5760405162461bcd60e51b81526004016102bc90611279565b60025461077c9042906109c5565b83101561079b5760405162461bcd60e51b81526004016102bc9061120b565b60008787878787876040516020016107b8969594939291906110b2565b60408051601f19818403018152828252805160209182012060008181526003909252919020805460ff1916600117905591506001600160a01b038916907f2191aed4c4733c76e08a9e7e1da0b8d87fa98753f22df49231ddc66e0f05f022906103d59084908b908b908b908b908b9061111a565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008181526003602052604090205460ff165b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60025490565b6001546001600160a01b031690565b3330146108c05760405162461bcd60e51b81526004016102bc90611396565b6108c981610a26565b60028190556040517f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90610452908390611111565b6000610908610aa9565b604051633656de2160e01b81526001600160a01b03851690633656de2190610934908690600401611111565b60006040518083038186803b15801561094c57600080fd5b505afa158015610960573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526109889190810190610e7c565b6101408101519091506109bb907f00000000000000000000000000000000000000000000000000000000000000006109c5565b4211949350505050565b600082820183811015610a1f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b7f0000000000000000000000000000000000000000000000000000000000000000811015610a665760405162461bcd60e51b81526004016102bc90611242565b7f0000000000000000000000000000000000000000000000000000000000000000811115610aa65760405162461bcd60e51b81526004016102bc90611331565b50565b6040518061022001604052806000815260200160006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160001515815260200160006001600160a01b03168152602001600080191681525090565b805161086381611459565b600082601f830112610b6a578081fd5b8151610b7d610b78826113e9565b6113c5565b818152915060208083019084810181840286018201871015610b9e57600080fd5b60005b84811015610bc6578151610bb481611459565b84529282019290820190600101610ba1565b505050505092915050565b600082601f830112610be1578081fd5b8151610bef610b78826113e9565b818152915060208083019084810181840286018201871015610c1057600080fd5b60005b84811015610bc6578151610c268161146e565b84529282019290820190600101610c13565b600082601f830112610c48578081fd5b8151610c56610b78826113e9565b818152915060208083019084810160005b84811015610bc6578151870188603f820112610c8257600080fd5b83810151610c92610b7882611407565b81815260408b81848601011115610ca857600080fd5b610cb783888401838701611429565b50865250509282019290820190600101610c67565b600082601f830112610cdc578081fd5b8151610cea610b78826113e9565b818152915060208083019084810181840286018201871015610d0b57600080fd5b60005b84811015610bc657815184529282019290820190600101610d0e565b80516108638161146e565b600082601f830112610d45578081fd5b8135610d53610b7882611407565b9150808252836020828501011115610d6a57600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215610d94578081fd5b8135610a1f81611459565b60008060008060008060c08789031215610db7578182fd5b8635610dc281611459565b955060208701359450604087013567ffffffffffffffff80821115610de5578384fd5b610df18a838b01610d35565b95506060890135915080821115610e06578384fd5b50610e1389828a01610d35565b9350506080870135915060a0870135610e2b8161146e565b809150509295509295509295565b600060208284031215610e4a578081fd5b5035919050565b60008060408385031215610e63578182fd5b8235610e6e81611459565b946020939093013593505050565b600060208284031215610e8d578081fd5b815167ffffffffffffffff80821115610ea4578283fd5b8184019150610220808387031215610eba578384fd5b610ec3816113c5565b905082518152610ed560208401610b4f565b6020820152610ee660408401610b4f565b6040820152606083015182811115610efc578485fd5b610f0887828601610b5a565b606083015250608083015182811115610f1f578485fd5b610f2b87828601610ccc565b60808301525060a083015182811115610f42578485fd5b610f4e87828601610c38565b60a08301525060c083015182811115610f65578485fd5b610f7187828601610c38565b60c08301525060e083015182811115610f88578485fd5b610f9487828601610bd1565b60e083015250610100838101519082015261012080840151908201526101408084015190820152610160808401519082015261018080840151908201526101a09150610fe1828401610d2a565b828201526101c09150610ff5828401610d2a565b828201526101e09150611009828401610b4f565b9181019190915261020091820151918101919091529392505050565b6000815180845261103d816020860160208601611429565b601f01601f19169290920160200192915050565b6001600160e01b0319831681528151600090611074816004850160208701611429565b919091016004019392505050565b60008251611094818460208701611429565b9190910192915050565b6001600160a01b0391909116815260200190565b600060018060a01b038816825286602083015260c060408301526110d960c0830187611025565b82810360608401526110eb8187611025565b6080840195909552505090151560a090910152949350505050565b901515815260200190565b90815260200190565b600087825286602083015260c060408301526110d960c0830187611025565b600088825287602083015260e0604083015261115860e0830188611025565b828103606084015261116a8188611025565b905085608084015284151560a084015282810360c084015261118c8185611025565b9a9950505050505050505050565b600060208252610a1f6020830184611025565b60208082526015908201527427a7262cafa12cafa822a72224a723afa0a226a4a760591b604082015260600190565b602080825260159082015274151253515313d0d2d7d393d517d192539254d21151605a1b604082015260600190565b6020808252601d908201527f455845435554494f4e5f54494d455f554e444552455354494d41544544000000604082015260600190565b6020808252601a908201527f44454c41595f53484f525445525f5448414e5f4d494e494d554d000000000000604082015260600190565b6020808252600d908201526c27a7262cafa12cafa0a226a4a760991b604082015260600190565b60208082526015908201527411d49050d157d411549253d117d192539254d21151605a1b604082015260600190565b6020808252601190820152701050d51253d397d393d517d45551555151607a1b604082015260600190565b60208082526017908201527f4641494c45445f414354494f4e5f455845435554494f4e000000000000000000604082015260600190565b60208082526019908201527f44454c41595f4c4f4e4745525f5448414e5f4d4158494d554d00000000000000604082015260600190565b6020808252601490820152734e4f545f454e4f5547485f4d53475f56414c554560601b604082015260600190565b6020808252601590820152744f4e4c595f42595f544849535f54494d454c4f434b60581b604082015260600190565b60405181810167ffffffffffffffff811182821017156113e157fe5b604052919050565b600067ffffffffffffffff8211156113fd57fe5b5060209081020190565b600067ffffffffffffffff82111561141b57fe5b50601f01601f191660200190565b60005b8381101561144457818101518382015260200161142c565b83811115611453576000848401525b50505050565b6001600160a01b0381168114610aa657600080fd5b8015158114610aa657600080fdfea264697066735822122015ff897075e4f3908d97363016374ebb8843b977ea00350235d03ccdf81d4b6864736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/Executor__factory.ts b/packages/chain-events/src/contractTypes/factories/Executor__factory.ts new file mode 100644 index 00000000000..4ef6bd13063 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/Executor__factory.ts @@ -0,0 +1,889 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { Executor } from "../Executor"; + +export class Executor__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + admin: string, + delay: BigNumberish, + gracePeriod: BigNumberish, + minimumDelay: BigNumberish, + maximumDelay: BigNumberish, + propositionThreshold: BigNumberish, + voteDuration: BigNumberish, + voteDifferential: BigNumberish, + minimumQuorum: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + admin, + delay, + gracePeriod, + minimumDelay, + maximumDelay, + propositionThreshold, + voteDuration, + voteDifferential, + minimumQuorum, + overrides || {} + ) as Promise; + } + getDeployTransaction( + admin: string, + delay: BigNumberish, + gracePeriod: BigNumberish, + minimumDelay: BigNumberish, + maximumDelay: BigNumberish, + propositionThreshold: BigNumberish, + voteDuration: BigNumberish, + voteDifferential: BigNumberish, + minimumQuorum: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + admin, + delay, + gracePeriod, + minimumDelay, + maximumDelay, + propositionThreshold, + voteDuration, + voteDifferential, + minimumQuorum, + overrides || {} + ); + } + attach(address: string): Executor { + return super.attach(address) as Executor; + } + connect(signer: Signer): Executor__factory { + return super.connect(signer) as Executor__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Executor { + return new Contract(address, _abi, signerOrProvider) as Executor; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "admin", + type: "address", + }, + { + internalType: "uint256", + name: "delay", + type: "uint256", + }, + { + internalType: "uint256", + name: "gracePeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "minimumDelay", + type: "uint256", + }, + { + internalType: "uint256", + name: "maximumDelay", + type: "uint256", + }, + { + internalType: "uint256", + name: "propositionThreshold", + type: "uint256", + }, + { + internalType: "uint256", + name: "voteDuration", + type: "uint256", + }, + { + internalType: "uint256", + name: "voteDifferential", + type: "uint256", + }, + { + internalType: "uint256", + name: "minimumQuorum", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "actionHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "CancelledAction", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "actionHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + { + indexed: false, + internalType: "bytes", + name: "resultData", + type: "bytes", + }, + ], + name: "ExecutedAction", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "delay", + type: "uint256", + }, + ], + name: "NewDelay", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "actionHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "QueuedAction", + type: "event", + }, + { + inputs: [], + name: "GRACE_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAXIMUM_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINIMUM_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINIMUM_QUORUM", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ONE_HUNDRED_WITH_PRECISION", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PROPOSITION_THRESHOLD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "VOTE_DIFFERENTIAL", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "VOTING_DURATION", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "acceptAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "cancelTransaction", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "executeTransaction", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "getAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getMinimumPropositionPowerNeeded", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "votingSupply", + type: "uint256", + }, + ], + name: "getMinimumVotingPowerNeeded", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "actionHash", + type: "bytes32", + }, + ], + name: "isActionQueued", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isProposalOverGracePeriod", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isProposalPassed", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "isPropositionPowerEnough", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isQuorumValid", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isVoteDifferentialValid", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "queueTransaction", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "delay", + type: "uint256", + }, + ], + name: "setDelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "setPendingAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "validateCreatorOfProposal", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "validateProposalCancellation", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; + +const _bytecode = + "0x6101606040523480156200001257600080fd5b506040516200219a3803806200219a833981016040819052620000359162000159565b838383838c8c8c8c8c818410156200006a5760405162461bcd60e51b81526004016200006190620001ed565b60405180910390fd5b808411156200008d5760405162461bcd60e51b8152600401620000619062000224565b6002849055600080546001600160a01b0319166001600160a01b038716179055608083905260a082905260c08190526040517f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90620000ee9086906200025b565b60405180910390a17f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c85604051620001279190620001d9565b60405180910390a150505060e09590955250610100929092526101205261014052506200026498505050505050505050565b60008060008060008060008060006101208a8c03121562000178578485fd5b89516001600160a01b03811681146200018f578586fd5b8099505060208a0151975060408a0151965060608a0151955060808a0151945060a08a0151935060c08a0151925060e08a015191506101008a015190509295985092959850929598565b6001600160a01b0391909116815260200190565b6020808252601a908201527f44454c41595f53484f525445525f5448414e5f4d494e494d554d000000000000604082015260600190565b60208082526019908201527f44454c41595f4c4f4e4745525f5448414e5f4d4158494d554d00000000000000604082015260600190565b90815260200190565b60805160a05160c05160e051610100516101205161014051611ebf620002db60003980610ea65280610fbd5250806108fa5280610d2d525080610d5152508061106252806111cc52508061096d5280611325525080610eca52806112e5525080610a465280610f06528061119c5250611ebf6000f3fe6080604052600436106101a05760003560e01c8063a438d208116100ec578063d04681561161008a578063e50f840011610064578063e50f840014610445578063f48cb13414610465578063f670a5f914610485578063fd58afd4146104a5576101a7565b8063d0468156146103f0578063d0d9029814610405578063e177246e14610425576101a7565b8063b1b43ae5116100c6578063b1b43ae514610391578063b1fc8796146103a6578063c1a287e2146103c6578063cebc9a82146103db576101a7565b8063a438d20814610347578063ace432091461035c578063b159beac1461037c576101a7565b806366121042116101595780637d645fab116101335780637d645fab146102dd5780638902ab65146102f25780638d8fe2e3146103125780639125fb5814610332576101a7565b8063661210421461027b5780636e9960c31461029b5780637aa50080146102bd576101a7565b806306fbb3ab146101ac5780630e18b681146101e25780631d73fd6d146101f95780631dc40b511461021b57806331a7bc411461023b5780634dd18bf51461025b576101a7565b366101a757005b600080fd5b3480156101b857600080fd5b506101cc6101c736600461180c565b6104ba565b6040516101d99190611af2565b60405180910390f35b3480156101ee57600080fd5b506101f76104e0565b005b34801561020557600080fd5b5061020e61056a565b6040516101d99190611afd565b34801561022757600080fd5b5061020e61023636600461171a565b610570565b34801561024757600080fd5b506101cc6102563660046117cc565b61063c565b34801561026757600080fd5b506101f76102763660046116e2565b610652565b34801561028757600080fd5b506101cc6102963660046117cc565b6106c7565b3480156102a757600080fd5b506102b06107d0565b6040516101d99190611a71565b3480156102c957600080fd5b506101cc6102d836600461180c565b6107df565b3480156102e957600080fd5b5061020e61096b565b61030561030036600461171a565b61098f565b6040516101d99190611b86565b34801561031e57600080fd5b5061020e61032d36600461171a565b610c42565b34801561033e57600080fd5b5061020e610d2b565b34801561035357600080fd5b5061020e610d4f565b34801561036857600080fd5b506101cc61037736600461180c565b610d73565b34801561038857600080fd5b5061020e610ea4565b34801561039d57600080fd5b5061020e610ec8565b3480156103b257600080fd5b506101cc6103c13660046117b4565b610eec565b3480156103d257600080fd5b5061020e610f04565b3480156103e757600080fd5b5061020e610f28565b3480156103fc57600080fd5b506102b0610f2e565b34801561041157600080fd5b506101cc6104203660046117cc565b610f3d565b34801561043157600080fd5b506101f76104403660046117b4565b610f52565b34801561045157600080fd5b5061020e6104603660046117b4565b610faf565b34801561047157600080fd5b5061020e61048036600461180c565b610fe1565b34801561049157600080fd5b506101cc6104a036600461180c565b611103565b3480156104b157600080fd5b5061020e6111ca565b60006104c68383610d73565b80156104d757506104d783836107df565b90505b92915050565b6001546001600160a01b031633146105135760405162461bcd60e51b815260040161050a90611b99565b60405180910390fd5b60008054336001600160a01b031991821681179092556001805490911690556040517f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c9161056091611a71565b60405180910390a1565b61271081565b600080546001600160a01b0316331461059b5760405162461bcd60e51b815260040161050a90611c65565b60008787878787876040516020016105b896959493929190611a9e565b60408051601f19818403018152828252805160209182012060008181526003909252919020805460ff1916905591506001600160a01b038916907f87c481aa909c37502caa37394ab791c26b68fa4fa5ae56de104de36444ae9069906106299084908b908b908b908b908b90611b06565b60405180910390a2979650505050505050565b60006106498484846106c7565b15949350505050565b3330146106715760405162461bcd60e51b815260040161050a90611d82565b600180546001600160a01b0319166001600160a01b0383161790556040517f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a756906106bc908390611a71565b60405180910390a150565b600080846001600160a01b03166306be3e8e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561070357600080fd5b505afa158015610717573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061073b91906116fe565b90506107478584610fe1565b604051631420edcb60e31b81526001600160a01b0383169063a1076e58906107759088908890600401611a85565b60206040518083038186803b15801561078d57600080fd5b505afa1580156107a1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c591906119e0565b101595945050505050565b6000546001600160a01b031690565b60006107e9611408565b604051633656de2160e01b81526001600160a01b03851690633656de2190610815908690600401611afd565b60006040518083038186803b15801561082d57600080fd5b505afa158015610841573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108699190810190611837565b90506000816101e001516001600160a01b0316637a71f9d78361010001516040518263ffffffff1660e01b81526004016108a39190611afd565b60206040518083038186803b1580156108bb57600080fd5b505afa1580156108cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f391906119e0565b90506109437f000000000000000000000000000000000000000000000000000000000000000061093d836109376127108761018001516111ee90919063ffffffff16565b90611247565b90611289565b610961826109376127108661016001516111ee90919063ffffffff16565b1195945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546060906001600160a01b031633146109bc5760405162461bcd60e51b815260040161050a90611c65565b60008787878787876040516020016109d996959493929190611a9e565b60408051601f1981840301815291815281516020928301206000818152600390935291205490915060ff16610a205760405162461bcd60e51b815260040161050a90611cbb565b83421015610a405760405162461bcd60e51b815260040161050a90611bc8565b610a6a847f0000000000000000000000000000000000000000000000000000000000000000611289565b421115610a895760405162461bcd60e51b815260040161050a90611c8c565b6000818152600360205260409020805460ff191690558551606090610aaf575084610adb565b868051906020012086604051602001610ac9929190611a24565b60405160208183030381529060405290505b600060608515610b685789341015610b055760405162461bcd60e51b815260040161050a90611d54565b8a6001600160a01b031683604051610b1d9190611a55565b600060405180830381855af49150503d8060008114610b58576040519150601f19603f3d011682016040523d82523d6000602084013e610b5d565b606091505b509092509050610bca565b8a6001600160a01b03168a84604051610b819190611a55565b60006040518083038185875af1925050503d8060008114610bbe576040519150601f19603f3d011682016040523d82523d6000602084013e610bc3565b606091505b5090925090505b81610be75760405162461bcd60e51b815260040161050a90611ce6565b8a6001600160a01b03167f97825080b472fa91fe888b62ec128814d60dec546a2dafb955e50923f4a1b7e7858c8c8c8c8c88604051610c2c9796959493929190611b25565b60405180910390a29a9950505050505050505050565b600080546001600160a01b03163314610c6d5760405162461bcd60e51b815260040161050a90611c65565b600254610c7b904290611289565b831015610c9a5760405162461bcd60e51b815260040161050a90611bf7565b6000878787878787604051602001610cb796959493929190611a9e565b60408051601f19818403018152828252805160209182012060008181526003909252919020805460ff1916600117905591506001600160a01b038916907f2191aed4c4733c76e08a9e7e1da0b8d87fa98753f22df49231ddc66e0f05f022906106299084908b908b908b908b908b90611b06565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000610d7d611408565b604051633656de2160e01b81526001600160a01b03851690633656de2190610da9908690600401611afd565b60006040518083038186803b158015610dc157600080fd5b505afa158015610dd5573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610dfd9190810190611837565b90506000816101e001516001600160a01b0316637a71f9d78361010001516040518263ffffffff1660e01b8152600401610e379190611afd565b60206040518083038186803b158015610e4f57600080fd5b505afa158015610e63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8791906119e0565b9050610e9281610faf565b82610160015110159250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008181526003602052604090205460ff165b919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60025490565b6001546001600160a01b031690565b6000610f4a8484846106c7565b949350505050565b333014610f715760405162461bcd60e51b815260040161050a90611d82565b610f7a816112e3565b60028190556040517f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c906106bc908390611afd565b60006104da612710610937847f00000000000000000000000000000000000000000000000000000000000000006111ee565b600080836001600160a01b03166306be3e8e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561101d57600080fd5b505afa158015611031573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061105591906116fe565b9050610f4a6127106109377f0000000000000000000000000000000000000000000000000000000000000000846001600160a01b031663f6b50203886040518263ffffffff1660e01b81526004016110ad9190611afd565b60206040518083038186803b1580156110c557600080fd5b505afa1580156110d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fd91906119e0565b906111ee565b600061110d611408565b604051633656de2160e01b81526001600160a01b03851690633656de2190611139908690600401611afd565b60006040518083038186803b15801561115157600080fd5b505afa158015611165573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261118d9190810190611837565b6101408101519091506111c0907f0000000000000000000000000000000000000000000000000000000000000000611289565b4211949350505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000826111fd575060006104da565b8282028284828161120a57fe5b04146104d75760405162461bcd60e51b8152600401808060200182810382526021815260200180611e696021913960400191505060405180910390fd5b60006104d783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611366565b6000828201838110156104d7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b7f00000000000000000000000000000000000000000000000000000000000000008110156113235760405162461bcd60e51b815260040161050a90611c2e565b7f00000000000000000000000000000000000000000000000000000000000000008111156113635760405162461bcd60e51b815260040161050a90611d1d565b50565b600081836113f25760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156113b757818101518382015260200161139f565b50505050905090810190601f1680156113e45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816113fe57fe5b0495945050505050565b6040518061022001604052806000815260200160006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160001515815260200160006001600160a01b03168152602001600080191681525090565b8051610eff81611e45565b600082601f8301126114c9578081fd5b81516114dc6114d782611dd5565b611db1565b8181529150602080830190848101818402860182018710156114fd57600080fd5b60005b8481101561152557815161151381611e45565b84529282019290820190600101611500565b505050505092915050565b600082601f830112611540578081fd5b815161154e6114d782611dd5565b81815291506020808301908481018184028601820187101561156f57600080fd5b60005b8481101561152557815161158581611e5a565b84529282019290820190600101611572565b600082601f8301126115a7578081fd5b81516115b56114d782611dd5565b818152915060208083019084810160005b84811015611525578151870188603f8201126115e157600080fd5b838101516115f16114d782611df3565b81815260408b8184860101111561160757600080fd5b61161683888401838701611e15565b508652505092820192908201906001016115c6565b600082601f83011261163b578081fd5b81516116496114d782611dd5565b81815291506020808301908481018184028601820187101561166a57600080fd5b60005b848110156115255781518452928201929082019060010161166d565b8051610eff81611e5a565b600082601f8301126116a4578081fd5b81356116b26114d782611df3565b91508082528360208285010111156116c957600080fd5b8060208401602084013760009082016020015292915050565b6000602082840312156116f3578081fd5b81356104d781611e45565b60006020828403121561170f578081fd5b81516104d781611e45565b60008060008060008060c08789031215611732578182fd5b863561173d81611e45565b955060208701359450604087013567ffffffffffffffff80821115611760578384fd5b61176c8a838b01611694565b95506060890135915080821115611781578384fd5b5061178e89828a01611694565b9350506080870135915060a08701356117a681611e5a565b809150509295509295509295565b6000602082840312156117c5578081fd5b5035919050565b6000806000606084860312156117e0578081fd5b83356117eb81611e45565b925060208401356117fb81611e45565b929592945050506040919091013590565b6000806040838503121561181e578182fd5b823561182981611e45565b946020939093013593505050565b600060208284031215611848578081fd5b815167ffffffffffffffff8082111561185f578283fd5b8184019150610220808387031215611875578384fd5b61187e81611db1565b905082518152611890602084016114ae565b60208201526118a1604084016114ae565b60408201526060830151828111156118b7578485fd5b6118c3878286016114b9565b6060830152506080830151828111156118da578485fd5b6118e68782860161162b565b60808301525060a0830151828111156118fd578485fd5b61190987828601611597565b60a08301525060c083015182811115611920578485fd5b61192c87828601611597565b60c08301525060e083015182811115611943578485fd5b61194f87828601611530565b60e083015250610100838101519082015261012080840151908201526101408084015190820152610160808401519082015261018080840151908201526101a0915061199c828401611689565b828201526101c091506119b0828401611689565b828201526101e091506119c48284016114ae565b9181019190915261020091820151918101919091529392505050565b6000602082840312156119f1578081fd5b5051919050565b60008151808452611a10816020860160208601611e15565b601f01601f19169290920160200192915050565b6001600160e01b0319831681528151600090611a47816004850160208701611e15565b919091016004019392505050565b60008251611a67818460208701611e15565b9190910192915050565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b038816825286602083015260c06040830152611ac560c08301876119f8565b8281036060840152611ad781876119f8565b6080840195909552505090151560a090910152949350505050565b901515815260200190565b90815260200190565b600087825286602083015260c06040830152611ac560c08301876119f8565b600088825287602083015260e06040830152611b4460e08301886119f8565b8281036060840152611b5681886119f8565b905085608084015284151560a084015282810360c0840152611b7881856119f8565b9a9950505050505050505050565b6000602082526104d760208301846119f8565b60208082526015908201527427a7262cafa12cafa822a72224a723afa0a226a4a760591b604082015260600190565b602080825260159082015274151253515313d0d2d7d393d517d192539254d21151605a1b604082015260600190565b6020808252601d908201527f455845435554494f4e5f54494d455f554e444552455354494d41544544000000604082015260600190565b6020808252601a908201527f44454c41595f53484f525445525f5448414e5f4d494e494d554d000000000000604082015260600190565b6020808252600d908201526c27a7262cafa12cafa0a226a4a760991b604082015260600190565b60208082526015908201527411d49050d157d411549253d117d192539254d21151605a1b604082015260600190565b6020808252601190820152701050d51253d397d393d517d45551555151607a1b604082015260600190565b60208082526017908201527f4641494c45445f414354494f4e5f455845435554494f4e000000000000000000604082015260600190565b60208082526019908201527f44454c41595f4c4f4e4745525f5448414e5f4d4158494d554d00000000000000604082015260600190565b6020808252601490820152734e4f545f454e4f5547485f4d53475f56414c554560601b604082015260600190565b6020808252601590820152744f4e4c595f42595f544849535f54494d454c4f434b60581b604082015260600190565b60405181810167ffffffffffffffff81118282101715611dcd57fe5b604052919050565b600067ffffffffffffffff821115611de957fe5b5060209081020190565b600067ffffffffffffffff821115611e0757fe5b50601f01601f191660200190565b60005b83811015611e30578181015183820152602001611e18565b83811115611e3f576000848401525b50505050565b6001600160a01b038116811461136357600080fd5b801515811461136357600080fdfe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220761796ad47c3b100675d0b295fc99b6d99f7e4678d0978e33eceedb0e8d0b4b664736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/FeiDAO__factory.ts b/packages/chain-events/src/contractTypes/factories/FeiDAO__factory.ts new file mode 100644 index 00000000000..dd8da3c49d1 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/FeiDAO__factory.ts @@ -0,0 +1,1189 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { FeiDAO } from "../FeiDAO"; + +export class FeiDAO__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + tribe: string, + timelock: string, + guardian: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + tribe, + timelock, + guardian, + overrides || {} + ) as Promise; + } + getDeployTransaction( + tribe: string, + timelock: string, + guardian: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + tribe, + timelock, + guardian, + overrides || {} + ); + } + attach(address: string): FeiDAO { + return super.attach(address) as FeiDAO; + } + connect(signer: Signer): FeiDAO__factory { + return super.connect(signer) as FeiDAO__factory; + } + static connect(address: string, signerOrProvider: Signer | Provider): FeiDAO { + return new Contract(address, _abi, signerOrProvider) as FeiDAO; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "contract ERC20VotesComp", + name: "tribe", + type: "address", + }, + { + internalType: "contract ICompoundTimelock", + name: "timelock", + type: "address", + }, + { + internalType: "address", + name: "guardian", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldProposalThreshold", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newProposalThreshold", + type: "uint256", + }, + ], + name: "ProposalThresholdUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldQuorum", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newQuorum", + type: "uint256", + }, + ], + name: "QuorumUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Rollback", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "RollbackQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldTimelock", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newTimelock", + type: "address", + }, + ], + name: "TimelockChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldVotingDelay", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotingDelay", + type: "uint256", + }, + ], + name: "VotingDelayUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldVotingPeriod", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotingPeriod", + type: "uint256", + }, + ], + name: "VotingPeriodUpdated", + type: "event", + }, + { + inputs: [], + name: "BACKUP_GOVERNOR", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "ROLLBACK_DEADLINE", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "__acceptAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "__executeRollback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "__rollback", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "cancel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "execute", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getActions", + outputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "getReceipt", + outputs: [ + { + components: [ + { + internalType: "bool", + name: "hasVoted", + type: "bool", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint96", + name: "votes", + type: "uint96", + }, + ], + internalType: "struct IGovernorCompatibilityBravo.Receipt", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalEta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposals", + outputs: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "proposer", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + { + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "abstainVotes", + type: "uint256", + }, + { + internalType: "bool", + name: "canceled", + type: "bool", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "queue", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "queue", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "quorumVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "newProposalThreshold", + type: "uint256", + }, + ], + name: "setProposalThreshold", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "newQuorum", + type: "uint256", + }, + ], + name: "setQuorum", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "newVotingDelay", + type: "uint256", + }, + ], + name: "setVotingDelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "newVotingPeriod", + type: "uint256", + }, + ], + name: "setVotingPeriod", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "timelock", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract ERC20VotesComp", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ICompoundTimelock", + name: "newTimelock", + type: "address", + }, + ], + name: "updateTimelock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x61014060405260016005556132c86006556a14adf4b7320334b90000006007556a02116545850052128000006008553480156200003b57600080fd5b5060405162004b2238038062004b228339810160408190526200005e916200029d565b8183604051806040016040528060078152602001664665692044414f60c81b81525080620000916200017360201b60201c565b815160209283012081519183019190912060c082815260e08290524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f8189018190528183019790975260608101959095526080808601939093523085830152805180860390920182529390920190925280519084012090526101005281516200012b9160009190840190620001f7565b505060601b6001600160601b0319166101205262000149816200018e565b50600980546001600160a01b0319166001600160a01b039290921691909117905550620003469050565b6040805180820190915260018152603160f81b602082015290565b600354604080516001600160a01b03928316815291831660208301527f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401910160405180910390a1600380546001600160a01b0319166001600160a01b0392909216919091179055565b8280546200020590620002f0565b90600052602060002090601f01602090048101928262000229576000855562000274565b82601f106200024457805160ff191683800117855562000274565b8280016001018555821562000274579182015b828111156200027457825182559160200191906001019062000257565b506200028292915062000286565b5090565b5b8082111562000282576000815560010162000287565b600080600060608486031215620002b2578283fd5b8351620002bf816200032d565b6020850151909350620002d2816200032d565b6040850151909250620002e5816200032d565b809150509250925092565b600181811c908216806200030557607f821691505b602082108114156200032757634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b03811681146200034357600080fd5b50565b60805160a05160c05160e051610100516101205160601c614782620003a0600039600081816108db015261291c01526000612bfd01526000612c4c01526000612c2701526000612bab01526000612bd401526147826000f3fe6080604052600436106102515760003560e01c80637d5e81e211610139578063db90d48d116100b6578063ea0217cf1161007a578063ea0217cf14610847578063eb9019d414610867578063ece40cc114610887578063f8ce560a146108a7578063fc0c546a146108c9578063fe0d94c1146108fd57600080fd5b8063db90d48d146106bb578063dd4e2ba5146106e3578063ddf0b00914610729578063deaaa7cc14610749578063e23a9a521461077d57600080fd5b8063c01f9e37116100fd578063c01f9e3714610609578063c1ba4e5914610629578063c59057e414610649578063d33219b414610669578063da95691a1461069b57600080fd5b80637d5e81e21461057f578063a890c9101461059f578063ab58fb8e146105bf578063b58131b0146105df578063b9a61961146105f457600080fd5b8063328dd982116101d25780634385963211610196578063438596321461048b57806354fd4d50146104d557806356781388146104ff5780636f8dd33d1461051f57806370b0f6601461053f5780637b3c71d31461055f57600080fd5b8063328dd982146103d95780633932abb1146104095780633bccf4fd1461041e5780633e4f49e61461043e57806340e58ee51461046b57600080fd5b8063148e946d11610219578063148e946d1461035a578063160cbed71461037157806324bc1a64146103915780632656227d146103a65780632d63f693146103b957600080fd5b8063013cf08b1461025657806301ffc9a7146102d157806302a251a31461030157806306fdde031461032057806310817f2214610342575b600080fd5b34801561026257600080fd5b5061027661027136600461404f565b610910565b604080519a8b526001600160a01b0390991660208b0152978901969096526060880194909452608087019290925260a086015260c085015260e084015215156101008301521515610120820152610140015b60405180910390f35b3480156102dd57600080fd5b506102f16102ec366004613fa2565b6109d5565b60405190151581526020016102c8565b34801561030d57600080fd5b506006545b6040519081526020016102c8565b34801561032c57600080fd5b506103356109e6565b6040516102c891906143fc565b34801561034e57600080fd5b5061031263617f2e0081565b34801561036657600080fd5b5061036f610a78565b005b34801561037d57600080fd5b5061031261038c366004613d6d565b610c1d565b34801561039d57600080fd5b50610312611026565b6103126103b4366004613d6d565b61103b565b3480156103c557600080fd5b506103126103d436600461404f565b61112a565b3480156103e557600080fd5b506103f96103f436600461404f565b611161565b6040516102c894939291906143af565b34801561041557600080fd5b50600554610312565b34801561042a57600080fd5b50610312610439366004614142565b6113f2565b34801561044a57600080fd5b5061045e61045936600461404f565b611486565b6040516102c8919061440f565b34801561047757600080fd5b5061036f61048636600461404f565b611491565b34801561049757600080fd5b506102f16104a6366004614067565b60008281526002602090815260408083206001600160a01b038516845260080190915290205460ff1692915050565b3480156104e157600080fd5b506040805180820190915260018152603160f81b6020820152610335565b34801561050b57600080fd5b5061031261051a366004614096565b6117a4565b34801561052b57600080fd5b5061036f61053a36600461404f565b6117cd565b34801561054b57600080fd5b5061036f61055a36600461404f565b6119a3565b34801561056b57600080fd5b5061031261057a3660046140c1565b611a19565b34801561058b57600080fd5b5061031261059a366004613df8565b611a6b565b3480156105ab57600080fd5b5061036f6105ba366004614033565b611a82565b3480156105cb57600080fd5b506103126105da36600461404f565b611ac6565b3480156105eb57600080fd5b50600854610312565b34801561060057600080fd5b5061036f611af2565b34801561061557600080fd5b5061031261062436600461404f565b611b5c565b34801561063557600080fd5b5061036f61064436600461404f565b611b8b565b34801561065557600080fd5b50610312610664366004613d6d565b611c01565b34801561067557600080fd5b506003546001600160a01b03165b6040516001600160a01b0390911681526020016102c8565b3480156106a757600080fd5b506103126106b6366004613e9f565b611c3b565b3480156106c757600080fd5b50610683734c895973334af8e06fd6da4f723ac24a5f259e6b81565b3480156106ef57600080fd5b5060408051808201909152601a81527f737570706f72743d627261766f2671756f72756d3d627261766f0000000000006020820152610335565b34801561073557600080fd5b5061036f61074436600461404f565b611c60565b34801561075557600080fd5b506103127f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f81565b34801561078957600080fd5b50610817610798366004614067565b60408051606081018252600080825260208201819052918101919091525060009182526002602090815260408084206001600160a01b0393909316845260089092018152918190208151606081018352905460ff8082161515835261010082041693820193909352620100009092046001600160601b03169082015290565b6040805182511515815260208084015160ff1690820152918101516001600160601b0316908201526060016102c8565b34801561085357600080fd5b5061036f61086236600461404f565b611ece565b34801561087357600080fd5b50610312610882366004613d42565b611f44565b34801561089357600080fd5b5061036f6108a236600461404f565b611f57565b3480156108b357600080fd5b506103126108c236600461404f565b5060075490565b3480156108d557600080fd5b506106837f000000000000000000000000000000000000000000000000000000000000000081565b61036f61090b36600461404f565b611fcd565b80600080808080808080806109248a611ac6565b975061092f8b61112a565b965061093a8b611b5c565b60008c815260026020526040812080546005820154600683015460078401546001600160a01b039093169e50949a50985092965091945061097a8d611486565b9050600281600781111561099e57634e487b7160e01b600052602160045260246000fd5b14935060078160078111156109c357634e487b7160e01b600052602160045260246000fd5b14925050509193959799509193959799565b60006109e08261223b565b92915050565b6060600080546109f5906146bb565b80601f0160208091040260200160405190810160405280929190818152602001828054610a21906146bb565b8015610a6e5780601f10610a4357610100808354040283529160200191610a6e565b820191906000526020600020905b815481529060010190602001808311610a5157829003601f168201915b5050505050905090565b42600a541115610ac25760405162461bcd60e51b815260206004820152601060248201526f2332b4a220a79d103a37b79039b7b7b760811b60448201526064015b60405180910390fd5b6009546001600160a01b031615610b0e5760405162461bcd60e51b815260206004820152601060248201526f46656944414f3a206e6f20717565756560801b6044820152606401610ab9565b6000610b226003546001600160a01b031690565b9050806001600160a01b0316630825f38f610b456003546001600160a01b031690565b60408051734c895973334af8e06fd6da4f723ac24a5f259e6b60208201526000910160408051601f1981840301815290829052600a546001600160e01b031960e087901b168352610b9a9493926004016142c4565b600060405180830381600087803b158015610bb457600080fd5b505af1158015610bc8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610bf09190810190613fca565b506040517fe7058e1559765746b4820bddac308b97653890ba0be3b171acd5218899b19b2690600090a150565b600080610c2c86868686611c01565b90506004610c3982611486565b6007811115610c5857634e487b7160e01b600052602160045260246000fd5b14610c755760405162461bcd60e51b8152600401610ab9906144af565b60035460408051630d48571f60e31b815290516000926001600160a01b031691636a42b8f8916004808301926020929190829003018186803b158015610cba57600080fd5b505afa158015610cce573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf29190613f8a565b610cfc9042614635565b9050610d1e610d0a82612260565b6000848152600460205260409020906122cc565b60005b8751811015610fe15760035488516001600160a01b039091169063f2b06537908a9084908110610d6157634e487b7160e01b600052603260045260246000fd5b6020026020010151898481518110610d8957634e487b7160e01b600052603260045260246000fd5b6020026020010151898581518110610db157634e487b7160e01b600052603260045260246000fd5b602002602001015186604051602001610dcd9493929190614330565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401610e0191815260200190565b60206040518083038186803b158015610e1957600080fd5b505afa158015610e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e519190613f6a565b15610ecf5760405162461bcd60e51b815260206004820152604260248201527f476f7665726e6f7254696d656c6f636b436f6d706f756e643a206964656e746960448201527f63616c2070726f706f73616c20616374696f6e20616c72656164792071756575606482015261195960f21b608482015260a401610ab9565b60035488516001600160a01b0390911690633a66f901908a9084908110610f0657634e487b7160e01b600052603260045260246000fd5b6020026020010151898481518110610f2e57634e487b7160e01b600052603260045260246000fd5b6020026020010151898581518110610f5657634e487b7160e01b600052603260045260246000fd5b6020026020010151866040518563ffffffff1660e01b8152600401610f7e9493929190614330565b602060405180830381600087803b158015610f9857600080fd5b505af1158015610fac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fd09190613f8a565b50610fda816146f0565b9050610d21565b5060408051838152602081018390527f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289291015b60405180910390a15095945050505050565b60006110366108c2600143614678565b905090565b60008061104a86868686611c01565b9050600061105782611486565b9050600481600781111561107b57634e487b7160e01b600052602160045260246000fd5b14806110a6575060058160078111156110a457634e487b7160e01b600052602160045260246000fd5b145b6110c25760405162461bcd60e51b8152600401610ab9906144af565b600082815260016020818152604092839020600201805460ff191690921790915590518381527f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f910160405180910390a161112082888888886122ea565b5095945050505050565b60008181526001602090815260408083208151928301909152546001600160401b0316908190525b6001600160401b031692915050565b606080606080600060026000878152602001908152602001600020905080600101816002018260030183600401838054806020026020016040519081016040528092919081815260200182805480156111e357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116111c5575b505050505093508280548060200260200160405190810160405280929190818152602001828054801561123557602002820191906000526020600020905b815481526020019060010190808311611221575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b8282101561130957838290600052602060002001805461127c906146bb565b80601f01602080910402602001604051908101604052809291908181526020018280546112a8906146bb565b80156112f55780601f106112ca576101008083540402835291602001916112f5565b820191906000526020600020905b8154815290600101906020018083116112d857829003601f168201915b50505050508152602001906001019061125d565b50505050915080805480602002602001604051908101604052809291908181526020016000905b828210156113dc57838290600052602060002001805461134f906146bb565b80601f016020809104026020016040519081016040528092919081815260200182805461137b906146bb565b80156113c85780601f1061139d576101008083540402835291602001916113c8565b820191906000526020600020905b8154815290600101906020018083116113ab57829003601f168201915b505050505081526020019060010190611330565b5050505090509450945094509450509193509193565b604080517f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f602082015290810186905260ff85166060820152600090819061145e9061145690608001604051602081830303815290604052805190602001206122fe565b86868661234c565b905061147b8782886040518060200160405280600081525061236a565b979650505050505050565b60006109e082612483565b600081815260026020526040902080546001600160a01b0316336001600160a01b031614806114da575060085481546114d8906001600160a01b0316610882600143614678565b105b6115365760405162461bcd60e51b815260206004820152602760248201527f476f7665726e6f72427261766f3a2070726f706f7365722061626f76652074686044820152661c995cda1bdb1960ca1b6064820152608401610ab9565b61179f8160010180548060200260200160405190810160405280929190818152602001828054801561159157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611573575b5050505050826002018054806020026020016040519081016040528092919081815260200182805480156115e457602002820191906000526020600020905b8154815260200190600101908083116115d0575b505050505061179584600301805480602002602001604051908101604052809291908181526020016000905b828210156116bc57838290600052602060002001805461162f906146bb565b80601f016020809104026020016040519081016040528092919081815260200182805461165b906146bb565b80156116a85780601f1061167d576101008083540402835291602001916116a8565b820191906000526020600020905b81548152906001019060200180831161168b57829003601f168201915b505050505081526020019060010190611610565b50505060048701805460408051602080840282018101909252828152935060009084015b8282101561178c5783829060005260206000200180546116ff906146bb565b80601f016020809104026020016040519081016040528092919081815260200182805461172b906146bb565b80156117785780601f1061174d57610100808354040283529160200191611778565b820191906000526020600020905b81548152906001019060200180831161175b57829003601f168201915b5050505050815260200190600101906116e0565b50505050612581565b8460090154612735565b505050565b6000803390506117c58482856040518060200160405280600081525061236a565b949350505050565b6009546001600160a01b031633146118275760405162461bcd60e51b815260206004820152601b60248201527f46656944414f3a2063616c6c6572206e6f7420677561726469616e00000000006044820152606401610ab9565b600980546001600160a01b031916905563617f2e0081111561188b5760405162461bcd60e51b815260206004820152601860248201527f46656944414f3a20726f6c6c6261636b206578706972656400000000000000006044820152606401610ab9565b600a81905560006118a46003546001600160a01b031690565b9050806001600160a01b0316633a66f9016118c76003546001600160a01b031690565b60408051734c895973334af8e06fd6da4f723ac24a5f259e6b602082015260009101604051602081830303815290604052866040518563ffffffff1660e01b815260040161191894939291906142c4565b602060405180830381600087803b15801561193257600080fd5b505af1158015611946573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061196a9190613f8a565b506040518281527fdb51ef15d5bea4363daa5cb7691e73d2b53e2addace8cc5bef3b85c4f4489af5906020015b60405180910390a15050565b6119ab612743565b6001600160a01b0316336001600160a01b0316146119db5760405162461bcd60e51b8152600401610ab990614437565b600580549082905560408051828152602081018490527f16569b50c8812bb18e4b5c46b0fee4a9acbb3a9dca1e1badce427e8d75b5652d9101611997565b600080339050611a6186828787878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061236a92505050565b9695505050505050565b6000611a7985858585612757565b95945050505050565b611a8a612743565b6001600160a01b0316336001600160a01b031614611aba5760405162461bcd60e51b8152600401610ab990614437565b611ac3816127cd565b50565b60008181526004602090815260408083208151928301909152546001600160401b031690819052611152565b600360009054906101000a90046001600160a01b03166001600160a01b0316630e18b6816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611b4257600080fd5b505af1158015611b56573d6000803e3d6000fd5b50505050565b60008181526001602081815260408084208151928301909152909101546001600160401b031690819052611152565b611b93612743565b6001600160a01b0316336001600160a01b031614611bc35760405162461bcd60e51b8152600401610ab990614437565b600780549082905560408051828152602081018490527f6784e9bcb845caaa98267d7b0918f97d3d17f7cb35a05b52010f7eb587a0acb09101611997565b600084848484604051602001611c1a9493929190614364565b60408051601f19818403018152919052805160209091012095945050505050565b6000611c4b338787878787612836565b611a618686611c5a8787612581565b85611a6b565b600081815260026020908152604091829020600181018054845181850281018501909552808552919361179f93909290830182828015611cc957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611cab575b505050505082600201805480602002602001604051908101604052809291908181526020018280548015611d1c57602002820191906000526020600020905b815481526020019060010190808311611d08575b5050505050611ec484600301805480602002602001604051908101604052809291908181526020016000905b82821015611df4578382906000526020600020018054611d67906146bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611d93906146bb565b8015611de05780601f10611db557610100808354040283529160200191611de0565b820191906000526020600020905b815481529060010190602001808311611dc357829003601f168201915b505050505081526020019060010190611d48565b50505060048701805460408051602080840282018101909252828152935060009084015b8282101561178c578382906000526020600020018054611e37906146bb565b80601f0160208091040260200160405190810160405280929190818152602001828054611e63906146bb565b8015611eb05780601f10611e8557610100808354040283529160200191611eb0565b820191906000526020600020905b815481529060010190602001808311611e9357829003601f168201915b505050505081526020019060010190611e18565b8460090154610c1d565b611ed6612743565b6001600160a01b0316336001600160a01b031614611f065760405162461bcd60e51b8152600401610ab990614437565b600680549082905560408051828152602081018490527fffc708f072ca56e3d45ef0cb288b96cb9378f5f63e1646868bfbc9c38f4263a19101611997565b6000611f5083836128f3565b9392505050565b611f5f612743565b6001600160a01b0316336001600160a01b031614611f8f5760405162461bcd60e51b8152600401610ab990614437565b600880549082905560408051828152602081018490527fe92242fc3efcad407a677132b517977331a6e5b65abab69fd757cc02e99c9c4e9101611997565b600081815260026020908152604091829020600181018054845181850281018501909552808552919361179f9390929083018282801561203657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612018575b50505050508260020180548060200260200160405190810160405280929190818152602001828054801561208957602002820191906000526020600020905b815481526020019060010190808311612075575b505050505061223184600301805480602002602001604051908101604052809291908181526020016000905b828210156121615783829060005260206000200180546120d4906146bb565b80601f0160208091040260200160405190810160405280929190818152602001828054612100906146bb565b801561214d5780601f106121225761010080835404028352916020019161214d565b820191906000526020600020905b81548152906001019060200180831161213057829003601f168201915b5050505050815260200190600101906120b5565b50505060048701805460408051602080840282018101909252828152935060009084015b8282101561178c5783829060005260206000200180546121a4906146bb565b80601f01602080910402602001604051908101604052809291908181526020018280546121d0906146bb565b801561221d5780601f106121f25761010080835404028352916020019161221d565b820191906000526020600020905b81548152906001019060200180831161220057829003601f168201915b505050505081526020019060010190612185565b846009015461103b565b60006001600160e01b03198216636e665ced60e01b14806109e057506109e0826129a8565b60006001600160401b038211156122c85760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b6064820152608401610ab9565b5090565b815467ffffffffffffffff19166001600160401b0391909116179055565b6122f785858585856129dd565b5050505050565b60006109e061230b612ba7565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061235d87878787612c9a565b9150915061112081612d87565b600084815260016020819052604082209061238487611486565b60078111156123a357634e487b7160e01b600052602160045260246000fd5b146123fc5760405162461bcd60e51b815260206004820152602360248201527f476f7665726e6f723a20766f7465206e6f742063757272656e746c792061637460448201526269766560e81b6064820152608401610ab9565b604080516020810190915281546001600160401b031690819052600090612424908790611f44565b905061243287878784612f88565b856001600160a01b03167fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4888784886040516124719493929190614593565b60405180910390a29695505050505050565b60008061248f8361312d565b905060048160078111156124b357634e487b7160e01b600052602160045260246000fd5b146124be5792915050565b60006124c984611ac6565b9050806124d7575092915050565b600360009054906101000a90046001600160a01b03166001600160a01b031663c1a287e26040518163ffffffff1660e01b815260040160206040518083038186803b15801561252557600080fd5b505afa158015612539573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061255d9190613f8a565b6125679082614635565b4210612577575060069392505050565b5060059392505050565b6060600082516001600160401b038111156125ac57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156125df57816020015b60608152602001906001900390816125ca5790505b50905060005b845181101561272d5784818151811061260e57634e487b7160e01b600052603260045260246000fd5b6020026020010151516000146126c85784818151811061263e57634e487b7160e01b600052603260045260246000fd5b602002602001015184828151811061266657634e487b7160e01b600052603260045260246000fd5b602002602001015160405160240161267e91906143fc565b60408051601f198184030181529082905291612699916142a8565b6040519081900390206020820180516001600160e01b03166001600160e01b03199092169190911790526126f1565b8381815181106126e857634e487b7160e01b600052603260045260246000fd5b60200260200101515b82828151811061271157634e487b7160e01b600052603260045260246000fd5b602002602001018190525080612726906146f0565b90506125e5565b509392505050565b6000611a7985858585613293565b60006110366003546001600160a01b031690565b60006127c133868686516001600160401b0381111561278657634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156127b957816020015b60608152602001906001900390816127a45790505b508787612836565b611a79858585856133d8565b600354604080516001600160a01b03928316815291831660208301527f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401910160405180910390a1600380546001600160a01b0319166001600160a01b0392909216919091179055565b805160208201206000612854878761284e8888612581565b85611c01565b60008181526002602052604090206009810154919250906128e85780546001600160a01b0319166001600160a01b038a16178155875161289d90600183019060208b01906138a4565b5086516128b390600283019060208a0190613905565b5085516128c99060038301906020890190613940565b5084516128df9060048301906020880190613999565b50600981018390555b505050505050505050565b60405163782d6fe160e01b81526001600160a01b038381166004830152602482018390526000917f00000000000000000000000000000000000000000000000000000000000000009091169063782d6fe19060440160206040518083038186803b15801561296057600080fd5b505afa158015612974573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612998919061418f565b6001600160601b03169392505050565b60006001600160e01b0319821663bf26d89760e01b14806109e057506301ffc9a760e01b6001600160e01b03198316146109e0565b60006129e886611ac6565b905060008111612a545760405162461bcd60e51b815260206004820152603160248201527f476f7665726e6f7254696d656c6f636b436f6d706f756e643a2070726f706f73604482015270185b081b9bdd081e595d081c5d595d5959607a1b6064820152608401610ab9565b60005b8551811015612b9e5760035485516001600160a01b0390911690630825f38f90879084908110612a9757634e487b7160e01b600052603260045260246000fd5b6020026020010151888481518110612abf57634e487b7160e01b600052603260045260246000fd5b6020026020010151888581518110612ae757634e487b7160e01b600052603260045260246000fd5b6020026020010151888681518110612b0f57634e487b7160e01b600052603260045260246000fd5b6020026020010151876040518663ffffffff1660e01b8152600401612b379493929190614330565b6000604051808303818588803b158015612b5057600080fd5b505af1158015612b64573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052612b8d9190810190613fca565b50612b97816146f0565b9050612a57565b50505050505050565b60007f0000000000000000000000000000000000000000000000000000000000000000461415612bf657507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612cd15750600090506003612d7e565b8460ff16601b14158015612ce957508460ff16601c14155b15612cfa5750600090506004612d7e565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612d4e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612d7757600060019250925050612d7e565b9150600090505b94509492505050565b6000816004811115612da957634e487b7160e01b600052602160045260246000fd5b1415612db25750565b6001816004811115612dd457634e487b7160e01b600052602160045260246000fd5b1415612e225760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610ab9565b6002816004811115612e4457634e487b7160e01b600052602160045260246000fd5b1415612e925760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610ab9565b6003816004811115612eb457634e487b7160e01b600052602160045260246000fd5b1415612f0d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610ab9565b6004816004811115612f2f57634e487b7160e01b600052602160045260246000fd5b1415611ac35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610ab9565b60008481526002602090815260408083206001600160a01b038716845260088101909252909120805460ff16156130175760405162461bcd60e51b815260206004820152602d60248201527f476f7665726e6f72436f6d7061746962696c697479427261766f3a20766f746560448201526c08185b1c9958591e4818d85cdd609a1b6064820152608401610ab9565b805460ff85166101000261ffff199091161760011781556130378361347e565b81546001600160601b039190911662010000026dffffffffffffffffffffffff00001990911617815560ff8416613087578282600601600082825461307c9190614635565b909155506131259050565b60ff8416600114156130a7578282600501600082825461307c9190614635565b60ff8416600214156130c7578282600701600082825461307c9190614635565b60405162461bcd60e51b815260206004820152602d60248201527f476f7665726e6f72436f6d7061746962696c697479427261766f3a20696e766160448201526c6c696420766f7465207479706560981b6064820152608401610ab9565b505050505050565b6000818152600160208181526040808420815160a08101835281546001600160401b0390811660808301908152825283518086018552958301541685529283019390935260029092015460ff808216158015948401949094526101009091041615156060820152906131a25750600792915050565b8060600151156131b55750600292915050565b805151436001600160401b0390911611156131d35750600092915050565b602081015151436001600160401b0390911611156131f45750600192915050565b61320181602001516134e6565b156132455761320f83613515565b8015613231575060008381526002602052604090206006810154600590910154115b61323c576003611f50565b60049392505050565b60405162461bcd60e51b815260206004820152601d60248201527f476f7665726e6f723a20756e6b6e6f776e2070726f706f73616c2069640000006044820152606401610ab9565b50919050565b6000806132a28686868661353c565b905060006132af82611ac6565b905080156111205760005b87518110156133b55760035488516001600160a01b039091169063591fcdfe908a90849081106132fa57634e487b7160e01b600052603260045260246000fd5b602002602001015189848151811061332257634e487b7160e01b600052603260045260246000fd5b602002602001015189858151811061334a57634e487b7160e01b600052603260045260246000fd5b6020026020010151866040518563ffffffff1660e01b81526004016133729493929190614330565b600060405180830381600087803b15801561338c57600080fd5b505af11580156133a0573d6000803e3d6000fd5b50505050806133ae906146f0565b90506132ba565b506000828152600460205260409020805467ffffffffffffffff19169055611120565b60006133e360085490565b6133f233610882600143614678565b10156134725760405162461bcd60e51b815260206004820152604360248201527f476f7665726e6f72436f6d7061746962696c697479427261766f3a2070726f7060448201527f6f73657220766f7465732062656c6f772070726f706f73616c207468726573686064820152621bdb1960ea1b608482015260a401610ab9565b611a7985858585613672565b60006001600160601b038211156122c85760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203960448201526536206269747360d01b6064820152608401610ab9565b60006134fb82516001600160401b0316151590565b80156109e057505051436001600160401b03909116111590565b600081815260026020526040812060058101546135346108c28561112a565b109392505050565b60008061354b86868686611c01565b9050600061355882611486565b9050600281600781111561357c57634e487b7160e01b600052602160045260246000fd5b141580156135aa575060068160078111156135a757634e487b7160e01b600052602160045260246000fd5b14155b80156135d6575060078160078111156135d357634e487b7160e01b600052602160045260246000fd5b14155b6136225760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e6f723a2070726f706f73616c206e6f74206163746976650000006044820152606401610ab9565b60008281526001602052604090819020600201805461ff001916610100179055517f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c906110149084815260200190565b6000806136888686868680519060200120611c01565b905084518651146136ab5760405162461bcd60e51b8152600401610ab99061446e565b83518651146136cc5760405162461bcd60e51b8152600401610ab99061446e565b600086511161371d5760405162461bcd60e51b815260206004820152601860248201527f476f7665726e6f723a20656d7074792070726f706f73616c00000000000000006044820152606401610ab9565b600081815260016020908152604091829020825191820190925281546001600160401b0316908190521561379d5760405162461bcd60e51b815260206004820152602160248201527f476f7665726e6f723a2070726f706f73616c20616c72656164792065786973746044820152607360f81b6064820152608401610ab9565b60006137b06137ab60055490565b612260565b6137b943612260565b6137c3919061464d565b905060006137d36137ab60065490565b6137dd908361464d565b90506137e983836122cc565b6137f660018401826122cc565b7f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e084338b8b8d516001600160401b0381111561384257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561387557816020015b60608152602001906001900390816138605790505b508c88888e60405161388f999897969594939291906144f0565b60405180910390a15091979650505050505050565b8280548282559060005260206000209081019282156138f9579160200282015b828111156138f957825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906138c4565b506122c89291506139f2565b8280548282559060005260206000209081019282156138f9579160200282015b828111156138f9578251825591602001919060010190613925565b82805482825590600052602060002090810192821561398d579160200282015b8281111561398d578251805161397d918491602090910190613a07565b5091602001919060010190613960565b506122c8929150613a7a565b8280548282559060005260206000209081019282156139e6579160200282015b828111156139e657825180516139d6918491602090910190613a07565b50916020019190600101906139b9565b506122c8929150613a97565b5b808211156122c857600081556001016139f3565b828054613a13906146bb565b90600052602060002090601f016020900481019282613a3557600085556138f9565b82601f10613a4e57805160ff19168380011785556138f9565b828001600101855582156138f957918201828111156138f9578251825591602001919060010190613925565b808211156122c8576000613a8e8282613ab4565b50600101613a7a565b808211156122c8576000613aab8282613ab4565b50600101613a97565b508054613ac0906146bb565b6000825580601f10613ad0575050565b601f016020900490600052602060002090810190611ac391906139f2565b6000613b01613afc8461460e565b6145bb565b9050828152838383011115613b1557600080fd5b828260208301376000602084830101529392505050565b600082601f830112613b3c578081fd5b81356020613b4c613afc836145eb565b80838252828201915082860187848660051b8901011115613b6b578586fd5b855b85811015613b92578135613b8081614737565b84529284019290840190600101613b6d565b5090979650505050505050565b600082601f830112613baf578081fd5b81356020613bbf613afc836145eb565b80838252828201915082860187848660051b8901011115613bde578586fd5b855b85811015613b925781356001600160401b03811115613bfd578788fd5b8801603f81018a13613c0d578788fd5b613c1e8a8783013560408401613aee565b8552509284019290840190600101613be0565b600082601f830112613c41578081fd5b81356020613c51613afc836145eb565b80838252828201915082860187848660051b8901011115613c70578586fd5b855b85811015613b925781356001600160401b03811115613c8f578788fd5b613c9d8a87838c0101613d0d565b8552509284019290840190600101613c72565b600082601f830112613cc0578081fd5b81356020613cd0613afc836145eb565b80838252828201915082860187848660051b8901011115613cef578586fd5b855b85811015613b9257813584529284019290840190600101613cf1565b600082601f830112613d1d578081fd5b611f5083833560208501613aee565b803560ff81168114613d3d57600080fd5b919050565b60008060408385031215613d54578182fd5b8235613d5f81614737565b946020939093013593505050565b60008060008060808587031215613d82578182fd5b84356001600160401b0380821115613d98578384fd5b613da488838901613b2c565b95506020870135915080821115613db9578384fd5b613dc588838901613cb0565b94506040870135915080821115613dda578384fd5b50613de787828801613b9f565b949793965093946060013593505050565b60008060008060808587031215613e0d578182fd5b84356001600160401b0380821115613e23578384fd5b613e2f88838901613b2c565b95506020870135915080821115613e44578384fd5b613e5088838901613cb0565b94506040870135915080821115613e65578384fd5b613e7188838901613b9f565b93506060870135915080821115613e86578283fd5b50613e9387828801613d0d565b91505092959194509250565b600080600080600060a08688031215613eb6578283fd5b85356001600160401b0380821115613ecc578485fd5b613ed889838a01613b2c565b96506020880135915080821115613eed578485fd5b613ef989838a01613cb0565b95506040880135915080821115613f0e578485fd5b613f1a89838a01613c31565b94506060880135915080821115613f2f578283fd5b613f3b89838a01613b9f565b93506080880135915080821115613f50578283fd5b50613f5d88828901613d0d565b9150509295509295909350565b600060208284031215613f7b578081fd5b81518015158114611f50578182fd5b600060208284031215613f9b578081fd5b5051919050565b600060208284031215613fb3578081fd5b81356001600160e01b031981168114611f50578182fd5b600060208284031215613fdb578081fd5b81516001600160401b03811115613ff0578182fd5b8201601f81018413614000578182fd5b805161400e613afc8261460e565b818152856020838501011115614022578384fd5b611a7982602083016020860161468f565b600060208284031215614044578081fd5b8135611f5081614737565b600060208284031215614060578081fd5b5035919050565b60008060408385031215614079578182fd5b82359150602083013561408b81614737565b809150509250929050565b600080604083850312156140a8578182fd5b823591506140b860208401613d2c565b90509250929050565b600080600080606085870312156140d6578182fd5b843593506140e660208601613d2c565b925060408501356001600160401b0380821115614101578384fd5b818701915087601f830112614114578384fd5b813581811115614122578485fd5b886020828501011115614133578485fd5b95989497505060200194505050565b600080600080600060a08688031215614159578283fd5b8535945061416960208701613d2c565b935061417760408701613d2c565b94979396509394606081013594506080013592915050565b6000602082840312156141a0578081fd5b81516001600160601b0381168114611f50578182fd5b6000815180845260208085019450808401835b838110156141ee5781516001600160a01b0316875295820195908201906001016141c9565b509495945050505050565b600081518084526020808501808196508360051b81019150828601855b8581101561424057828403895261422e84835161427c565b98850198935090840190600101614216565b5091979650505050505050565b6000815180845260208085019450808401835b838110156141ee57815187529582019590820190600101614260565b6000815180845261429481602086016020860161468f565b601f01601f19169290920160200192915050565b600082516142ba81846020870161468f565b9190910192915050565b60018060a01b038516815283602082015260a06040820152601860a08201527f73657450656e64696e6741646d696e286164647265737329000000000000000060c082015260e06060820152600061431f60e083018561427c565b905082608083015295945050505050565b60018060a01b038516815283602082015260a0604082015260008060a083015260c0606083015261431f60c083018561427c565b60808152600061437760808301876141b6565b8281036020840152614389818761424d565b9050828103604084015261439d81866141f9565b91505082606083015295945050505050565b6080815260006143c260808301876141b6565b82810360208401526143d4818761424d565b905082810360408401526143e881866141f9565b9050828103606084015261147b81856141f9565b602081526000611f50602083018461427c565b602081016008831061443157634e487b7160e01b600052602160045260246000fd5b91905290565b60208082526018908201527f476f7665726e6f723a206f6e6c79476f7665726e616e63650000000000000000604082015260600190565b60208082526021908201527f476f7665726e6f723a20696e76616c69642070726f706f73616c206c656e67746040820152600d60fb1b606082015260800190565b60208082526021908201527f476f7665726e6f723a2070726f706f73616c206e6f74207375636365737366756040820152601b60fa1b606082015260800190565b8981526001600160a01b03891660208201526101206040820181905260009061451b8382018b6141b6565b9050828103606084015261452f818a61424d565b9050828103608084015261454381896141f9565b905082810360a084015261455781886141f9565b6001600160401b0387811660c0860152861660e08501528381036101008501529050614583818561427c565b9c9b505050505050505050505050565b84815260ff84166020820152826040820152608060608201526000611a61608083018461427c565b604051601f8201601f191681016001600160401b03811182821017156145e3576145e3614721565b604052919050565b60006001600160401b0382111561460457614604614721565b5060051b60200190565b60006001600160401b0382111561462757614627614721565b50601f01601f191660200190565b600082198211156146485761464861470b565b500190565b60006001600160401b0380831681851680830382111561466f5761466f61470b565b01949350505050565b60008282101561468a5761468a61470b565b500390565b60005b838110156146aa578181015183820152602001614692565b83811115611b565750506000910152565b600181811c908216806146cf57607f821691505b6020821081141561328d57634e487b7160e01b600052602260045260246000fd5b60006000198214156147045761470461470b565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114611ac357600080fdfea2646970667358221220cb4204d1b5491254a284c37b532aabff2bf3f805b671ce20ea675b4a0996027f64736f6c63430008040033"; diff --git a/packages/chain-events/src/contractTypes/factories/FlashAttacks__factory.ts b/packages/chain-events/src/contractTypes/factories/FlashAttacks__factory.ts new file mode 100644 index 00000000000..0c246f2c89a --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/FlashAttacks__factory.ts @@ -0,0 +1,189 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { FlashAttacks } from "../FlashAttacks"; + +export class FlashAttacks__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + _token: string, + _MINTER: string, + _governance: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + _token, + _MINTER, + _governance, + overrides || {} + ) as Promise; + } + getDeployTransaction( + _token: string, + _MINTER: string, + _governance: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + _token, + _MINTER, + _governance, + overrides || {} + ); + } + attach(address: string): FlashAttacks { + return super.attach(address) as FlashAttacks; + } + connect(signer: Signer): FlashAttacks__factory { + return super.connect(signer) as FlashAttacks__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): FlashAttacks { + return new Contract(address, _abi, signerOrProvider) as FlashAttacks; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "address", + name: "_MINTER", + type: "address", + }, + { + internalType: "address", + name: "_governance", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalPower", + type: "uint256", + }, + { + internalType: "contract IExecutorWithTimelock", + name: "executor", + type: "address", + }, + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bool[]", + name: "withDelegatecalls", + type: "bool[]", + }, + { + internalType: "bytes32", + name: "ipfsHash", + type: "bytes32", + }, + ], + name: "flashProposal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "votePower", + type: "uint256", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "bool", + name: "support", + type: "bool", + }, + ], + name: "flashVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "votePower", + type: "uint256", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "bool", + name: "support", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "flashVotePermit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x60e060405234801561001057600080fd5b50604051610e82380380610e8283398101604081905261002f91610072565b6001600160601b0319606093841b811660805291831b821660a05290911b1660c0526100b4565b80516001600160a01b038116811461006d57600080fd5b919050565b600080600060608486031215610086578283fd5b61008f84610056565b925061009d60208501610056565b91506100ab60408501610056565b90509250925092565b60805160601c60a05160601c60c05160601c610d5f6101236000398061015b528061036d52806105a652508060c5528061020e52806102d7528061044552806105105280610653525080609852806101df52806102aa528061041852806104e352806106245250610d5f6000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806302564fb8146100465780633b5c12b21461005b578063c56686ae1461006e575b600080fd5b610059610054366004610a3f565b610081565b005b610059610069366004610917565b610293565b61005961007c366004610a07565b6104cc565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906100f1907f00000000000000000000000000000000000000000000000000000000000000009030908b90600401610b97565b602060405180830381600087803b15801561010b57600080fd5b505af115801561011f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061014391906108dc565b5060405163af1e0bd360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063af1e0bd3906101989088908890889088908890600401610c9b565b600060405180830381600087803b1580156101b257600080fd5b505af11580156101c6573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb9150610238907f0000000000000000000000000000000000000000000000000000000000000000908a90600401610bbb565b602060405180830381600087803b15801561025257600080fd5b505af1158015610266573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061028a91906108dc565b50505050505050565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90610303907f00000000000000000000000000000000000000000000000000000000000000009030908d90600401610b97565b602060405180830381600087803b15801561031d57600080fd5b505af1158015610331573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061035591906108dc565b50604051633e1d06a760e21b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063f8741a9c906103ae908a908a908a908a908a908a908a90600401610bd4565b602060405180830381600087803b1580156103c857600080fd5b505af11580156103dc573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061040091906108ff565b5060405163a9059cbb60e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063a9059cbb9061046f907f0000000000000000000000000000000000000000000000000000000000000000908c90600401610bbb565b602060405180830381600087803b15801561048957600080fd5b505af115801561049d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104c191906108dc565b505050505050505050565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd9061053c907f00000000000000000000000000000000000000000000000000000000000000009030908890600401610b97565b602060405180830381600087803b15801561055657600080fd5b505af115801561056a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061058e91906108dc565b506040516330962b7d60e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063612c56fa906105dd9085908590600401610c8b565b600060405180830381600087803b1580156105f757600080fd5b505af115801561060b573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb915061067d907f0000000000000000000000000000000000000000000000000000000000000000908790600401610bbb565b602060405180830381600087803b15801561069757600080fd5b505af11580156106ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106cf91906108dc565b50505050565b600082601f8301126106e5578081fd5b81356106f86106f382610ce5565b610cc1565b81815291506020808301908481018184028601820187101561071957600080fd5b60005b8481101561074157813561072f81610d03565b8452928201929082019060010161071c565b505050505092915050565b600082601f83011261075c578081fd5b813561076a6106f382610ce5565b81815291506020808301908481018184028601820187101561078b57600080fd5b60005b848110156107415781356107a181610d1b565b8452928201929082019060010161078e565b6000601f83818401126107c4578182fd5b82356107d26106f382610ce5565b818152925060208084019085810160005b84811015610862578135880189603f8201126107fe57600080fd5b8381013567ffffffffffffffff81111561081457fe5b610825818901601f19168601610cc1565b81815260408c8184860101111561083b57600080fd5b828185018884013750600091810186019190915285525092820192908201906001016107e3565b50505050505092915050565b600082601f83011261087e578081fd5b813561088c6106f382610ce5565b8181529150602080830190848101818402860182018710156108ad57600080fd5b60005b84811015610741578135845292820192908201906001016108b0565b80356108d781610d03565b919050565b6000602082840312156108ed578081fd5b81516108f881610d1b565b9392505050565b600060208284031215610910578081fd5b5051919050565b600080600080600080600080610100898b031215610933578384fd5b8835975061094360208a016108cc565b9650604089013567ffffffffffffffff8082111561095f578586fd5b61096b8c838d016106d5565b975060608b0135915080821115610980578586fd5b61098c8c838d0161086e565b965060808b01359150808211156109a1578586fd5b6109ad8c838d016107b3565b955060a08b01359150808211156109c2578485fd5b6109ce8c838d016107b3565b945060c08b01359150808211156109e3578384fd5b506109f08b828c0161074c565b92505060e089013590509295985092959890939650565b600080600060608486031215610a1b578283fd5b83359250602084013591506040840135610a3481610d1b565b809150509250925092565b60008060008060008060c08789031215610a57578182fd5b86359550602087013594506040870135610a7081610d1b565b9350606087013560ff81168114610a85578283fd5b9598949750929560808101359460a0909101359350915050565b6000815180845260208085019450808401835b83811015610ad0578151151587529582019590820190600101610ab2565b509495945050505050565b60008282518085526020808601955080818302840101818601855b84811015610b5b57601f1980878503018a5282518051808652895b81811015610b2c578281018801518782018901528701610b11565b81811115610b3c578a8883890101525b509a86019a601f01909116939093018401925090830190600101610af6565b5090979650505050505050565b6000815180845260208085019450808401835b83811015610ad057815187529582019590820190600101610b7b565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b03888116825260e0602080840182905289519184018290526000928a820192909190610100860190855b81811015610c23578551851683529483019491830191600101610c05565b50508581036040870152610c37818c610b68565b93505050508281036060840152610c4e8188610adb565b90508281036080840152610c628187610adb565b905082810360a0840152610c768186610a9f565b9150508260c083015298975050505050505050565b9182521515602082015260400190565b948552921515602085015260ff9190911660408401526060830152608082015260a00190565b60405181810167ffffffffffffffff81118282101715610cdd57fe5b604052919050565b600067ffffffffffffffff821115610cf957fe5b5060209081020190565b6001600160a01b0381168114610d1857600080fd5b50565b8015158114610d1857600080fdfea2646970667358221220509def0ab238f8d545da76b86ed5fc1425195308d39720b66797889342cf939c64736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/GovernancePowerDelegationERC20__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernancePowerDelegationERC20__factory.ts new file mode 100644 index 00000000000..4ad83e13453 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernancePowerDelegationERC20__factory.ts @@ -0,0 +1,497 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { GovernancePowerDelegationERC20 } from "../GovernancePowerDelegationERC20"; + +export class GovernancePowerDelegationERC20__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernancePowerDelegationERC20 { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernancePowerDelegationERC20; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "delegatee", + type: "address", + }, + { + indexed: false, + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "DelegateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "user", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "DelegatedPowerChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DELEGATE_BY_TYPE_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DELEGATE_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + ], + name: "delegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "delegateByType", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegator", + type: "address", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "getDelegateeByType", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "getPowerAtBlock", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "getPowerCurrent", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "totalSupplyAt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/GovernanceStrategy__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernanceStrategy__factory.ts new file mode 100644 index 00000000000..e6a8b494620 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernanceStrategy__factory.ts @@ -0,0 +1,179 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GovernanceStrategy } from "../GovernanceStrategy"; + +export class GovernanceStrategy__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + aave: string, + stkAave: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + aave, + stkAave, + overrides || {} + ) as Promise; + } + getDeployTransaction( + aave: string, + stkAave: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(aave, stkAave, overrides || {}); + } + attach(address: string): GovernanceStrategy { + return super.attach(address) as GovernanceStrategy; + } + connect(signer: Signer): GovernanceStrategy__factory { + return super.connect(signer) as GovernanceStrategy__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernanceStrategy { + return new Contract(address, _abi, signerOrProvider) as GovernanceStrategy; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "aave", + type: "address", + }, + { + internalType: "address", + name: "stkAave", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "AAVE", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "STK_AAVE", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getPropositionPowerAt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getTotalPropositionSupplyAt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getTotalVotingSupplyAt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotingPowerAt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x60c060405234801561001057600080fd5b5060405161050738038061050783398101604081905261002f91610069565b6001600160601b0319606092831b8116608052911b1660a05261009b565b80516001600160a01b038116811461006457600080fd5b919050565b6000806040838503121561007b578182fd5b6100848361004d565b91506100926020840161004d565b90509250929050565b60805160601c60a05160601c6104356100d260003980610132528061021b52508060e8528061017c52806102bb52506104356000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806348ccda3c146100675780637a71f9d714610085578063a1076e58146100a5578063bdf2878d146100b8578063eaeded5f146100c0578063f6b50203146100d3575b600080fd5b61006f6100e6565b60405161007c91906103b3565b60405180910390f35b610098610093366004610383565b61010a565b60405161007c91906103f6565b6100986100b336600461034d565b61011b565b61006f610130565b6100986100ce36600461034d565b610154565b6100986100e1366004610383565b610162565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061011582610162565b92915050565b600061012983836001610201565b9392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600061012983836000610201565b604051630981b24d60e41b81526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063981b24d0906101b19085906004016103f6565b60206040518083038186803b1580156101c957600080fd5b505afa1580156101dd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610115919061039b565b60405163c2ffbb9160e01b81526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c2ffbb9190610254908790879087906004016103c7565b60206040518083038186803b15801561026c57600080fd5b505afa158015610280573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102a4919061039b565b60405163c2ffbb9160e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c2ffbb91906102f4908890889088906004016103c7565b60206040518083038186803b15801561030c57600080fd5b505afa158015610320573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610344919061039b565b01949350505050565b6000806040838503121561035f578182fd5b82356001600160a01b0381168114610375578283fd5b946020939093013593505050565b600060208284031215610394578081fd5b5035919050565b6000602082840312156103ac578081fd5b5051919050565b6001600160a01b0391909116815260200190565b6001600160a01b03841681526020810183905260608101600283106103e857fe5b826040830152949350505050565b9081526020019056fea26469706673582212200b3c1c6efd0da91caec4d0e1cb4bad53708d49150e4645a05e6c634acb3e29eb64736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorAlphaMock__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorAlphaMock__factory.ts new file mode 100644 index 00000000000..dd949517b71 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorAlphaMock__factory.ts @@ -0,0 +1,724 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GovernorAlphaMock } from "../GovernorAlphaMock"; + +export class GovernorAlphaMock__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + timelock_: string, + MPond_: string, + guardian_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + timelock_, + MPond_, + guardian_, + overrides || {} + ) as Promise; + } + getDeployTransaction( + timelock_: string, + MPond_: string, + guardian_: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + timelock_, + MPond_, + guardian_, + overrides || {} + ); + } + attach(address: string): GovernorAlphaMock { + return super.attach(address) as GovernorAlphaMock; + } + connect(signer: Signer): GovernorAlphaMock__factory { + return super.connect(signer) as GovernorAlphaMock__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorAlphaMock { + return new Contract(address, _abi, signerOrProvider) as GovernorAlphaMock; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "timelock_", + type: "address", + }, + { + internalType: "address", + name: "MPond_", + type: "address", + }, + { + internalType: "address", + name: "guardian_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "support", + type: "bool", + }, + { + indexed: false, + internalType: "uint256", + name: "votes", + type: "uint256", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DOMAIN_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MPond", + outputs: [ + { + internalType: "contract MPondInterface", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "__abdicate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "__acceptAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "__executeSetTimelockPendingAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "__queueSetTimelockPendingAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "cancel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "bool", + name: "support", + type: "bool", + }, + ], + name: "castVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "bool", + name: "support", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "execute", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getActions", + outputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "getReceipt", + outputs: [ + { + components: [ + { + internalType: "bool", + name: "hasVoted", + type: "bool", + }, + { + internalType: "bool", + name: "support", + type: "bool", + }, + { + internalType: "uint96", + name: "votes", + type: "uint96", + }, + ], + internalType: "struct GovernorAlphaMock.Receipt", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "guardian", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "latestProposalIds", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalMaxOperations", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "proposalThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "proposals", + outputs: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "proposer", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + { + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "bool", + name: "canceled", + type: "bool", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "queue", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "quorumVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum GovernorAlphaMock.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "timelock", + outputs: [ + { + internalType: "contract TimelockInterface", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b506040516200331738038062003317833981016040819052620000349162000077565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560028054919093169116179055620000e3565b6000806000606084860312156200008c578283fd5b83516200009981620000ca565b6020850151909350620000ac81620000ca565b6040850151909250620000bf81620000ca565b809150509250925092565b6001600160a01b0381168114620000e057600080fd5b50565b61322480620000f36000396000f3fe60806040526004361061019c5760003560e01c80634634c61f116100ec578063d33219b41161008a578063ddf0b00911610064578063ddf0b00914610456578063deaaa7cc14610476578063e23a9a521461048b578063fe0d94c1146104b85761019c565b8063d33219b41461040c578063da35c66414610421578063da95691a146104365761019c565b806391500671116100c657806391500671146103ad578063ad0d7f7d146103cd578063b58131b0146103e2578063b9a61961146103f75761019c565b80634634c61f14610363578063760fbc13146103835780637bdbe4d0146103985761019c565b806321f43e42116101595780633932abb1116101335780633932abb1146102df5780633e4f49e6146102f457806340e58ee514610321578063452a9320146103415761019c565b806321f43e421461027a57806324bc1a641461029a578063328dd982146102af5761019c565b8063013cf08b146101a157806302a251a3146101df57806306fdde031461020157806315373e3d1461022357806317977c611461024557806320606b7014610265575b600080fd5b3480156101ad57600080fd5b506101c16101bc3660046123bc565b6104cb565b6040516101d6999897969594939291906130e3565b60405180910390f35b3480156101eb57600080fd5b506101f4610524565b6040516101d691906127e2565b34801561020d57600080fd5b50610216610529565b6040516101d69190612859565b34801561022f57600080fd5b5061024361023e366004612400565b61055a565b005b34801561025157600080fd5b506101f4610260366004612204565b610569565b34801561027157600080fd5b506101f461057b565b34801561028657600080fd5b5061024361029536600461221f565b61059f565b3480156102a657600080fd5b506101f4610686565b3480156102bb57600080fd5b506102cf6102ca3660046123bc565b610692565b6040516101d6949392919061278a565b3480156102eb57600080fd5b506101f4610921565b34801561030057600080fd5b5061031461030f3660046123bc565b610926565b6040516101d69190612845565b34801561032d57600080fd5b5061024361033c3660046123bc565b610ab0565b34801561034d57600080fd5b50610356610d19565b6040516101d6919061263b565b34801561036f57600080fd5b5061024361037e36600461242f565b610d28565b34801561038f57600080fd5b50610243610ed9565b3480156103a457600080fd5b506101f4610f15565b3480156103b957600080fd5b506102436103c836600461221f565b610f1a565b3480156103d957600080fd5b50610356610fef565b3480156103ee57600080fd5b506101f4610ffe565b34801561040357600080fd5b5061024361100a565b34801561041857600080fd5b5061035661108f565b34801561042d57600080fd5b506101f461109e565b34801561044257600080fd5b506101f4610451366004612249565b6110a4565b34801561046257600080fd5b506102436104713660046123bc565b6114c4565b34801561048257600080fd5b506101f461172e565b34801561049757600080fd5b506104ab6104a63660046123d4565b611752565b6040516101d6919061301d565b6102436104c63660046123bc565b6117c1565b6004602052600090815260409020805460018201546002830154600784015460088501546009860154600a870154600b9097015495966001600160a01b0390951695939492939192909160ff8082169161010090041689565b600c90565b604051806040016040528060158152602001744d61726c696e20476f7665726e6f7220416c70686160581b81525081565b610565338383611986565b5050565b60056020526000908152604090205481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6002546001600160a01b031633146105d25760405162461bcd60e51b81526004016105c990612b66565b60405180910390fd5b600080546040516001600160a01b0390911691630825f38f918391906105fc90879060200161263b565b604051602081830303815290604052856040518563ffffffff1660e01b815260040161062b9493929190612668565b600060405180830381600087803b15801561064557600080fd5b505af1158015610659573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106819190810190612349565b505050565b671bc16d674ec8000090565b6060806060806000600460008781526020019081526020016000209050806003018160040182600501836006018380548060200260200160405190810160405280929190818152602001828054801561071457602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116106f6575b505050505093508280548060200260200160405190810160405280929190818152602001828054801561076657602002820191906000526020600020905b815481526020019060010190808311610752575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b828210156108395760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156108255780601f106107fa57610100808354040283529160200191610825565b820191906000526020600020905b81548152906001019060200180831161080857829003601f168201915b50505050508152602001906001019061078e565b50505050915080805480602002602001604051908101604052809291908181526020016000905b8282101561090b5760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156108f75780601f106108cc576101008083540402835291602001916108f7565b820191906000526020600020905b8154815290600101906020018083116108da57829003601f168201915b505050505081526020019060010190610860565b5050505090509450945094509450509193509193565b600190565b6000816003541015801561093a5750600082115b6109565760405162461bcd60e51b81526004016105c990612c2c565b6000828152600460205260409020600b81015460ff161561097b576002915050610aab565b80600701544311610990576000915050610aab565b806008015443116109a5576001915050610aab565b80600a015481600901541115806109c657506109bf610686565b8160090154105b156109d5576003915050610aab565b60028101546109e8576004915050610aab565b600b810154610100900460ff1615610a04576007915050610aab565b610a95816002015460008054906101000a90046001600160a01b03166001600160a01b031663c1a287e26040518163ffffffff1660e01b815260040160206040518083038186803b158015610a5857600080fd5b505afa158015610a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a909190612331565b611b4f565b4210610aa5576006915050610aab565b60059150505b919050565b6000610abb82610926565b90506007816007811115610acb57fe5b1415610ae95760405162461bcd60e51b81526004016105c990612c79565b60008281526004602052604090206002546001600160a01b0316331480610bb45750610b13610ffe565b60018054838201546001600160a01b039182169263782d6fe19290911690610b3c904390611b7b565b6040518363ffffffff1660e01b8152600401610b5992919061264f565b60206040518083038186803b158015610b7157600080fd5b505afa158015610b85573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba99190612485565b6001600160601b0316105b610bd05760405162461bcd60e51b81526004016105c990612d01565b600b8101805460ff1916600117905560005b6003820154811015610cdc576000546003830180546001600160a01b039092169163591fcdfe919084908110610c1457fe5b6000918252602090912001546004850180546001600160a01b039092169185908110610c3c57fe5b9060005260206000200154856005018581548110610c5657fe5b90600052602060002001866006018681548110610c6f57fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401610c9e959493929190612751565b600060405180830381600087803b158015610cb857600080fd5b505af1158015610ccc573d6000803e3d6000fd5b505060019092019150610be29050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610d0c91906127e2565b60405180910390a1505050565b6002546001600160a01b031681565b6040805180820190915260158152744d61726c696e20476f7665726e6f7220416c70686160581b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f37bc407a8c335d268e200f7c1e5054743f95a56373a8a102b4142e8aa2546b48610da1611ba3565b30604051602001610db594939291906127eb565b60405160208183030381529060405280519060200120905060007f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee8787604051602001610e049392919061280f565b60405160208183030381529060405280519060200120905060008282604051602001610e31929190612620565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610e6e9493929190612827565b6020604051602081039080840390855afa158015610e90573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610ec35760405162461bcd60e51b81526004016105c9906129a9565b610ece818a8a611986565b505050505050505050565b6002546001600160a01b03163314610f035760405162461bcd60e51b81526004016105c990612f91565b600280546001600160a01b0319169055565b600a90565b6002546001600160a01b03163314610f445760405162461bcd60e51b81526004016105c990612e46565b600080546040516001600160a01b0390911691633a66f90191839190610f6e90879060200161263b565b604051602081830303815290604052856040518563ffffffff1660e01b8152600401610f9d9493929190612668565b602060405180830381600087803b158015610fb757600080fd5b505af1158015610fcb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106819190612331565b6001546001600160a01b031681565b670de0b6b3a764000090565b6002546001600160a01b031633146110345760405162461bcd60e51b81526004016105c990612ab8565b6000805460408051630e18b68160e01b815290516001600160a01b0390921692630e18b6819260048084019382900301818387803b15801561107557600080fd5b505af1158015611089573d6000803e3d6000fd5b50505050565b6000546001600160a01b031681565b60035481565b60006110ae610ffe565b600180546001600160a01b03169063782d6fe19033906110cf904390611b7b565b6040518363ffffffff1660e01b81526004016110ec92919061264f565b60206040518083038186803b15801561110457600080fd5b505afa158015611118573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113c9190612485565b6001600160601b0316116111625760405162461bcd60e51b81526004016105c990612eba565b84518651148015611174575083518651145b8015611181575082518651145b61119d5760405162461bcd60e51b81526004016105c990612f23565b85516111bb5760405162461bcd60e51b81526004016105c990612bdc565b6111c3610f15565b865111156111e35760405162461bcd60e51b81526004016105c9906128da565b33600090815260056020526040902054801561126057600061120482610926565b9050600181600781111561121457fe5b14156112325760405162461bcd60e51b81526004016105c990612d54565b600081600781111561124057fe5b141561125e5760405162461bcd60e51b81526004016105c990612926565b505b600061126e43610a90610921565b9050600061127e82610a90610524565b6003805460010190559050611291611d06565b604051806101a001604052806003548152602001336001600160a01b03168152602001600081526020018b81526020018a815260200189815260200188815260200184815260200183815260200160008152602001600081526020016000151581526020016000151581525090508060046000836000015181526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550604082015181600201556060820151816003019080519060200190611374929190611d7b565b5060808201518051611390916004840191602090910190611de0565b5060a082015180516113ac916005840191602090910190611e27565b5060c082015180516113c8916006840191602090910190611e80565b5060e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b0160006101000a81548160ff02191690831515021790555061018082015181600b0160016101000a81548160ff02191690831515021790555090505080600001516005600083602001516001600160a01b03166001600160a01b03168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000151338c8c8c8c89898e6040516114ae9998979695949392919061304b565b60405180910390a1519998505050505050505050565b60046114cf82610926565b60078111156114da57fe5b146114f75760405162461bcd60e51b81526004016105c990612a4a565b600081815260046020818152604080842084548251630d48571f60e31b8152925191959461154c9442946001600160a01b0390931693636a42b8f8938084019390829003018186803b158015610a5857600080fd5b905060005b60038301548110156116f4576116ec83600301828154811061156f57fe5b6000918252602090912001546004850180546001600160a01b03909216918490811061159757fe5b90600052602060002001548560050184815481106115b157fe5b600091825260209182902001805460408051601f600260001961010060018716150201909416939093049283018590048502810185019091528181529283018282801561163f5780601f106116145761010080835404028352916020019161163f565b820191906000526020600020905b81548152906001019060200180831161162257829003601f168201915b505050505086600601858154811061165357fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156116e15780601f106116b6576101008083540402835291602001916116e1565b820191906000526020600020905b8154815290600101906020018083116116c457829003601f168201915b505050505086611ba7565b600101611551565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290610d0c908590849061312f565b7f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee81565b61175a611ed9565b5060008281526004602090815260408083206001600160a01b0385168452600c018252918290208251606081018452905460ff80821615158352610100820416151592820192909252620100009091046001600160601b0316918101919091525b92915050565b60056117cc82610926565b60078111156117d757fe5b146117f45760405162461bcd60e51b81526004016105c990612dd7565b6000818152600460205260408120600b8101805461ff001916610100179055905b600382015481101561194a576000546004830180546001600160a01b0390921691630825f38f91908490811061184757fe5b906000526020600020015484600301848154811061186157fe5b6000918252602090912001546004860180546001600160a01b03909216918690811061188957fe5b90600052602060002001548660050186815481106118a357fe5b906000526020600020018760060187815481106118bc57fe5b9060005260206000200188600201546040518763ffffffff1660e01b81526004016118eb959493929190612751565b6000604051808303818588803b15801561190457600080fd5b505af1158015611918573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f191682016040526119419190810190612349565b50600101611815565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f8260405161197a91906127e2565b60405180910390a15050565b600161199183610926565b600781111561199c57fe5b146119b95760405162461bcd60e51b81526004016105c9906129fc565b60008281526004602090815260408083206001600160a01b0387168452600c8101909252909120805460ff1615611a025760405162461bcd60e51b81526004016105c990612b15565b600154600783015460405163782d6fe160e01b81526000926001600160a01b03169163782d6fe191611a38918a9160040161264f565b60206040518083038186803b158015611a5057600080fd5b505afa158015611a64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a889190612485565b90508315611ab157611aa78360090154826001600160601b0316611b4f565b6009840155611ace565b611ac883600a0154826001600160601b0316611b4f565b600a8401555b8154600160ff199091161761ff00191661010085151502176dffffffffffffffffffffffff00001916620100006001600160601b038316021782556040517f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c4690611b3f9088908890889086906126d4565b60405180910390a1505050505050565b600082820183811015611b745760405162461bcd60e51b81526004016105c990612cd6565b9392505050565b600082821115611b9d5760405162461bcd60e51b81526004016105c990612fee565b50900390565b4690565b6000546040516001600160a01b039091169063f2b0653790611bd59088908890889088908890602001612705565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611c0791906127e2565b60206040518083038186803b158015611c1f57600080fd5b505afa158015611c33573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c579190612315565b15611c745760405162461bcd60e51b81526004016105c99061286c565b600054604051633a66f90160e01b81526001600160a01b0390911690633a66f90190611cac9088908890889088908890600401612705565b602060405180830381600087803b158015611cc657600080fd5b505af1158015611cda573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cfe9190612331565b505050505050565b604051806101a001604052806000815260200160006001600160a01b031681526020016000815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b828054828255906000526020600020908101928215611dd0579160200282015b82811115611dd057825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611d9b565b50611ddc929150611ef9565b5090565b828054828255906000526020600020908101928215611e1b579160200282015b82811115611e1b578251825591602001919060010190611e00565b50611ddc929150611f18565b828054828255906000526020600020908101928215611e74579160200282015b82811115611e745782518051611e64918491602090910190611f2d565b5091602001919060010190611e47565b50611ddc929150611f9a565b828054828255906000526020600020908101928215611ecd579160200282015b82811115611ecd5782518051611ebd918491602090910190611f2d565b5091602001919060010190611ea0565b50611ddc929150611fb7565b604080516060810182526000808252602082018190529181019190915290565b5b80821115611ddc5780546001600160a01b0319168155600101611efa565b5b80821115611ddc5760008155600101611f19565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611f6e57805160ff1916838001178555611e1b565b82800160010185558215611e1b5791820182811115611e1b578251825591602001919060010190611e00565b80821115611ddc576000611fae8282611fd4565b50600101611f9a565b80821115611ddc576000611fcb8282611fd4565b50600101611fb7565b50805460018160011615610100020316600290046000825580601f10611ffa5750612018565b601f0160209004906000526020600020908101906120189190611f18565b50565b80356001600160a01b03811681146117bb57600080fd5b600082601f830112612042578081fd5b813561205561205082613164565b61313d565b81815291506020808301908481018184028601820187101561207657600080fd5b60005b8481101561209d5761208b888361201b565b84529282019290820190600101612079565b505050505092915050565b600082601f8301126120b8578081fd5b81356120c661205082613164565b818152915060208083019084810160005b8481101561209d576120ee888484358a01016121b6565b845292820192908201906001016120d7565b600082601f830112612110578081fd5b813561211e61205082613164565b818152915060208083019084810160005b8481101561209d57612146888484358a01016121b6565b8452928201929082019060010161212f565b600082601f830112612168578081fd5b813561217661205082613164565b81815291506020808301908481018184028601820187101561219757600080fd5b60005b8481101561209d5781358452928201929082019060010161219a565b600082601f8301126121c6578081fd5b81356121d461205082613184565b91508082528360208285010111156121eb57600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215612215578081fd5b611b74838361201b565b60008060408385031215612231578081fd5b61223b848461201b565b946020939093013593505050565b600080600080600060a08688031215612260578081fd5b853567ffffffffffffffff80821115612277578283fd5b61228389838a01612032565b96506020880135915080821115612298578283fd5b6122a489838a01612158565b955060408801359150808211156122b9578283fd5b6122c589838a01612100565b945060608801359150808211156122da578283fd5b6122e689838a016120a8565b935060808801359150808211156122fb578283fd5b50612308888289016121b6565b9150509295509295909350565b600060208284031215612326578081fd5b8151611b74816131e0565b600060208284031215612342578081fd5b5051919050565b60006020828403121561235a578081fd5b815167ffffffffffffffff811115612370578182fd5b8201601f81018413612380578182fd5b805161238e61205082613184565b8181528560208385010111156123a2578384fd5b6123b38260208301602086016131b4565b95945050505050565b6000602082840312156123cd578081fd5b5035919050565b600080604083850312156123e6578182fd5b823591506123f7846020850161201b565b90509250929050565b60008060408385031215612412578182fd5b823591506020830135612424816131e0565b809150509250929050565b600080600080600060a08688031215612446578283fd5b853594506020860135612458816131e0565b9350604086013560ff8116811461246d578384fd5b94979396509394606081013594506080013592915050565b600060208284031215612496578081fd5b81516001600160601b0381168114611b74578182fd5b6000815180845260208085019450808401835b838110156124e45781516001600160a01b0316875295820195908201906001016124bf565b509495945050505050565b6000815180845260208085018081965082840281019150828601855b85811015612535578284038952612523848351612571565b9885019893509084019060010161250b565b5091979650505050505050565b6000815180845260208085019450808401835b838110156124e457815187529582019590820190600101612555565b600081518084526125898160208601602086016131b4565b601f01601f19169290920160200192915050565b600081546001808216600081146125bb57600181146125d957612617565b60028304607f16865260ff1983166020870152604086019350612617565b600283048087526125e9866131a8565b60005b8281101561260d5781546020828b01015284820191506020810190506125ec565b8801602001955050505b50505092915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b038616825284602083015260a06040830152601860a08301527f73657450656e64696e6741646d696e286164647265737329000000000000000060c083015260e060608301526126c360e0830185612571565b905082608083015295945050505050565b6001600160a01b039490941684526020840192909252151560408301526001600160601b0316606082015260800190565b600060018060a01b038716825285602083015260a0604083015261272c60a0830186612571565b828103606084015261273e8186612571565b9150508260808301529695505050505050565b600060018060a01b038716825285602083015260a0604083015261277860a083018661259d565b828103606084015261273e818661259d565b60006080825261279d60808301876124ac565b82810360208401526127af8187612542565b905082810360408401526127c381866124ef565b905082810360608401526127d781856124ef565b979650505050505050565b90815260200190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091521515604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b602081016008831061285357fe5b91905290565b600060208252611b746020830184612571565b60208082526048908201527f476f7665726e6f72416c7068614d6f636b3a3a5f71756575654f72526576657260408201527f743a2070726f706f73616c20616374696f6e20616c7265616479207175657565606082015267642061742065746160c01b608082015260a00190565b6020808252602c908201527f476f7665726e6f72416c7068614d6f636b3a3a70726f706f73653a20746f6f2060408201526b6d616e7920616374696f6e7360a01b606082015260800190565b6020808252605d908201527f476f7665726e6f72416c7068614d6f636b3a3a70726f706f73653a206f6e652060408201527f6c6976652070726f706f73616c207065722070726f706f7365722c20666f756e60608201527f6420616e20616c72656164792070656e64696e672070726f706f73616c000000608082015260a00190565b60208082526033908201527f476f7665726e6f72416c7068614d6f636b3a3a63617374566f746542795369676040820152723a20696e76616c6964207369676e617475726560681b606082015260800190565b6020808252602e908201527f476f7665726e6f72416c7068614d6f636b3a3a5f63617374566f74653a20766f60408201526d1d1a5b99c81a5cc818db1bdcd95960921b606082015260800190565b60208082526048908201527f476f7665726e6f72416c7068614d6f636b3a3a71756575653a2070726f706f7360408201527f616c2063616e206f6e6c792062652071756575656420696620697420697320736060820152671d58d8d95959195960c21b608082015260a00190565b6020808252603d908201527f476f7665726e6f72416c7068614d6f636b3a3a5f5f61636365707441646d696e60408201527f3a2073656e646572206d75737420626520676f7620677561726469616e000000606082015260800190565b60208082526031908201527f476f7665726e6f72416c7068614d6f636b3a3a5f63617374566f74653a20766f6040820152701d195c88185b1c9958591e481d9bdd1959607a1b606082015260800190565b60208082526050908201527f476f7665726e6f72416c7068614d6f636b3a3a5f5f657865637574655365745460408201527f696d656c6f636b50656e64696e6741646d696e3a2073656e646572206d75737460608201526f1031329033b7bb1033bab0b93234b0b760811b608082015260a00190565b60208082526030908201527f476f7665726e6f72416c7068614d6f636b3a3a70726f706f73653a206d75737460408201526f2070726f7669646520616374696f6e7360801b606082015260800190565b6020808252602d908201527f476f7665726e6f72416c7068614d6f636b3a3a73746174653a20696e76616c6960408201526c19081c1c9bdc1bdcd85b081a59609a1b606082015260800190565b6020808252603a908201527f476f7665726e6f72416c7068614d6f636b3a3a63616e63656c3a2063616e6e6f60408201527f742063616e63656c2065786563757465642070726f706f73616c000000000000606082015260800190565b6020808252601190820152706164646974696f6e206f766572666c6f7760781b604082015260600190565b60208082526033908201527f476f7665726e6f72416c7068614d6f636b3a3a63616e63656c3a2070726f706f6040820152721cd95c8818589bdd99481d1a1c995cda1bdb19606a1b606082015260800190565b6020808252605c908201527f476f7665726e6f72416c7068614d6f636b3a3a70726f706f73653a206f6e652060408201527f6c6976652070726f706f73616c207065722070726f706f7365722c20666f756e60608201527f6420616e20616c7265616479206163746976652070726f706f73616c00000000608082015260a00190565b60208082526049908201527f476f7665726e6f72416c7068614d6f636b3a3a657865637574653a2070726f7060408201527f6f73616c2063616e206f6e6c79206265206578656375746564206966206974206060820152681a5cc81c5d595d595960ba1b608082015260a00190565b6020808252604e908201527f476f7665726e6f72416c7068614d6f636b3a3a5f5f717565756553657454696d60408201527f656c6f636b50656e64696e6741646d696e3a2073656e646572206d757374206260608201526d329033b7bb1033bab0b93234b0b760911b608082015260a00190565b60208082526043908201527f476f7665726e6f72416c7068614d6f636b3a3a70726f706f73653a2070726f7060408201527f6f73657220766f7465732062656c6f772070726f706f73616c207468726573686060820152621bdb1960ea1b608082015260a00190565b60208082526048908201527f476f7665726e6f72416c7068614d6f636b3a3a70726f706f73653a2070726f7060408201527f6f73616c2066756e6374696f6e20696e666f726d6174696f6e206172697479206060820152670dad2e6dac2e8c6d60c31b608082015260a00190565b6020808252603a908201527f476f7665726e6f72416c7068614d6f636b3a3a5f5f61626469636174653a207360408201527f656e646572206d75737420626520676f7620677561726469616e000000000000606082015260800190565b6020808252601590820152747375627472616374696f6e20756e646572666c6f7760581b604082015260600190565b8151151581526020808301511515908201526040918201516001600160601b03169181019190915260600190565b8981526001600160a01b0389166020820152610120604082018190526000906130768382018b6124ac565b9050828103606084015261308a818a612542565b9050828103608084015261309e81896124ef565b905082810360a08401526130b281886124ef565b90508560c08401528460e08401528281036101008401526130d38185612571565b9c9b505050505050505050505050565b9889526001600160a01b0397909716602089015260408801959095526060870193909352608086019190915260a085015260c0840152151560e083015215156101008201526101200190565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561315c57600080fd5b604052919050565b600067ffffffffffffffff82111561317a578081fd5b5060209081020190565b600067ffffffffffffffff82111561319a578081fd5b50601f01601f191660200190565b60009081526020902090565b60005b838110156131cf5781810151838201526020016131b7565b838111156110895750506000910152565b801515811461201857600080fdfea26469706673582212207746f039fc8dc9030939aa93b7a627f62686a9ee3a01be69409dbb7195728f6964736f6c634300060c0033"; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorAlpha__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorAlpha__factory.ts new file mode 100644 index 00000000000..a671422b8e7 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorAlpha__factory.ts @@ -0,0 +1,724 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GovernorAlpha } from "../GovernorAlpha"; + +export class GovernorAlpha__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + timelock_: string, + MPond_: string, + guardian_: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + timelock_, + MPond_, + guardian_, + overrides || {} + ) as Promise; + } + getDeployTransaction( + timelock_: string, + MPond_: string, + guardian_: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + timelock_, + MPond_, + guardian_, + overrides || {} + ); + } + attach(address: string): GovernorAlpha { + return super.attach(address) as GovernorAlpha; + } + connect(signer: Signer): GovernorAlpha__factory { + return super.connect(signer) as GovernorAlpha__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorAlpha { + return new Contract(address, _abi, signerOrProvider) as GovernorAlpha; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "timelock_", + type: "address", + }, + { + internalType: "address", + name: "MPond_", + type: "address", + }, + { + internalType: "address", + name: "guardian_", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "support", + type: "bool", + }, + { + indexed: false, + internalType: "uint256", + name: "votes", + type: "uint256", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DOMAIN_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MPond", + outputs: [ + { + internalType: "contract MPondInterface", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "__abdicate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "__acceptAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "__executeSetTimelockPendingAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "__queueSetTimelockPendingAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "cancel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "bool", + name: "support", + type: "bool", + }, + ], + name: "castVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "bool", + name: "support", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "execute", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getActions", + outputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "getReceipt", + outputs: [ + { + components: [ + { + internalType: "bool", + name: "hasVoted", + type: "bool", + }, + { + internalType: "bool", + name: "support", + type: "bool", + }, + { + internalType: "uint96", + name: "votes", + type: "uint96", + }, + ], + internalType: "struct GovernorAlpha.Receipt", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "guardian", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "latestProposalIds", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalMaxOperations", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "proposalThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "proposals", + outputs: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "proposer", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + { + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "bool", + name: "canceled", + type: "bool", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "queue", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "quorumVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum GovernorAlpha.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "timelock", + outputs: [ + { + internalType: "contract TimelockInterface", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b50604051620032c9380380620032c9833981016040819052620000349162000077565b600080546001600160a01b039485166001600160a01b031991821617909155600180549385169382169390931790925560028054919093169116179055620000e3565b6000806000606084860312156200008c578283fd5b83516200009981620000ca565b6020850151909350620000ac81620000ca565b6040850151909250620000bf81620000ca565b809150509250925092565b6001600160a01b0381168114620000e057600080fd5b50565b6131d680620000f36000396000f3fe60806040526004361061019c5760003560e01c80634634c61f116100ec578063d33219b41161008a578063ddf0b00911610064578063ddf0b00914610456578063deaaa7cc14610476578063e23a9a521461048b578063fe0d94c1146104b85761019c565b8063d33219b41461040c578063da35c66414610421578063da95691a146104365761019c565b806391500671116100c657806391500671146103ad578063ad0d7f7d146103cd578063b58131b0146103e2578063b9a61961146103f75761019c565b80634634c61f14610363578063760fbc13146103835780637bdbe4d0146103985761019c565b806321f43e42116101595780633932abb1116101335780633932abb1146102df5780633e4f49e6146102f457806340e58ee514610321578063452a9320146103415761019c565b806321f43e421461027a57806324bc1a641461029a578063328dd982146102af5761019c565b8063013cf08b146101a157806302a251a3146101df57806306fdde031461020157806315373e3d1461022357806317977c611461024557806320606b7014610265575b600080fd5b3480156101ad57600080fd5b506101c16101bc3660046123bf565b6104cb565b6040516101d699989796959493929190613095565b60405180910390f35b3480156101eb57600080fd5b506101f4610524565b6040516101d691906127e2565b34801561020d57600080fd5b5061021661052a565b6040516101d69190612859565b34801561022f57600080fd5b5061024361023e366004612403565b61055b565b005b34801561025157600080fd5b506101f4610260366004612207565b61056a565b34801561027157600080fd5b506101f461057c565b34801561028657600080fd5b50610243610295366004612222565b6105a0565b3480156102a657600080fd5b506101f4610687565b3480156102bb57600080fd5b506102cf6102ca3660046123bf565b610695565b6040516101d6949392919061278a565b3480156102eb57600080fd5b506101f4610924565b34801561030057600080fd5b5061031461030f3660046123bf565b610929565b6040516101d69190612845565b34801561032d57600080fd5b5061024361033c3660046123bf565b610ab3565b34801561034d57600080fd5b50610356610d1c565b6040516101d6919061263b565b34801561036f57600080fd5b5061024361037e366004612432565b610d2b565b34801561038f57600080fd5b50610243610edc565b3480156103a457600080fd5b506101f4610f18565b3480156103b957600080fd5b506102436103c8366004612222565b610f1d565b3480156103d957600080fd5b50610356610ff2565b3480156103ee57600080fd5b506101f4611001565b34801561040357600080fd5b5061024361100d565b34801561041857600080fd5b50610356611092565b34801561042d57600080fd5b506101f46110a1565b34801561044257600080fd5b506101f461045136600461224c565b6110a7565b34801561046257600080fd5b506102436104713660046123bf565b6114c7565b34801561048257600080fd5b506101f4611731565b34801561049757600080fd5b506104ab6104a63660046123d7565b611755565b6040516101d69190612fcf565b6102436104c63660046123bf565b6117c4565b6004602052600090815260409020805460018201546002830154600784015460088501546009860154600a870154600b9097015495966001600160a01b0390951695939492939192909160ff8082169161010090041689565b61433090565b604051806040016040528060158152602001744d61726c696e20476f7665726e6f7220416c70686160581b81525081565b610566338383611989565b5050565b60056020526000908152604090205481565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6002546001600160a01b031633146105d35760405162461bcd60e51b81526004016105ca9061299e565b60405180910390fd5b600080546040516001600160a01b0390911691630825f38f918391906105fd90879060200161263b565b604051602081830303815290604052856040518563ffffffff1660e01b815260040161062c9493929190612668565b600060405180830381600087803b15801561064657600080fd5b505af115801561065a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610682919081019061234c565b505050565b6901b1ae4d6e2ef500000090565b6060806060806000600460008781526020019081526020016000209050806003018160040182600501836006018380548060200260200160405190810160405280929190818152602001828054801561071757602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116106f9575b505050505093508280548060200260200160405190810160405280929190818152602001828054801561076957602002820191906000526020600020905b815481526020019060010190808311610755575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b8282101561083c5760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156108285780601f106107fd57610100808354040283529160200191610828565b820191906000526020600020905b81548152906001019060200180831161080b57829003601f168201915b505050505081526020019060010190610791565b50505050915080805480602002602001604051908101604052809291908181526020016000905b8282101561090e5760008481526020908190208301805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156108fa5780601f106108cf576101008083540402835291602001916108fa565b820191906000526020600020905b8154815290600101906020018083116108dd57829003601f168201915b505050505081526020019060010190610863565b5050505090509450945094509450509193509193565b600190565b6000816003541015801561093d5750600082115b6109595760405162461bcd60e51b81526004016105ca90612a10565b6000828152600460205260409020600b81015460ff161561097e576002915050610aae565b80600701544311610993576000915050610aae565b806008015443116109a8576001915050610aae565b80600a015481600901541115806109c957506109c2610687565b8160090154105b156109d8576003915050610aae565b60028101546109eb576004915050610aae565b600b810154610100900460ff1615610a07576007915050610aae565b610a98816002015460008054906101000a90046001600160a01b03166001600160a01b031663c1a287e26040518163ffffffff1660e01b815260040160206040518083038186803b158015610a5b57600080fd5b505afa158015610a6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a939190612334565b611b52565b4210610aa8576006915050610aae565b60059150505b919050565b6000610abe82610929565b90506007816007811115610ace57fe5b1415610aec5760405162461bcd60e51b81526004016105ca90612eaa565b60008281526004602052604090206002546001600160a01b0316331480610bb75750610b16611001565b60018054838201546001600160a01b039182169263782d6fe19290911690610b3f904390611b7e565b6040518363ffffffff1660e01b8152600401610b5c92919061264f565b60206040518083038186803b158015610b7457600080fd5b505afa158015610b88573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bac9190612488565b6001600160601b0316105b610bd35760405162461bcd60e51b81526004016105ca90612c76565b600b8101805460ff1916600117905560005b6003820154811015610cdf576000546003830180546001600160a01b039092169163591fcdfe919084908110610c1757fe5b6000918252602090912001546004850180546001600160a01b039092169185908110610c3f57fe5b9060005260206000200154856005018581548110610c5957fe5b90600052602060002001866006018681548110610c7257fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401610ca1959493929190612751565b600060405180830381600087803b158015610cbb57600080fd5b505af1158015610ccf573d6000803e3d6000fd5b505060019092019150610be59050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610d0f91906127e2565b60405180910390a1505050565b6002546001600160a01b031681565b6040805180820190915260158152744d61726c696e20476f7665726e6f7220416c70686160581b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f37bc407a8c335d268e200f7c1e5054743f95a56373a8a102b4142e8aa2546b48610da4611ba6565b30604051602001610db894939291906127eb565b60405160208183030381529060405280519060200120905060007f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee8787604051602001610e079392919061280f565b60405160208183030381529060405280519060200120905060008282604051602001610e34929190612620565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610e719493929190612827565b6020604051602081039080840390855afa158015610e93573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610ec65760405162461bcd60e51b81526004016105ca90612dd8565b610ed1818a8a611989565b505050505050505050565b6002546001600160a01b03163314610f065760405162461bcd60e51b81526004016105ca90612f79565b600280546001600160a01b0319169055565b600a90565b6002546001600160a01b03163314610f475760405162461bcd60e51b81526004016105ca90612b29565b600080546040516001600160a01b0390911691633a66f90191839190610f7190879060200161263b565b604051602081830303815290604052856040518563ffffffff1660e01b8152600401610fa09493929190612668565b602060405180830381600087803b158015610fba57600080fd5b505af1158015610fce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106829190612334565b6001546001600160a01b031681565b670de0b6b3a764000090565b6002546001600160a01b031633146110375760405162461bcd60e51b81526004016105ca9061286c565b6000805460408051630e18b68160e01b815290516001600160a01b0390921692630e18b6819260048084019382900301818387803b15801561107857600080fd5b505af115801561108c573d6000803e3d6000fd5b50505050565b6000546001600160a01b031681565b60035481565b60006110b1611001565b600180546001600160a01b03169063782d6fe19033906110d2904390611b7e565b6040518363ffffffff1660e01b81526004016110ef92919061264f565b60206040518083038186803b15801561110757600080fd5b505afa15801561111b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061113f9190612488565b6001600160601b0316116111655760405162461bcd60e51b81526004016105ca90612d7b565b84518651148015611177575083518651145b8015611184575082518651145b6111a05760405162461bcd60e51b81526004016105ca90612c0c565b85516111be5760405162461bcd60e51b81526004016105ca90612d2f565b6111c6610f18565b865111156111e65760405162461bcd60e51b81526004016105ca90612b99565b33600090815260056020526040902054801561126357600061120782610929565b9050600181600781111561121757fe5b14156112355760405162461bcd60e51b81526004016105ca90612e27565b600081600781111561124357fe5b14156112615760405162461bcd60e51b81526004016105ca90612aa6565b505b600061127143610a93610924565b9050600061128182610a93610524565b6003805460010190559050611294611d09565b604051806101a001604052806003548152602001336001600160a01b03168152602001600081526020018b81526020018a815260200189815260200188815260200184815260200183815260200160008152602001600081526020016000151581526020016000151581525090508060046000836000015181526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550604082015181600201556060820151816003019080519060200190611377929190611d7e565b5060808201518051611393916004840191602090910190611de3565b5060a082015180516113af916005840191602090910190611e2a565b5060c082015180516113cb916006840191602090910190611e83565b5060e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b0160006101000a81548160ff02191690831515021790555061018082015181600b0160016101000a81548160ff02191690831515021790555090505080600001516005600083602001516001600160a01b03166001600160a01b03168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000151338c8c8c8c89898e6040516114b199989796959493929190612ffd565b60405180910390a1519998505050505050505050565b60046114d282610929565b60078111156114dd57fe5b146114fa5760405162461bcd60e51b81526004016105ca906128c9565b600081815260046020818152604080842084548251630d48571f60e31b8152925191959461154f9442946001600160a01b0390931693636a42b8f8938084019390829003018186803b158015610a5b57600080fd5b905060005b60038301548110156116f7576116ef83600301828154811061157257fe5b6000918252602090912001546004850180546001600160a01b03909216918490811061159a57fe5b90600052602060002001548560050184815481106115b457fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156116425780601f1061161757610100808354040283529160200191611642565b820191906000526020600020905b81548152906001019060200180831161162557829003601f168201915b505050505086600601858154811061165657fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156116e45780601f106116b9576101008083540402835291602001916116e4565b820191906000526020600020905b8154815290600101906020018083116116c757829003601f168201915b505050505086611baa565b600101611554565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290610d0f90859084906130e1565b7f8e25870c07e0b0b3884c78da52790939a455c275406c44ae8b434b692fb916ee81565b61175d611edc565b5060008281526004602090815260408083206001600160a01b0385168452600c018252918290208251606081018452905460ff80821615158352610100820416151592820192909252620100009091046001600160601b0316918101919091525b92915050565b60056117cf82610929565b60078111156117da57fe5b146117f75760405162461bcd60e51b81526004016105ca90612933565b6000818152600460205260408120600b8101805461ff001916610100179055905b600382015481101561194d576000546004830180546001600160a01b0390921691630825f38f91908490811061184a57fe5b906000526020600020015484600301848154811061186457fe5b6000918252602090912001546004860180546001600160a01b03909216918690811061188c57fe5b90600052602060002001548660050186815481106118a657fe5b906000526020600020018760060187815481106118bf57fe5b9060005260206000200188600201546040518763ffffffff1660e01b81526004016118ee959493929190612751565b6000604051808303818588803b15801561190757600080fd5b505af115801561191b573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052611944919081019061234c565b50600101611818565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f8260405161197d91906127e2565b60405180910390a15050565b600161199483610929565b600781111561199f57fe5b146119bc5760405162461bcd60e51b81526004016105ca90612f00565b60008281526004602090815260408083206001600160a01b0387168452600c8101909252909120805460ff1615611a055760405162461bcd60e51b81526004016105ca90612a59565b600154600783015460405163782d6fe160e01b81526000926001600160a01b03169163782d6fe191611a3b918a9160040161264f565b60206040518083038186803b158015611a5357600080fd5b505afa158015611a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8b9190612488565b90508315611ab457611aaa8360090154826001600160601b0316611b52565b6009840155611ad1565b611acb83600a0154826001600160601b0316611b52565b600a8401555b8154600160ff199091161761ff00191661010085151502176dffffffffffffffffffffffff00001916620100006001600160601b038316021782556040517f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c4690611b429088908890889086906126d4565b60405180910390a1505050505050565b600082820183811015611b775760405162461bcd60e51b81526004016105ca90612be1565b9392505050565b600082821115611ba05760405162461bcd60e51b81526004016105ca90612f4a565b50900390565b4690565b6000546040516001600160a01b039091169063f2b0653790611bd89088908890889088908890602001612705565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611c0a91906127e2565b60206040518083038186803b158015611c2257600080fd5b505afa158015611c36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c5a9190612318565b15611c775760405162461bcd60e51b81526004016105ca90612cc5565b600054604051633a66f90160e01b81526001600160a01b0390911690633a66f90190611caf9088908890889088908890600401612705565b602060405180830381600087803b158015611cc957600080fd5b505af1158015611cdd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d019190612334565b505050505050565b604051806101a001604052806000815260200160006001600160a01b031681526020016000815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b828054828255906000526020600020908101928215611dd3579160200282015b82811115611dd357825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611d9e565b50611ddf929150611efc565b5090565b828054828255906000526020600020908101928215611e1e579160200282015b82811115611e1e578251825591602001919060010190611e03565b50611ddf929150611f1b565b828054828255906000526020600020908101928215611e77579160200282015b82811115611e775782518051611e67918491602090910190611f30565b5091602001919060010190611e4a565b50611ddf929150611f9d565b828054828255906000526020600020908101928215611ed0579160200282015b82811115611ed05782518051611ec0918491602090910190611f30565b5091602001919060010190611ea3565b50611ddf929150611fba565b604080516060810182526000808252602082018190529181019190915290565b5b80821115611ddf5780546001600160a01b0319168155600101611efd565b5b80821115611ddf5760008155600101611f1c565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611f7157805160ff1916838001178555611e1e565b82800160010185558215611e1e5791820182811115611e1e578251825591602001919060010190611e03565b80821115611ddf576000611fb18282611fd7565b50600101611f9d565b80821115611ddf576000611fce8282611fd7565b50600101611fba565b50805460018160011615610100020316600290046000825580601f10611ffd575061201b565b601f01602090049060005260206000209081019061201b9190611f1b565b50565b80356001600160a01b03811681146117be57600080fd5b600082601f830112612045578081fd5b813561205861205382613116565b6130ef565b81815291506020808301908481018184028601820187101561207957600080fd5b60005b848110156120a05761208e888361201e565b8452928201929082019060010161207c565b505050505092915050565b600082601f8301126120bb578081fd5b81356120c961205382613116565b818152915060208083019084810160005b848110156120a0576120f1888484358a01016121b9565b845292820192908201906001016120da565b600082601f830112612113578081fd5b813561212161205382613116565b818152915060208083019084810160005b848110156120a057612149888484358a01016121b9565b84529282019290820190600101612132565b600082601f83011261216b578081fd5b813561217961205382613116565b81815291506020808301908481018184028601820187101561219a57600080fd5b60005b848110156120a05781358452928201929082019060010161219d565b600082601f8301126121c9578081fd5b81356121d761205382613136565b91508082528360208285010111156121ee57600080fd5b8060208401602084013760009082016020015292915050565b600060208284031215612218578081fd5b611b77838361201e565b60008060408385031215612234578081fd5b61223e848461201e565b946020939093013593505050565b600080600080600060a08688031215612263578081fd5b853567ffffffffffffffff8082111561227a578283fd5b61228689838a01612035565b9650602088013591508082111561229b578283fd5b6122a789838a0161215b565b955060408801359150808211156122bc578283fd5b6122c889838a01612103565b945060608801359150808211156122dd578283fd5b6122e989838a016120ab565b935060808801359150808211156122fe578283fd5b5061230b888289016121b9565b9150509295509295909350565b600060208284031215612329578081fd5b8151611b7781613192565b600060208284031215612345578081fd5b5051919050565b60006020828403121561235d578081fd5b815167ffffffffffffffff811115612373578182fd5b8201601f81018413612383578182fd5b805161239161205382613136565b8181528560208385010111156123a5578384fd5b6123b6826020830160208601613166565b95945050505050565b6000602082840312156123d0578081fd5b5035919050565b600080604083850312156123e9578182fd5b823591506123fa846020850161201e565b90509250929050565b60008060408385031215612415578182fd5b82359150602083013561242781613192565b809150509250929050565b600080600080600060a08688031215612449578283fd5b85359450602086013561245b81613192565b9350604086013560ff81168114612470578384fd5b94979396509394606081013594506080013592915050565b600060208284031215612499578081fd5b81516001600160601b0381168114611b77578182fd5b6000815180845260208085019450808401835b838110156124e75781516001600160a01b0316875295820195908201906001016124c2565b509495945050505050565b6000815180845260208085019450848183028601828601855b85811015612535578383038952612523838351612571565b9885019892509084019060010161250b565b5090979650505050505050565b6000815180845260208085019450808401835b838110156124e757815187529582019590820190600101612555565b60008151808452612589816020860160208601613166565b601f01601f19169290920160200192915050565b600081546001808216600081146125bb57600181146125d957612617565b60028304607f16865260ff1983166020870152604086019350612617565b600283048087526125e98661315a565b60005b8281101561260d5781546020828b01015284820191506020810190506125ec565b8801602001955050505b50505092915050565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b600060018060a01b038616825284602083015260a06040830152601860a08301527f73657450656e64696e6741646d696e286164647265737329000000000000000060c083015260e060608301526126c360e0830185612571565b905082608083015295945050505050565b6001600160a01b039490941684526020840192909252151560408301526001600160601b0316606082015260800190565b600060018060a01b038716825285602083015260a0604083015261272c60a0830186612571565b828103606084015261273e8186612571565b9150508260808301529695505050505050565b600060018060a01b038716825285602083015260a0604083015261277860a083018661259d565b828103606084015261273e818661259d565b60006080825261279d60808301876124af565b82810360208401526127af8187612542565b905082810360408401526127c381866124f2565b905082810360608401526127d781856124f2565b979650505050505050565b90815260200190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b92835260208301919091521515604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b602081016008831061285357fe5b91905290565b600060208252611b776020830184612571565b60208082526039908201527f476f7665726e6f72416c7068613a3a5f5f61636365707441646d696e3a20736560408201527f6e646572206d75737420626520676f7620677561726469616e00000000000000606082015260800190565b60208082526044908201527f476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c206360408201527f616e206f6e6c79206265207175657565642069662069742069732073756363656060820152631959195960e21b608082015260a00190565b60208082526045908201527f476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c60408201527f2063616e206f6e6c7920626520657865637574656420696620697420697320716060820152641d595d595960da1b608082015260a00190565b6020808252604c908201527f476f7665726e6f72416c7068613a3a5f5f6578656375746553657454696d656c60408201527f6f636b50656e64696e6741646d696e3a2073656e646572206d7573742062652060608201526b33b7bb1033bab0b93234b0b760a11b608082015260a00190565b60208082526029908201527f476f7665726e6f72416c7068613a3a73746174653a20696e76616c69642070726040820152681bdc1bdcd85b081a5960ba1b606082015260800190565b6020808252602d908201527f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f7465722060408201526c185b1c9958591e481d9bdd1959609a1b606082015260800190565b60208082526059908201527f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766560408201527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60608201527f20616c72656164792070656e64696e672070726f706f73616c00000000000000608082015260a00190565b6020808252604a908201527f476f7665726e6f72416c7068613a3a5f5f717565756553657454696d656c6f6360408201527f6b50656e64696e6741646d696e3a2073656e646572206d75737420626520676f6060820152693b1033bab0b93234b0b760b11b608082015260a00190565b60208082526028908201527f476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7960408201526720616374696f6e7360c01b606082015260800190565b6020808252601190820152706164646974696f6e206f766572666c6f7760781b604082015260600190565b60208082526044908201527f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c60408201527f2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d6060820152630c2e8c6d60e31b608082015260a00190565b6020808252602f908201527f476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722060408201526e18589bdd99481d1a1c995cda1bdb19608a1b606082015260800190565b60208082526044908201527f476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a207060408201527f726f706f73616c20616374696f6e20616c7265616479207175657565642061746060820152632065746160e01b608082015260a00190565b6020808252602c908201527f476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f60408201526b7669646520616374696f6e7360a01b606082015260800190565b6020808252603f908201527f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657260408201527f20766f7465732062656c6f772070726f706f73616c207468726573686f6c6400606082015260800190565b6020808252602f908201527f476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e60408201526e76616c6964207369676e617475726560881b606082015260800190565b60208082526058908201527f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766560408201527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60608201527f20616c7265616479206163746976652070726f706f73616c0000000000000000608082015260a00190565b60208082526036908201527f476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f742063616040820152751b98d95b08195e1958dd5d1959081c1c9bdc1bdcd85b60521b606082015260800190565b6020808252602a908201527f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e67604082015269081a5cc818db1bdcd95960b21b606082015260800190565b6020808252601590820152747375627472616374696f6e20756e646572666c6f7760581b604082015260600190565b60208082526036908201527f476f7665726e6f72416c7068613a3a5f5f61626469636174653a2073656e6465604082015275391036bab9ba1031329033b7bb1033bab0b93234b0b760511b606082015260800190565b8151151581526020808301511515908201526040918201516001600160601b03169181019190915260600190565b8981526001600160a01b0389166020820152610120604082018190526000906130288382018b6124af565b9050828103606084015261303c818a612542565b9050828103608084015261305081896124f2565b905082810360a084015261306481886124f2565b90508560c08401528460e08401528281036101008401526130858185612571565b9c9b505050505050505050505050565b9889526001600160a01b0397909716602089015260408801959095526060870193909352608086019190915260a085015260c0840152151560e083015215156101008201526101200190565b918252602082015260400190565b60405181810167ffffffffffffffff8111828210171561310e57600080fd5b604052919050565b600067ffffffffffffffff82111561312c578081fd5b5060209081020190565b600067ffffffffffffffff82111561314c578081fd5b50601f01601f191660200190565b60009081526020902090565b60005b83811015613181578181015183820152602001613169565b8381111561108c5750506000910152565b801515811461201b57600080fdfea264697066735822122046383ede9e6eb5ff9ef166b10de9722f76f823458ef1096feb045429b132e4cf64736f6c634300060c0033"; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegateMock__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegateMock__factory.ts new file mode 100644 index 00000000000..de6e2c8d39b --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegateMock__factory.ts @@ -0,0 +1,1085 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GovernorBravoDelegateMock } from "../GovernorBravoDelegateMock"; + +export class GovernorBravoDelegateMock__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): GovernorBravoDelegateMock { + return super.attach(address) as GovernorBravoDelegateMock; + } + connect(signer: Signer): GovernorBravoDelegateMock__factory { + return super.connect(signer) as GovernorBravoDelegateMock__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorBravoDelegateMock { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernorBravoDelegateMock; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldImplementation", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "NewImplementation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldPendingAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldProposalThreshold", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newProposalThreshold", + type: "uint256", + }, + ], + name: "ProposalThresholdSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "votes", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldVotingDelay", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotingDelay", + type: "uint256", + }, + ], + name: "VotingDelaySet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldVotingPeriod", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotingPeriod", + type: "uint256", + }, + ], + name: "VotingPeriodSet", + type: "event", + }, + { + constant: true, + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "DOMAIN_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MAX_PROPOSAL_THRESHOLD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MAX_VOTING_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MAX_VOTING_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MIN_PROPOSAL_THRESHOLD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MIN_VOTING_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MIN_VOTING_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "_acceptAdmin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "_setPendingAdmin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "newProposalThreshold", + type: "uint256", + }, + ], + name: "_setProposalThreshold", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "newVotingDelay", + type: "uint256", + }, + ], + name: "_setVotingDelay", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "newVotingPeriod", + type: "uint256", + }, + ], + name: "_setVotingPeriod", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "cancel", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "comp", + outputs: [ + { + internalType: "contract CompInterface", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "execute", + outputs: [], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getActions", + outputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "getReceipt", + outputs: [ + { + components: [ + { + internalType: "bool", + name: "hasVoted", + type: "bool", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint96", + name: "votes", + type: "uint96", + }, + ], + internalType: "struct GovernorBravoDelegateStorageV1.Receipt", + name: "", + type: "tuple", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "implementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "initialProposalId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "timelock_", + type: "address", + }, + { + internalType: "address", + name: "comp_", + type: "address", + }, + { + internalType: "uint256", + name: "votingPeriod_", + type: "uint256", + }, + { + internalType: "uint256", + name: "votingDelay_", + type: "uint256", + }, + { + internalType: "uint256", + name: "proposalThreshold_", + type: "uint256", + }, + ], + name: "initialize", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "latestProposalIds", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "pendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalMaxOperations", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "proposals", + outputs: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "proposer", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + { + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "abstainVotes", + type: "uint256", + }, + { + internalType: "bool", + name: "canceled", + type: "bool", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "queue", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "quorumVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "setInitialProposalId", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum GovernorBravoDelegateStorageV1.ProposalState", + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "timelock", + outputs: [ + { + internalType: "contract TimelockInterface", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50614309806100206000396000f3fe60806040526004361061023b5760003560e01c806378a574d01161012e578063da35c664116100ab578063e48083fe1161006f578063e48083fe14610391578063e9c714f214610639578063f851a4401461064e578063fc4eee4214610663578063fe0d94c1146106785761023b565b8063da35c664146105a2578063da95691a146105b7578063ddf0b009146105d7578063deaaa7cc146105f7578063e23a9a521461060c5761023b565b8063b1126263116100f2578063b112626314610523578063b58131b014610538578063b71d1a0c1461054d578063d13f90b41461056d578063d33219b41461058d5761023b565b806378a574d0146104c4578063791f5d23146103915780637b3c71d3146104d95780637bdbe4d0146104f9578063a64e024a1461050e5761023b565b806324bc1a64116101bc5780633bccf4fd116101805780633bccf4fd146104225780633e4f49e61461044257806340e58ee51461046f578063567813881461048f5780635c60da1b146104af5761023b565b806324bc1a641461039157806325fd935a146103a657806326782247146103bb578063328dd982146103dd5780633932abb11461040d5761023b565b806317977c611161020357806317977c611461030757806317ba1b8b146103275780631dfb1b5a1461034757806320606b7014610367578063215809ca1461037c5761023b565b8063013cf08b1461024057806302a251a31461027f57806306fdde03146102a15780630ea2d98c146102c3578063109d0af8146102e5575b600080fd5b34801561024c57600080fd5b5061026061025b366004612a09565b61068b565b6040516102769a99989796959493929190614020565b60405180910390f35b34801561028b57600080fd5b506102946106ee565b6040516102769190613c6d565b3480156102ad57600080fd5b506102b66106f4565b6040516102769190613d29565b3480156102cf57600080fd5b506102e36102de366004612a09565b610727565b005b3480156102f157600080fd5b506102fa6107d1565b6040516102769190613d0d565b34801561031357600080fd5b5061029461032236600461281e565b6107e0565b34801561033357600080fd5b506102e3610342366004612a09565b6107f2565b34801561035357600080fd5b506102e3610362366004612a09565b61088d565b34801561037357600080fd5b50610294610920565b34801561038857600080fd5b50610294610937565b34801561039d57600080fd5b5061029461093d565b3480156103b257600080fd5b50610294610942565b3480156103c757600080fd5b506103d0610950565b6040516102769190613b33565b3480156103e957600080fd5b506103fd6103f8366004612a09565b61095f565b6040516102769493929190613c20565b34801561041957600080fd5b50610294610bee565b34801561042e57600080fd5b506102e361043d366004612af9565b610bf4565b34801561044e57600080fd5b5061046261045d366004612a09565b610dcf565b6040516102769190613d1b565b34801561047b57600080fd5b506102e361048a366004612a09565b610f4c565b34801561049b57600080fd5b506102e36104aa366004612a61565b6111a0565b3480156104bb57600080fd5b506103d06111ea565b3480156104d057600080fd5b506102e36111f9565b3480156104e557600080fd5b506102e36104f4366004612a91565b611205565b34801561050557600080fd5b50610294611255565b34801561051a57600080fd5b5061029461125a565b34801561052f57600080fd5b50610294611261565b34801561054457600080fd5b50610294611267565b34801561055957600080fd5b506102e361056836600461281e565b61126d565b34801561057957600080fd5b506102e3610588366004612844565b6112ea565b34801561059957600080fd5b506102fa61145e565b3480156105ae57600080fd5b5061029461146d565b3480156105c357600080fd5b506102946105d23660046128b9565b611473565b3480156105e357600080fd5b506102e36105f2366004612a09565b6118e0565b34801561060357600080fd5b50610294611b5c565b34801561061857600080fd5b5061062c610627366004612a27565b611b68565b6040516102769190613f6a565b34801561064557600080fd5b506102e3611bd5565b34801561065a57600080fd5b506103d0611cb3565b34801561066f57600080fd5b50610294611cc2565b6102e3610686366004612a09565b611cc8565b600a60208190526000918252604090912080546001820154600283015460078401546008850154600986015496860154600b870154600c9097015495976001600160a01b0390951696939592949193919290919060ff808216916101009004168a565b60045481565b60405180604001604052806017815260200176436f6d706f756e6420476f7665726e6f7220427261766f60481b81525081565b6000546001600160a01b0316331461075a5760405162461bcd60e51b815260040161075190613d7a565b60405180910390fd5b611680811015801561076f575062013b008111155b61078b5760405162461bcd60e51b815260040161075190613dba565b60048054908290556040517f7e3f7f0708a84de9203036abaa450dccc85ad5ff52f78c170f3edb55cf5e8828906107c590839085906140a6565b60405180910390a15050565b6009546001600160a01b031681565b600b6020526000908152604090205481565b6000546001600160a01b0316331461081c5760405162461bcd60e51b815260040161075190613f2a565b60018110158015610837575069152d02c7e14af68000008111155b6108535760405162461bcd60e51b815260040161075190613e5a565b60058054908290556040517fccb45da8d5717e6c4544694297c4ba5cf151d455c9bb0ed4fc7a38411bc05461906107c590839085906140a6565b6000546001600160a01b031633146108b75760405162461bcd60e51b815260040161075190613d9a565b600181101580156108ca5750619d808111155b6108e65760405162461bcd60e51b815260040161075190613dea565b60038054908290556040517fc565b045403dc03c2eea82b81a0465edad9e2e7fc4d97e11421c209da93d7a93906107c590839085906140a6565b60405161092c90613b28565b604051809103902081565b61168081565b600181565b69152d02c7e14af680000081565b6001546001600160a01b031681565b6060806060806000600a6000878152602001908152602001600020905080600301816004018260050183600601838054806020026020016040519081016040528092919081815260200182805480156109e157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109c3575b5050505050935082805480602002602001604051908101604052809291908181526020018280548015610a3357602002820191906000526020600020905b815481526020019060010190808311610a1f575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b82821015610b065760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610af25780601f10610ac757610100808354040283529160200191610af2565b820191906000526020600020905b815481529060010190602001808311610ad557829003601f168201915b505050505081526020019060010190610a5b565b50505050915080805480602002602001604051908101604052809291908181526020016000905b82821015610bd85760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610bc45780601f10610b9957610100808354040283529160200191610bc4565b820191906000526020600020905b815481529060010190602001808311610ba757829003601f168201915b505050505081526020019060010190610b2d565b5050505090509450945094509450509193509193565b60035481565b6000604051610c0290613b28565b604080519182900382208282019091526017825276436f6d706f756e6420476f7665726e6f7220427261766f60481b6020909201919091527f3d9e905142ff365fb68ce863f26a44f5583cf7ec11bcde450555f50b7e1b5614610c63611e81565b30604051602001610c779493929190613c7b565b6040516020818303038152906040528051906020012090506000604051610c9d90613aec565b604051908190038120610cb69189908990602001613cb0565b60405160208183030381529060405280519060200120905060008282604051602001610ce3929190613af7565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610d209493929190613cd8565b6020604051602081039080840390855afa158015610d42573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d755760405162461bcd60e51b815260040161075190613e1a565b806001600160a01b03167fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda48a8a610dad858e8e611e86565b604051610dbc939291906140fa565b60405180910390a2505050505050505050565b60008160075410158015610de4575060065482115b610e005760405162461bcd60e51b815260040161075190613f3a565b6000828152600a60205260409020600c81015460ff1615610e25576002915050610f47565b80600701544311610e3a576000915050610f47565b80600801544311610e4f576001915050610f47565b80600a01548160090154111580610e6a575060018160090154105b15610e79576003915050610f47565b6002810154610e8c576004915050610f47565b600c810154610100900460ff1615610ea8576007915050610f47565b6002810154600854604080516360d143f160e11b81529051610f3193926001600160a01b03169163c1a287e2916004808301926020929190829003018186803b158015610ef457600080fd5b505afa158015610f08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f2c91908101906129b6565b612077565b4210610f41576006915050610f47565b60059150505b919050565b6007610f5782610dcf565b6007811115610f6257fe5b1415610f805760405162461bcd60e51b815260040161075190613f1a565b6000818152600a6020526040902060018101546001600160a01b031633148061104857506005546009546001838101546001600160a01b039283169263782d6fe192911690610fd090439061209c565b6040518363ffffffff1660e01b8152600401610fed929190613b77565b60206040518083038186803b15801561100557600080fd5b505afa158015611019573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061103d9190810190612b3f565b6001600160601b0316105b6110645760405162461bcd60e51b815260040161075190613eca565b600c8101805460ff1916600117905560005b6003820154811015611170576008546003830180546001600160a01b039092169163591fcdfe9190849081106110a857fe5b6000918252602090912001546004850180546001600160a01b0390921691859081106110d057fe5b90600052602060002001548560050185815481106110ea57fe5b9060005260206000200186600601868154811061110357fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401611132959493929190613bdf565b600060405180830381600087803b15801561114c57600080fd5b505af1158015611160573d6000803e3d6000fd5b5050600190920191506110769050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c826040516107c59190613c6d565b337fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda483836111cf848383611e86565b6040516111de939291906140fa565b60405180910390a25050565b6002546001600160a01b031681565b60016006819055600755565b337fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda48585611234848383611e86565b86866040516112479594939291906140b4565b60405180910390a250505050565b600a81565b62013b0081565b619d8081565b60055481565b6000546001600160a01b031633146112975760405162461bcd60e51b815260040161075190613d5a565b600180546001600160a01b038381166001600160a01b03198316179092556040519116907fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9906107c59083908590613b5c565b6008546001600160a01b0316156113135760405162461bcd60e51b815260040161075190613d4a565b6000546001600160a01b0316331461133d5760405162461bcd60e51b815260040161075190613e4a565b6001600160a01b0385166113635760405162461bcd60e51b815260040161075190613d8a565b6001600160a01b0384166113895760405162461bcd60e51b815260040161075190613eba565b611680831015801561139e575062013b008311155b6113ba5760405162461bcd60e51b815260040161075190613f4a565b600182101580156113cd5750619d808211155b6113e95760405162461bcd60e51b815260040161075190613e2a565b60018110158015611404575069152d02c7e14af68000008111155b6114205760405162461bcd60e51b815260040161075190613dfa565b600880546001600160a01b039687166001600160a01b0319918216179091556009805495909616941693909317909355600455600391909155600555565b6008546001600160a01b031681565b60075481565b6009546000906001600160a01b031661149e5760405162461bcd60e51b815260040161075190613e6a565b6006546114bd5760405162461bcd60e51b815260040161075190613daa565b6005546009546001600160a01b031663782d6fe1336114dd43600161209c565b6040518363ffffffff1660e01b81526004016114fa929190613b41565b60206040518083038186803b15801561151257600080fd5b505afa158015611526573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061154a9190810190612b3f565b6001600160601b0316116115705760405162461bcd60e51b815260040161075190613f0a565b84518651148015611582575083518651145b801561158f575082518651145b6115ab5760405162461bcd60e51b815260040161075190613e3a565b85516115c95760405162461bcd60e51b815260040161075190613e9a565b600a865111156115eb5760405162461bcd60e51b815260040161075190613eda565b336000908152600b6020526040902054801561166857600061160c82610dcf565b9050600181600781111561161c57fe5b141561163a5760405162461bcd60e51b815260040161075190613efa565b600081600781111561164857fe5b14156116665760405162461bcd60e51b815260040161075190613eea565b505b600061167643600354612077565b9050600061168682600454612077565b6007805460010190559050611699612223565b604051806101c001604052806007548152602001336001600160a01b03168152602001600081526020018b81526020018a815260200189815260200188815260200184815260200183815260200160008152602001600081526020016000815260200160001515815260200160001515815250905080600a6000836000015181526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020155606082015181600301908051906020019061178392919061229f565b506080820151805161179f916004840191602090910190612304565b5060a082015180516117bb91600584019160209091019061234b565b5060c082015180516117d79160068401916020909101906123a4565b5060e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b015561018082015181600c0160006101000a81548160ff0219169083151502179055506101a082015181600c0160016101000a81548160ff0219169083151502179055509050508060000151600b600083602001516001600160a01b03166001600160a01b03168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000151338c8c8c8c89898e6040516118c899989796959493929190613f78565b60405180910390a15193505050505b95945050505050565b60046118eb82610dcf565b60078111156118f657fe5b146119135760405162461bcd60e51b815260040161075190613e7a565b6000818152600a602090815260408083206008548251630d48571f60e31b8152925191949361196d9342936001600160a01b0390931692636a42b8f892600480840193919291829003018186803b158015610ef457600080fd5b905060005b6003830154811015611b1557611b0d83600301828154811061199057fe5b6000918252602090912001546004850180546001600160a01b0390921691849081106119b857fe5b90600052602060002001548560050184815481106119d257fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015611a605780601f10611a3557610100808354040283529160200191611a60565b820191906000526020600020905b815481529060010190602001808311611a4357829003601f168201915b5050505050866006018581548110611a7457fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015611b025780601f10611ad757610100808354040283529160200191611b02565b820191906000526020600020905b815481529060010190602001808311611ae557829003601f168201915b5050505050866120c4565b600101611972565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290611b4f90859084906140a6565b60405180910390a1505050565b60405161092c90613aec565b611b706123fd565b506000828152600a602090815260408083206001600160a01b0385168452600d018252918290208251606081018452905460ff8082161515835261010082041692820192909252620100009091046001600160601b0316918101919091525b92915050565b6001546001600160a01b031633148015611bee57503315155b611c0a5760405162461bcd60e51b815260040161075190613eaa565b60008054600180546001600160a01b038082166001600160a01b03198086168217968790559092169092556040519282169390927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92611c6e928692911690613b5c565b60405180910390a16001546040517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9916107c59184916001600160a01b031690613b5c565b6000546001600160a01b031681565b60065481565b6005611cd382610dcf565b6007811115611cde57fe5b14611cfb5760405162461bcd60e51b815260040161075190613e0a565b6000818152600a60205260408120600c8101805461ff001916610100179055905b6003820154811015611e51576008546004830180546001600160a01b0390921691630825f38f919084908110611d4e57fe5b9060005260206000200154846003018481548110611d6857fe5b6000918252602090912001546004860180546001600160a01b039092169186908110611d9057fe5b9060005260206000200154866005018681548110611daa57fe5b90600052602060002001876006018781548110611dc357fe5b9060005260206000200188600201546040518763ffffffff1660e01b8152600401611df2959493929190613bdf565b6000604051808303818588803b158015611e0b57600080fd5b505af1158015611e1f573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052611e4891908101906129d4565b50600101611d1c565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f826040516107c59190613c6d565b465b90565b60006001611e9384610dcf565b6007811115611e9e57fe5b14611ebb5760405162461bcd60e51b815260040161075190613dca565b60028260ff161115611edf5760405162461bcd60e51b815260040161075190613d3a565b6000838152600a602090815260408083206001600160a01b0388168452600d8101909252909120805460ff1615611f285760405162461bcd60e51b815260040161075190613dda565b600954600783015460405163782d6fe160e01b81526000926001600160a01b03169163782d6fe191611f5e918b91600401613b77565b60206040518083038186803b158015611f7657600080fd5b505afa158015611f8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611fae9190810190612b3f565b905060ff8516611fd957611fcf83600a0154826001600160601b0316612077565b600a84015561202f565b8460ff166001141561200657611ffc8360090154826001600160601b0316612077565b600984015561202f565b8460ff166002141561202f5761202983600b0154826001600160601b0316612077565b600b8401555b8154600160ff199091161761ff00191661010060ff871602176dffffffffffffffffffffffff00001916620100006001600160601b03831602179091559150505b9392505050565b6000828201838110156120705760405162461bcd60e51b815260040161075190613e8a565b6000828211156120be5760405162461bcd60e51b815260040161075190613f5a565b50900390565b6008546040516001600160a01b039091169063f2b06537906120f29088908890889088908890602001613b85565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016121249190613c6d565b60206040518083038186803b15801561213c57600080fd5b505afa158015612150573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506121749190810190612998565b156121915760405162461bcd60e51b815260040161075190613d6a565b600854604051633a66f90160e01b81526001600160a01b0390911690633a66f901906121c99088908890889088908890600401613b85565b602060405180830381600087803b1580156121e357600080fd5b505af11580156121f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061221b91908101906129b6565b505050505050565b604051806101c001604052806000815260200160006001600160a01b03168152602001600081526020016060815260200160608152602001606081526020016060815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b8280548282559060005260206000209081019282156122f4579160200282015b828111156122f457825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906122bf565b5061230092915061241d565b5090565b82805482825590600052602060002090810192821561233f579160200282015b8281111561233f578251825591602001919060010190612324565b50612300929150612441565b828054828255906000526020600020908101928215612398579160200282015b82811115612398578251805161238891849160209091019061245b565b509160200191906001019061236b565b506123009291506124c8565b8280548282559060005260206000209081019282156123f1579160200282015b828111156123f157825180516123e191849160209091019061245b565b50916020019190600101906123c4565b506123009291506124eb565b604080516060810182526000808252602082018190529181019190915290565b611e8391905b808211156123005780546001600160a01b0319168155600101612423565b611e8391905b808211156123005760008155600101612447565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061249c57805160ff191683800117855561233f565b8280016001018555821561233f579182018281111561233f578251825591602001919060010190612324565b611e8391905b808211156123005760006124e2828261250e565b506001016124ce565b611e8391905b80821115612300576000612505828261250e565b506001016124f1565b50805460018160011615610100020316600290046000825580601f106125345750612552565b601f0160209004906000526020600020908101906125529190612441565b50565b8035611bcf8161426e565b600082601f83011261257157600080fd5b813561258461257f8261415a565b614133565b915081818352602084019350602081019050838560208402820111156125a957600080fd5b60005b838110156125d557816125bf8882612555565b84525060209283019291909101906001016125ac565b5050505092915050565b600082601f8301126125f057600080fd5b81356125fe61257f8261415a565b81815260209384019390925082018360005b838110156125d55781358601612626888261272a565b8452506020928301929190910190600101612610565b600082601f83011261264d57600080fd5b813561265b61257f8261415a565b81815260209384019390925082018360005b838110156125d55781358601612683888261272a565b845250602092830192919091019060010161266d565b600082601f8301126126aa57600080fd5b81356126b861257f8261415a565b915081818352602084019350602081019050838560208402820111156126dd57600080fd5b60005b838110156125d557816126f38882612714565b84525060209283019291909101906001016126e0565b8051611bcf81614282565b8035611bcf8161428b565b8051611bcf8161428b565b600082601f83011261273b57600080fd5b813561274961257f8261417b565b9150808252602083016020830185838301111561276557600080fd5b612770838284614222565b50505092915050565b600082601f83011261278a57600080fd5b815161279861257f8261417b565b915080825260208301602083018583830111156127b457600080fd5b61277083828461422e565b60008083601f8401126127d157600080fd5b50813567ffffffffffffffff8111156127e957600080fd5b60208301915083600182028301111561280157600080fd5b9250929050565b8035611bcf81614294565b8051611bcf8161429d565b60006020828403121561283057600080fd5b600061283c8484612555565b949350505050565b600080600080600060a0868803121561285c57600080fd5b60006128688888612555565b955050602061287988828901612555565b945050604061288a88828901612714565b935050606061289b88828901612714565b92505060806128ac88828901612714565b9150509295509295909350565b600080600080600060a086880312156128d157600080fd5b853567ffffffffffffffff8111156128e857600080fd5b6128f488828901612560565b955050602086013567ffffffffffffffff81111561291157600080fd5b61291d88828901612699565b945050604086013567ffffffffffffffff81111561293a57600080fd5b6129468882890161263c565b935050606086013567ffffffffffffffff81111561296357600080fd5b61296f888289016125df565b925050608086013567ffffffffffffffff81111561298c57600080fd5b6128ac8882890161272a565b6000602082840312156129aa57600080fd5b600061283c8484612709565b6000602082840312156129c857600080fd5b600061283c848461271f565b6000602082840312156129e657600080fd5b815167ffffffffffffffff8111156129fd57600080fd5b61283c84828501612779565b600060208284031215612a1b57600080fd5b600061283c8484612714565b60008060408385031215612a3a57600080fd5b6000612a468585612714565b9250506020612a5785828601612555565b9150509250929050565b60008060408385031215612a7457600080fd5b6000612a808585612714565b9250506020612a5785828601612808565b60008060008060608587031215612aa757600080fd5b6000612ab38787612714565b9450506020612ac487828801612808565b935050604085013567ffffffffffffffff811115612ae157600080fd5b612aed878288016127bf565b95989497509550505050565b600080600080600060a08688031215612b1157600080fd5b6000612b1d8888612714565b9550506020612b2e88828901612808565b945050604061288a88828901612808565b600060208284031215612b5157600080fd5b600061283c8484612813565b6000612b698383612b98565b505060200190565b60006120708383612d3a565b6000612b698383612d20565b612b92816141fa565b82525050565b612b92816141c2565b6000612bac826141b5565b612bb681856141b9565b9350612bc1836141a3565b8060005b83811015612bef578151612bd98882612b5d565b9750612be4836141a3565b925050600101612bc5565b509495945050505050565b6000612c05826141b5565b612c0f81856141b9565b935083602082028501612c21856141a3565b8060005b85811015612c5b5784840389528151612c3e8582612b71565b9450612c49836141a3565b60209a909a0199925050600101612c25565b5091979650505050505050565b6000612c73826141b5565b612c7d81856141b9565b935083602082028501612c8f856141a3565b8060005b85811015612c5b5784840389528151612cac8582612b71565b9450612cb7836141a3565b60209a909a0199925050600101612c93565b6000612cd4826141b5565b612cde81856141b9565b9350612ce9836141a3565b8060005b83811015612bef578151612d018882612b7d565b9750612d0c836141a3565b925050600101612ced565b612b92816141cd565b612b9281611e83565b612b92612d3582611e83565b611e83565b6000612d45826141b5565b612d4f81856141b9565b9350612d5f81856020860161422e565b612d688161425a565b9093019392505050565b600081546001811660008114612d8f5760018114612db557612df4565b607f6002830416612da081876141b9565b60ff1984168152955050602085019250612df4565b60028204612dc381876141b9565b9550612dce856141a9565b60005b82811015612ded57815488820152600190910190602001612dd1565b8701945050505b505092915050565b612b9281614201565b612b928161420c565b6000612e1a83856141b9565b9350612e27838584614222565b612d688361425a565b6000612e3d6032836141b9565b7f476f7665726e6f72427261766f3a3a63617374566f7465496e7465726e616c3a81527120696e76616c696420766f7465207479706560701b602082015260400192915050565b6000612e91602883610f47565b7f42616c6c6f742875696e743235362070726f706f73616c49642c75696e743820815267737570706f72742960c01b602082015260280192915050565b6000612edb6033836141b9565b7f476f7665726e6f72427261766f3a3a696e697469616c697a653a2063616e206f8152726e6c7920696e697469616c697a65206f6e636560681b602082015260400192915050565b6000612f30602a836141b9565b7f476f7665726e6f72427261766f3a5f73657450656e64696e6741646d696e3a2081526961646d696e206f6e6c7960b01b602082015260400192915050565b6000612f7c6055836141b9565b7f476f7665726e6f72427261766f3a3a71756575654f72526576657274496e746581527f726e616c3a206964656e746963616c2070726f706f73616c20616374696f6e20602082015274616c7265616479207175657565642061742065746160581b604082015260600192915050565b6000612ff9602b836141b9565b7f476f7665726e6f72427261766f3a3a5f736574566f74696e67506572696f643a81526a2061646d696e206f6e6c7960a81b602082015260400192915050565b60006130466033836141b9565b6000805160206142a783398151915281527269642074696d656c6f636b206164647265737360681b602082015260400192915050565b6000613089602a836141b9565b7f476f7665726e6f72427261766f3a3a5f736574566f74696e6744656c61793a2081526961646d696e206f6e6c7960b01b602082015260400192915050565b60006130d56031836141b9565b7f476f7665726e6f72427261766f3a3a70726f706f73653a20476f7665726e6f7281527020427261766f206e6f742061637469766560781b602082015260400192915050565b6000613128600283610f47565b61190160f01b815260020192915050565b60006131466036836141b9565b7f476f7665726e6f72427261766f3a3a5f736574566f74696e67506572696f643a815275081a5b9d985b1a59081d9bdd1a5b99c81c195c9a5bd960521b602082015260400192915050565b600061319e6031836141b9565b7f476f7665726e6f72427261766f3a3a63617374566f7465496e7465726e616c3a815270081d9bdd1a5b99c81a5cc818db1bdcd959607a1b602082015260400192915050565b60006131f16034836141b9565b7f476f7665726e6f72427261766f3a3a63617374566f7465496e7465726e616c3a815273081d9bdd195c88185b1c9958591e481d9bdd195960621b602082015260400192915050565b60006132476034836141b9565b7f476f7665726e6f72427261766f3a3a5f736574566f74696e6744656c61793a20815273696e76616c696420766f74696e672064656c617960601b602082015260400192915050565b600061329d6035836141b9565b6000805160206142a78339815191528152741a59081c1c9bdc1bdcd85b081d1a1c995cda1bdb19605a1b602082015260400192915050565b60006132e26045836141b9565b7f476f7665726e6f72427261766f3a3a657865637574653a2070726f706f73616c81527f2063616e206f6e6c7920626520657865637574656420696620697420697320716020820152641d595d595960da1b604082015260600192915050565b600061334f602f836141b9565b7f476f7665726e6f72427261766f3a3a63617374566f746542795369673a20696e81526e76616c6964207369676e617475726560881b602082015260400192915050565b60006133a0602f836141b9565b6000805160206142a783398151915281526e696420766f74696e672064656c617960881b602082015260400192915050565b60006133df6044836141b9565b7f476f7665726e6f72427261766f3a3a70726f706f73653a2070726f706f73616c81527f2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d6020820152630c2e8c6d60e31b604082015260600192915050565b600061344b6025836141b9565b7f476f7665726e6f72427261766f3a3a696e697469616c697a653a2061646d696e815264206f6e6c7960d81b602082015260400192915050565b60006134926040836141b9565b7f476f7665726e6f72427261766f3a3a5f73657450726f706f73616c546872657381527f686f6c643a20696e76616c69642070726f706f73616c207468726573686f6c64602082015260400192915050565b60006134f16036836141b9565b7f476f7665726e6f72427261766f3a3a70726f706f73653a20476f7665726e6f7281527508109c985d9bc81b9bdd081a5b9a5d1a585b1a5e995960521b602082015260400192915050565b60006135496044836141b9565b7f476f7665726e6f72427261766f3a3a71756575653a2070726f706f73616c206381527f616e206f6e6c79206265207175657565642069662069742069732073756363656020820152631959195960e21b604082015260600192915050565b60006135b56011836141b9565b706164646974696f6e206f766572666c6f7760781b815260200192915050565b60006135e2604383610f47565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201526263742960e81b604082015260430192915050565b600061364d602c836141b9565b7f476f7665726e6f72427261766f3a3a70726f706f73653a206d7573742070726f81526b7669646520616374696f6e7360a01b602082015260400192915050565b600061369b602e836141b9565b7f476f7665726e6f72427261766f3a5f61636365707441646d696e3a2070656e6481526d696e672061646d696e206f6e6c7960901b602082015260400192915050565b60006136eb602f836141b9565b6000805160206142a783398151915281526e696420636f6d70206164647265737360881b602082015260400192915050565b600061372a602f836141b9565b7f476f7665726e6f72427261766f3a3a63616e63656c3a2070726f706f7365722081526e18589bdd99481d1a1c995cda1bdb19608a1b602082015260400192915050565b600061377b6028836141b9565b7f476f7665726e6f72427261766f3a3a70726f706f73653a20746f6f206d616e7981526720616374696f6e7360c01b602082015260400192915050565b60006137c56059836141b9565b7f476f7665726e6f72427261766f3a3a70726f706f73653a206f6e65206c69766581527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208201527f20616c72656164792070656e64696e672070726f706f73616c00000000000000604082015260600192915050565b600061384a6058836141b9565b7f476f7665726e6f72427261766f3a3a70726f706f73653a206f6e65206c69766581527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208201527f20616c7265616479206163746976652070726f706f73616c0000000000000000604082015260600192915050565b6000611bcf6000836141b9565b60006138dc603f836141b9565b7f476f7665726e6f72427261766f3a3a70726f706f73653a2070726f706f73657281527f20766f7465732062656c6f772070726f706f73616c207468726573686f6c6400602082015260400192915050565b600061393b6036836141b9565b7f476f7665726e6f72427261766f3a3a63616e63656c3a2063616e6e6f742063618152751b98d95b08195e1958dd5d1959081c1c9bdc1bdcd85b60521b602082015260400192915050565b60006139936030836141b9565b7f476f7665726e6f72427261766f3a3a5f73657450726f706f73616c546872657381526f686f6c643a2061646d696e206f6e6c7960801b602082015260400192915050565b60006139e56029836141b9565b7f476f7665726e6f72427261766f3a3a73746174653a20696e76616c69642070728152681bdc1bdcd85b081a5960ba1b602082015260400192915050565b6000613a306030836141b9565b6000805160206142a783398151915281526f1a59081d9bdd1a5b99c81c195c9a5bd960821b602082015260400192915050565b6000613a706015836141b9565b747375627472616374696f6e20756e646572666c6f7760581b815260200192915050565b80516060830190613aa58482612d17565b506020820151613ab86020850182613ad1565b506040820151613acb6040850182613ae3565b50505050565b612b92816141e8565b612b9281614217565b612b92816141ee565b6000611bcf82612e84565b6000613b028261311b565b9150613b0e8285612d29565b602082019150613b1e8284612d29565b5060200192915050565b6000611bcf826135d5565b60208101611bcf8284612b98565b60408101613b4f8285612b89565b6120706020830184612d20565b60408101613b6a8285612b98565b6120706020830184612b98565b60408101613b4f8285612b98565b60a08101613b938288612b98565b613ba06020830187612d20565b8181036040830152613bb28186612d3a565b90508181036060830152613bc68185612d3a565b9050613bd56080830184612d20565b9695505050505050565b60a08101613bed8288612b98565b613bfa6020830187612d20565b8181036040830152613c0c8186612d72565b90508181036060830152613bc68185612d72565b60808082528101613c318187612ba1565b90508181036020830152613c458186612cc9565b90508181036040830152613c598185612c68565b90508181036060830152613bd58184612bfa565b60208101611bcf8284612d20565b60808101613c898287612d20565b613c966020830186612d20565b613ca36040830185612d20565b6118d76060830184612b98565b60608101613cbe8286612d20565b613ccb6020830185612d20565b61283c6040830184613ad1565b60808101613ce68287612d20565b613cf36020830186613ad1565b613d006040830185612d20565b6118d76060830184612d20565b60208101611bcf8284612dfc565b60208101611bcf8284612e05565b602080825281016120708184612d3a565b60208082528101611bcf81612e30565b60208082528101611bcf81612ece565b60208082528101611bcf81612f23565b60208082528101611bcf81612f6f565b60208082528101611bcf81612fec565b60208082528101611bcf81613039565b60208082528101611bcf8161307c565b60208082528101611bcf816130c8565b60208082528101611bcf81613139565b60208082528101611bcf81613191565b60208082528101611bcf816131e4565b60208082528101611bcf8161323a565b60208082528101611bcf81613290565b60208082528101611bcf816132d5565b60208082528101611bcf81613342565b60208082528101611bcf81613393565b60208082528101611bcf816133d2565b60208082528101611bcf8161343e565b60208082528101611bcf81613485565b60208082528101611bcf816134e4565b60208082528101611bcf8161353c565b60208082528101611bcf816135a8565b60208082528101611bcf81613640565b60208082528101611bcf8161368e565b60208082528101611bcf816136de565b60208082528101611bcf8161371d565b60208082528101611bcf8161376e565b60208082528101611bcf816137b8565b60208082528101611bcf8161383d565b60208082528101611bcf816138cf565b60208082528101611bcf8161392e565b60208082528101611bcf81613986565b60208082528101611bcf816139d8565b60208082528101611bcf81613a23565b60208082528101611bcf81613a63565b60608101611bcf8284613a94565b6101208101613f87828c612d20565b613f94602083018b612b89565b8181036040830152613fa6818a612ba1565b90508181036060830152613fba8189612cc9565b90508181036080830152613fce8188612c68565b905081810360a0830152613fe28187612bfa565b9050613ff160c0830186612d20565b613ffe60e0830185612d20565b8181036101008301526140118184612d3a565b9b9a5050505050505050505050565b610140810161402f828d612d20565b61403c602083018c612b98565b614049604083018b612d20565b614056606083018a612d20565b6140636080830189612d20565b61407060a0830188612d20565b61407d60c0830187612d20565b61408a60e0830186612d20565b614098610100830185612d17565b614011610120830184612d17565b60408101613b4f8285612d20565b608081016140c28288612d20565b6140cf6020830187613ad1565b6140dc6040830186613ada565b81810360608301526140ef818486612e0e565b979650505050505050565b608081016141088286612d20565b6141156020830185613ad1565b6141226040830184613ada565b81810360608301526118d7816138c2565b60405181810167ffffffffffffffff8111828210171561415257600080fd5b604052919050565b600067ffffffffffffffff82111561417157600080fd5b5060209081020190565b600067ffffffffffffffff82111561419257600080fd5b506020601f91909101601f19160190565b60200190565b60009081526020902090565b5190565b90815260200190565b6000611bcf826141dc565b151590565b80610f4781614264565b6001600160a01b031690565b60ff1690565b6001600160601b031690565b6000611bcf825b6000611bcf826141c2565b6000611bcf826141d2565b6000611bcf826141ee565b82818337506000910152565b60005b83811015614249578181015183820152602001614231565b83811115613acb5750506000910152565b601f01601f191690565b6008811061255257fe5b614277816141c2565b811461255257600080fd5b614277816141cd565b61427781611e83565b614277816141e8565b614277816141ee56fe476f7665726e6f72427261766f3a3a696e697469616c697a653a20696e76616ca365627a7a72315820b8375e9b74442f149d2b8326d4d724d5d279ab1e290969f13f66fcbe92c229e26c6578706572696d656e74616cf564736f6c63430005100040"; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegateStorageV1__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegateStorageV1__factory.ts new file mode 100644 index 00000000000..ed572167059 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegateStorageV1__factory.ts @@ -0,0 +1,286 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GovernorBravoDelegateStorageV1 } from "../GovernorBravoDelegateStorageV1"; + +export class GovernorBravoDelegateStorageV1__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + overrides || {} + ) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): GovernorBravoDelegateStorageV1 { + return super.attach(address) as GovernorBravoDelegateStorageV1; + } + connect(signer: Signer): GovernorBravoDelegateStorageV1__factory { + return super.connect(signer) as GovernorBravoDelegateStorageV1__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorBravoDelegateStorageV1 { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernorBravoDelegateStorageV1; + } +} + +const _abi = [ + { + constant: true, + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "comp", + outputs: [ + { + internalType: "contract CompInterface", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "implementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "initialProposalId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "latestProposalIds", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "pendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "proposals", + outputs: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "proposer", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + { + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "abstainVotes", + type: "uint256", + }, + { + internalType: "bool", + name: "canceled", + type: "bool", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "timelock", + outputs: [ + { + internalType: "contract TimelockInterface", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50610429806100206000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80635c60da1b116100715780635c60da1b14610145578063b58131b01461014d578063d33219b414610155578063da35c6641461015d578063f851a44014610165578063fc4eee421461016d576100b4565b8063013cf08b146100b957806302a251a3146100eb578063109d0af81461010057806317977c611461011557806326782247146101285780633932abb11461013d575b600080fd5b6100cc6100c7366004610295565b610175565b6040516100e29a99989796959493929190610307565b60405180910390f35b6100f36101d8565b6040516100e291906102f9565b6101086101de565b6040516100e291906102eb565b6100f361012336600461026f565b6101ed565b6101306101ff565b6040516100e291906102dd565b6100f361020e565b610130610214565b6100f3610223565b610108610229565b6100f3610238565b61013061023e565b6100f361024d565b600a60208190526000918252604090912080546001820154600283015460078401546008850154600986015496860154600b870154600c9097015495976001600160a01b0390951696939592949193919290919060ff808216916101009004168a565b60045481565b6009546001600160a01b031681565b600b6020526000908152604090205481565b6001546001600160a01b031681565b60035481565b6002546001600160a01b031681565b60055481565b6008546001600160a01b031681565b60075481565b6000546001600160a01b031681565b60065481565b803561025e816103c6565b92915050565b803561025e816103dd565b60006020828403121561028157600080fd5b600061028d8484610253565b949350505050565b6000602082840312156102a757600080fd5b600061028d8484610264565b6102bc8161039c565b82525050565b6102bc816103a7565b6102bc816103bb565b6102bc816103b8565b6020810161025e82846102b3565b6020810161025e82846102cb565b6020810161025e82846102d4565b6101408101610316828d6102d4565b610323602083018c6102b3565b610330604083018b6102d4565b61033d606083018a6102d4565b61034a60808301896102d4565b61035760a08301886102d4565b61036460c08301876102d4565b61037160e08301866102d4565b61037f6101008301856102c2565b61038d6101208301846102c2565b9b9a5050505050505050505050565b600061025e826103ac565b151590565b6001600160a01b031690565b90565b600061025e8261039c565b6103cf8161039c565b81146103da57600080fd5b50565b6103cf816103b856fea365627a7a72315820658777be3589a8e26e4a0ddb3fca773cc8592e64839c71d61bc77377b09257976c6578706572696d656e74616cf564736f6c63430005100040"; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegate__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegate__factory.ts new file mode 100644 index 00000000000..24eb7725778 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegate__factory.ts @@ -0,0 +1,1076 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GovernorBravoDelegate } from "../GovernorBravoDelegate"; + +export class GovernorBravoDelegate__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): GovernorBravoDelegate { + return super.attach(address) as GovernorBravoDelegate; + } + connect(signer: Signer): GovernorBravoDelegate__factory { + return super.connect(signer) as GovernorBravoDelegate__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorBravoDelegate { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernorBravoDelegate; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldImplementation", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "NewImplementation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldPendingAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldProposalThreshold", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newProposalThreshold", + type: "uint256", + }, + ], + name: "ProposalThresholdSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "votes", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldVotingDelay", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotingDelay", + type: "uint256", + }, + ], + name: "VotingDelaySet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldVotingPeriod", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotingPeriod", + type: "uint256", + }, + ], + name: "VotingPeriodSet", + type: "event", + }, + { + constant: true, + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "DOMAIN_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MAX_PROPOSAL_THRESHOLD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MAX_VOTING_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MAX_VOTING_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MIN_PROPOSAL_THRESHOLD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MIN_VOTING_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MIN_VOTING_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "_acceptAdmin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "_setPendingAdmin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "newProposalThreshold", + type: "uint256", + }, + ], + name: "_setProposalThreshold", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "newVotingDelay", + type: "uint256", + }, + ], + name: "_setVotingDelay", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "newVotingPeriod", + type: "uint256", + }, + ], + name: "_setVotingPeriod", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "cancel", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "comp", + outputs: [ + { + internalType: "contract CompInterface", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "execute", + outputs: [], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getActions", + outputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "getReceipt", + outputs: [ + { + components: [ + { + internalType: "bool", + name: "hasVoted", + type: "bool", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint96", + name: "votes", + type: "uint96", + }, + ], + internalType: "struct GovernorBravoDelegateStorageV1.Receipt", + name: "", + type: "tuple", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "implementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "initialProposalId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "timelock_", + type: "address", + }, + { + internalType: "address", + name: "comp_", + type: "address", + }, + { + internalType: "uint256", + name: "votingPeriod_", + type: "uint256", + }, + { + internalType: "uint256", + name: "votingDelay_", + type: "uint256", + }, + { + internalType: "uint256", + name: "proposalThreshold_", + type: "uint256", + }, + ], + name: "initialize", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "latestProposalIds", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "pendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalMaxOperations", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "proposals", + outputs: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "proposer", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + { + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "abstainVotes", + type: "uint256", + }, + { + internalType: "bool", + name: "canceled", + type: "bool", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "queue", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "quorumVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum GovernorBravoDelegateStorageV1.ProposalState", + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "timelock", + outputs: [ + { + internalType: "contract TimelockInterface", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b506142b1806100206000396000f3fe6080604052600436106102305760003560e01c80635c60da1b1161012e578063da35c664116100ab578063e48083fe1161006f578063e48083fe1461062e578063e9c714f214610643578063f851a44014610658578063fc4eee421461066d578063fe0d94c11461068257610230565b8063da35c66414610597578063da95691a146105ac578063ddf0b009146105cc578063deaaa7cc146105ec578063e23a9a521461060157610230565b8063b1126263116100f2578063b112626314610518578063b58131b01461052d578063b71d1a0c14610542578063d13f90b414610562578063d33219b41461058257610230565b80635c60da1b146104a4578063791f5d23146104b95780637b3c71d3146104ce5780637bdbe4d0146104ee578063a64e024a1461050357610230565b8063215809ca116101bc5780633932abb1116101805780633932abb1146104025780633bccf4fd146104175780633e4f49e61461043757806340e58ee514610464578063567813881461048457610230565b8063215809ca1461037157806324bc1a641461038657806325fd935a1461039b57806326782247146103b0578063328dd982146103d257610230565b8063109d0af811610203578063109d0af8146102da57806317977c61146102fc57806317ba1b8b1461031c5780631dfb1b5a1461033c57806320606b701461035c57610230565b8063013cf08b1461023557806302a251a31461027457806306fdde03146102965780630ea2d98c146102b8575b600080fd5b34801561024157600080fd5b50610255610250366004612a19565b610695565b60405161026b9a99989796959493929190613fc8565b60405180910390f35b34801561028057600080fd5b506102896106f8565b60405161026b9190613c25565b3480156102a257600080fd5b506102ab6106fe565b60405161026b9190613ce1565b3480156102c457600080fd5b506102d86102d3366004612a19565b610731565b005b3480156102e657600080fd5b506102ef6107db565b60405161026b9190613cc5565b34801561030857600080fd5b5061028961031736600461282e565b6107ea565b34801561032857600080fd5b506102d8610337366004612a19565b6107fc565b34801561034857600080fd5b506102d8610357366004612a19565b6108a0565b34801561036857600080fd5b50610289610933565b34801561037d57600080fd5b5061028961094a565b34801561039257600080fd5b50610289610950565b3480156103a757600080fd5b5061028961095e565b3480156103bc57600080fd5b506103c561096c565b60405161026b9190613aeb565b3480156103de57600080fd5b506103f26103ed366004612a19565b61097b565b60405161026b9493929190613bd8565b34801561040e57600080fd5b50610289610c0a565b34801561042357600080fd5b506102d8610432366004612b09565b610c10565b34801561044357600080fd5b50610457610452366004612a19565b610deb565b60405161026b9190613cd3565b34801561047057600080fd5b506102d861047f366004612a19565b610f71565b34801561049057600080fd5b506102d861049f366004612a71565b6111c5565b3480156104b057600080fd5b506103c561120f565b3480156104c557600080fd5b5061028961121e565b3480156104da57600080fd5b506102d86104e9366004612aa1565b61122c565b3480156104fa57600080fd5b5061028961127c565b34801561050f57600080fd5b50610289611281565b34801561052457600080fd5b50610289611288565b34801561053957600080fd5b5061028961128e565b34801561054e57600080fd5b506102d861055d36600461282e565b611294565b34801561056e57600080fd5b506102d861057d366004612854565b611311565b34801561058e57600080fd5b506102ef61148e565b3480156105a357600080fd5b5061028961149d565b3480156105b857600080fd5b506102896105c73660046128c9565b6114a3565b3480156105d857600080fd5b506102d86105e7366004612a19565b6118eb565b3480156105f857600080fd5b50610289611b67565b34801561060d57600080fd5b5061062161061c366004612a37565b611b73565b60405161026b9190613f12565b34801561063a57600080fd5b50610289611be0565b34801561064f57600080fd5b506102d8611be5565b34801561066457600080fd5b506103c5611cc3565b34801561067957600080fd5b50610289611cd2565b6102d8610690366004612a19565b611cd8565b600a60208190526000918252604090912080546001820154600283015460078401546008850154600986015496860154600b870154600c9097015495976001600160a01b0390951696939592949193919290919060ff808216916101009004168a565b60045481565b60405180604001604052806017815260200176436f6d706f756e6420476f7665726e6f7220427261766f60481b81525081565b6000546001600160a01b031633146107645760405162461bcd60e51b815260040161075b90613d32565b60405180910390fd5b6116808110158015610779575062013b008111155b6107955760405162461bcd60e51b815260040161075b90613d72565b60048054908290556040517f7e3f7f0708a84de9203036abaa450dccc85ad5ff52f78c170f3edb55cf5e8828906107cf908390859061404e565b60405180910390a15050565b6009546001600160a01b031681565b600b6020526000908152604090205481565b6000546001600160a01b031633146108265760405162461bcd60e51b815260040161075b90613ed2565b690a968163f0a57b400000811015801561084a575069152d02c7e14af68000008111155b6108665760405162461bcd60e51b815260040161075b90613e12565b60058054908290556040517fccb45da8d5717e6c4544694297c4ba5cf151d455c9bb0ed4fc7a38411bc05461906107cf908390859061404e565b6000546001600160a01b031633146108ca5760405162461bcd60e51b815260040161075b90613d52565b600181101580156108dd5750619d808111155b6108f95760405162461bcd60e51b815260040161075b90613da2565b60038054908290556040517fc565b045403dc03c2eea82b81a0465edad9e2e7fc4d97e11421c209da93d7a93906107cf908390859061404e565b60405161093f90613ae0565b604051809103902081565b61168081565b6954b40b1f852bda00000081565b69152d02c7e14af680000081565b6001546001600160a01b031681565b6060806060806000600a6000878152602001908152602001600020905080600301816004018260050183600601838054806020026020016040519081016040528092919081815260200182805480156109fd57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109df575b5050505050935082805480602002602001604051908101604052809291908181526020018280548015610a4f57602002820191906000526020600020905b815481526020019060010190808311610a3b575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b82821015610b225760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610b0e5780601f10610ae357610100808354040283529160200191610b0e565b820191906000526020600020905b815481529060010190602001808311610af157829003601f168201915b505050505081526020019060010190610a77565b50505050915080805480602002602001604051908101604052809291908181526020016000905b82821015610bf45760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610be05780601f10610bb557610100808354040283529160200191610be0565b820191906000526020600020905b815481529060010190602001808311610bc357829003601f168201915b505050505081526020019060010190610b49565b5050505090509450945094509450509193509193565b60035481565b6000604051610c1e90613ae0565b604080519182900382208282019091526017825276436f6d706f756e6420476f7665726e6f7220427261766f60481b6020909201919091527f3d9e905142ff365fb68ce863f26a44f5583cf7ec11bcde450555f50b7e1b5614610c7f611e91565b30604051602001610c939493929190613c33565b6040516020818303038152906040528051906020012090506000604051610cb990613aa4565b604051908190038120610cd29189908990602001613c68565b60405160208183030381529060405280519060200120905060008282604051602001610cff929190613aaf565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610d3c9493929190613c90565b6020604051602081039080840390855afa158015610d5e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d915760405162461bcd60e51b815260040161075b90613dd2565b806001600160a01b03167fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda48a8a610dc9858e8e611e96565b604051610dd8939291906140a2565b60405180910390a2505050505050505050565b60008160075410158015610e00575060065482115b610e1c5760405162461bcd60e51b815260040161075b90613ee2565b6000828152600a60205260409020600c81015460ff1615610e41576002915050610f6c565b80600701544311610e56576000915050610f6c565b80600801544311610e6b576001915050610f6c565b80600a01548160090154111580610e8f57506954b40b1f852bda0000008160090154105b15610e9e576003915050610f6c565b6002810154610eb1576004915050610f6c565b600c810154610100900460ff1615610ecd576007915050610f6c565b6002810154600854604080516360d143f160e11b81529051610f5693926001600160a01b03169163c1a287e2916004808301926020929190829003018186803b158015610f1957600080fd5b505afa158015610f2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f5191908101906129c6565b612087565b4210610f66576006915050610f6c565b60059150505b919050565b6007610f7c82610deb565b6007811115610f8757fe5b1415610fa55760405162461bcd60e51b815260040161075b90613ec2565b6000818152600a6020526040902060018101546001600160a01b031633148061106d57506005546009546001838101546001600160a01b039283169263782d6fe192911690610ff59043906120ac565b6040518363ffffffff1660e01b8152600401611012929190613b2f565b60206040518083038186803b15801561102a57600080fd5b505afa15801561103e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506110629190810190612b4f565b6001600160601b0316105b6110895760405162461bcd60e51b815260040161075b90613e72565b600c8101805460ff1916600117905560005b6003820154811015611195576008546003830180546001600160a01b039092169163591fcdfe9190849081106110cd57fe5b6000918252602090912001546004850180546001600160a01b0390921691859081106110f557fe5b906000526020600020015485600501858154811061110f57fe5b9060005260206000200186600601868154811061112857fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401611157959493929190613b97565b600060405180830381600087803b15801561117157600080fd5b505af1158015611185573d6000803e3d6000fd5b50506001909201915061109b9050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c826040516107cf9190613c25565b337fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda483836111f4848383611e96565b604051611203939291906140a2565b60405180910390a25050565b6002546001600160a01b031681565b690a968163f0a57b40000081565b337fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4858561125b848383611e96565b868660405161126e95949392919061405c565b60405180910390a250505050565b600a81565b62013b0081565b619d8081565b60055481565b6000546001600160a01b031633146112be5760405162461bcd60e51b815260040161075b90613d12565b600180546001600160a01b038381166001600160a01b03198316179092556040519116907fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9906107cf9083908590613b14565b6008546001600160a01b03161561133a5760405162461bcd60e51b815260040161075b90613d02565b6000546001600160a01b031633146113645760405162461bcd60e51b815260040161075b90613e02565b6001600160a01b03851661138a5760405162461bcd60e51b815260040161075b90613d42565b6001600160a01b0384166113b05760405162461bcd60e51b815260040161075b90613e62565b61168083101580156113c5575062013b008311155b6113e15760405162461bcd60e51b815260040161075b90613ef2565b600182101580156113f45750619d808211155b6114105760405162461bcd60e51b815260040161075b90613de2565b690a968163f0a57b4000008110158015611434575069152d02c7e14af68000008111155b6114505760405162461bcd60e51b815260040161075b90613db2565b600880546001600160a01b039687166001600160a01b0319918216179091556009805495909616941693909317909355600455600391909155600555565b6008546001600160a01b031681565b60075481565b6000600654600014156114c85760405162461bcd60e51b815260040161075b90613d62565b6005546009546001600160a01b031663782d6fe1336114e84360016120ac565b6040518363ffffffff1660e01b8152600401611505929190613af9565b60206040518083038186803b15801561151d57600080fd5b505afa158015611531573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506115559190810190612b4f565b6001600160601b03161161157b5760405162461bcd60e51b815260040161075b90613eb2565b8451865114801561158d575083518651145b801561159a575082518651145b6115b65760405162461bcd60e51b815260040161075b90613df2565b85516115d45760405162461bcd60e51b815260040161075b90613e42565b600a865111156115f65760405162461bcd60e51b815260040161075b90613e82565b336000908152600b6020526040902054801561167357600061161782610deb565b9050600181600781111561162757fe5b14156116455760405162461bcd60e51b815260040161075b90613ea2565b600081600781111561165357fe5b14156116715760405162461bcd60e51b815260040161075b90613e92565b505b600061168143600354612087565b9050600061169182600454612087565b60078054600101905590506116a4612233565b604051806101c001604052806007548152602001336001600160a01b03168152602001600081526020018b81526020018a815260200189815260200188815260200184815260200183815260200160008152602001600081526020016000815260200160001515815260200160001515815250905080600a6000836000015181526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020155606082015181600301908051906020019061178e9291906122af565b50608082015180516117aa916004840191602090910190612314565b5060a082015180516117c691600584019160209091019061235b565b5060c082015180516117e29160068401916020909101906123b4565b5060e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b015561018082015181600c0160006101000a81548160ff0219169083151502179055506101a082015181600c0160016101000a81548160ff0219169083151502179055509050508060000151600b600083602001516001600160a01b03166001600160a01b03168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000151338c8c8c8c89898e6040516118d399989796959493929190613f20565b60405180910390a15193505050505b95945050505050565b60046118f682610deb565b600781111561190157fe5b1461191e5760405162461bcd60e51b815260040161075b90613e22565b6000818152600a602090815260408083206008548251630d48571f60e31b815292519194936119789342936001600160a01b0390931692636a42b8f892600480840193919291829003018186803b158015610f1957600080fd5b905060005b6003830154811015611b2057611b1883600301828154811061199b57fe5b6000918252602090912001546004850180546001600160a01b0390921691849081106119c357fe5b90600052602060002001548560050184815481106119dd57fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015611a6b5780601f10611a4057610100808354040283529160200191611a6b565b820191906000526020600020905b815481529060010190602001808311611a4e57829003601f168201915b5050505050866006018581548110611a7f57fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015611b0d5780601f10611ae257610100808354040283529160200191611b0d565b820191906000526020600020905b815481529060010190602001808311611af057829003601f168201915b5050505050866120d4565b60010161197d565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290611b5a908590849061404e565b60405180910390a1505050565b60405161093f90613aa4565b611b7b61240d565b506000828152600a602090815260408083206001600160a01b0385168452600d018252918290208251606081018452905460ff8082161515835261010082041692820192909252620100009091046001600160601b0316918101919091525b92915050565b600181565b6001546001600160a01b031633148015611bfe57503315155b611c1a5760405162461bcd60e51b815260040161075b90613e52565b60008054600180546001600160a01b038082166001600160a01b03198086168217968790559092169092556040519282169390927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92611c7e928692911690613b14565b60405180910390a16001546040517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9916107cf9184916001600160a01b031690613b14565b6000546001600160a01b031681565b60065481565b6005611ce382610deb565b6007811115611cee57fe5b14611d0b5760405162461bcd60e51b815260040161075b90613dc2565b6000818152600a60205260408120600c8101805461ff001916610100179055905b6003820154811015611e61576008546004830180546001600160a01b0390921691630825f38f919084908110611d5e57fe5b9060005260206000200154846003018481548110611d7857fe5b6000918252602090912001546004860180546001600160a01b039092169186908110611da057fe5b9060005260206000200154866005018681548110611dba57fe5b90600052602060002001876006018781548110611dd357fe5b9060005260206000200188600201546040518763ffffffff1660e01b8152600401611e02959493929190613b97565b6000604051808303818588803b158015611e1b57600080fd5b505af1158015611e2f573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052611e5891908101906129e4565b50600101611d2c565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f826040516107cf9190613c25565b465b90565b60006001611ea384610deb565b6007811115611eae57fe5b14611ecb5760405162461bcd60e51b815260040161075b90613d82565b60028260ff161115611eef5760405162461bcd60e51b815260040161075b90613cf2565b6000838152600a602090815260408083206001600160a01b0388168452600d8101909252909120805460ff1615611f385760405162461bcd60e51b815260040161075b90613d92565b600954600783015460405163782d6fe160e01b81526000926001600160a01b03169163782d6fe191611f6e918b91600401613b2f565b60206040518083038186803b158015611f8657600080fd5b505afa158015611f9a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611fbe9190810190612b4f565b905060ff8516611fe957611fdf83600a0154826001600160601b0316612087565b600a84015561203f565b8460ff16600114156120165761200c8360090154826001600160601b0316612087565b600984015561203f565b8460ff166002141561203f5761203983600b0154826001600160601b0316612087565b600b8401555b8154600160ff199091161761ff00191661010060ff871602176dffffffffffffffffffffffff00001916620100006001600160601b03831602179091559150505b9392505050565b6000828201838110156120805760405162461bcd60e51b815260040161075b90613e32565b6000828211156120ce5760405162461bcd60e51b815260040161075b90613f02565b50900390565b6008546040516001600160a01b039091169063f2b06537906121029088908890889088908890602001613b3d565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b81526004016121349190613c25565b60206040518083038186803b15801561214c57600080fd5b505afa158015612160573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061218491908101906129a8565b156121a15760405162461bcd60e51b815260040161075b90613d22565b600854604051633a66f90160e01b81526001600160a01b0390911690633a66f901906121d99088908890889088908890600401613b3d565b602060405180830381600087803b1580156121f357600080fd5b505af1158015612207573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061222b91908101906129c6565b505050505050565b604051806101c001604052806000815260200160006001600160a01b03168152602001600081526020016060815260200160608152602001606081526020016060815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b828054828255906000526020600020908101928215612304579160200282015b8281111561230457825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906122cf565b5061231092915061242d565b5090565b82805482825590600052602060002090810192821561234f579160200282015b8281111561234f578251825591602001919060010190612334565b50612310929150612451565b8280548282559060005260206000209081019282156123a8579160200282015b828111156123a8578251805161239891849160209091019061246b565b509160200191906001019061237b565b506123109291506124d8565b828054828255906000526020600020908101928215612401579160200282015b8281111561240157825180516123f191849160209091019061246b565b50916020019190600101906123d4565b506123109291506124fb565b604080516060810182526000808252602082018190529181019190915290565b611e9391905b808211156123105780546001600160a01b0319168155600101612433565b611e9391905b808211156123105760008155600101612457565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106124ac57805160ff191683800117855561234f565b8280016001018555821561234f579182018281111561234f578251825591602001919060010190612334565b611e9391905b808211156123105760006124f2828261251e565b506001016124de565b611e9391905b80821115612310576000612515828261251e565b50600101612501565b50805460018160011615610100020316600290046000825580601f106125445750612562565b601f0160209004906000526020600020908101906125629190612451565b50565b8035611bda81614216565b600082601f83011261258157600080fd5b813561259461258f82614102565b6140db565b915081818352602084019350602081019050838560208402820111156125b957600080fd5b60005b838110156125e557816125cf8882612565565b84525060209283019291909101906001016125bc565b5050505092915050565b600082601f83011261260057600080fd5b813561260e61258f82614102565b81815260209384019390925082018360005b838110156125e55781358601612636888261273a565b8452506020928301929190910190600101612620565b600082601f83011261265d57600080fd5b813561266b61258f82614102565b81815260209384019390925082018360005b838110156125e55781358601612693888261273a565b845250602092830192919091019060010161267d565b600082601f8301126126ba57600080fd5b81356126c861258f82614102565b915081818352602084019350602081019050838560208402820111156126ed57600080fd5b60005b838110156125e557816127038882612724565b84525060209283019291909101906001016126f0565b8051611bda8161422a565b8035611bda81614233565b8051611bda81614233565b600082601f83011261274b57600080fd5b813561275961258f82614123565b9150808252602083016020830185838301111561277557600080fd5b6127808382846141ca565b50505092915050565b600082601f83011261279a57600080fd5b81516127a861258f82614123565b915080825260208301602083018583830111156127c457600080fd5b6127808382846141d6565b60008083601f8401126127e157600080fd5b50813567ffffffffffffffff8111156127f957600080fd5b60208301915083600182028301111561281157600080fd5b9250929050565b8035611bda8161423c565b8051611bda81614245565b60006020828403121561284057600080fd5b600061284c8484612565565b949350505050565b600080600080600060a0868803121561286c57600080fd5b60006128788888612565565b955050602061288988828901612565565b945050604061289a88828901612724565b93505060606128ab88828901612724565b92505060806128bc88828901612724565b9150509295509295909350565b600080600080600060a086880312156128e157600080fd5b853567ffffffffffffffff8111156128f857600080fd5b61290488828901612570565b955050602086013567ffffffffffffffff81111561292157600080fd5b61292d888289016126a9565b945050604086013567ffffffffffffffff81111561294a57600080fd5b6129568882890161264c565b935050606086013567ffffffffffffffff81111561297357600080fd5b61297f888289016125ef565b925050608086013567ffffffffffffffff81111561299c57600080fd5b6128bc8882890161273a565b6000602082840312156129ba57600080fd5b600061284c8484612719565b6000602082840312156129d857600080fd5b600061284c848461272f565b6000602082840312156129f657600080fd5b815167ffffffffffffffff811115612a0d57600080fd5b61284c84828501612789565b600060208284031215612a2b57600080fd5b600061284c8484612724565b60008060408385031215612a4a57600080fd5b6000612a568585612724565b9250506020612a6785828601612565565b9150509250929050565b60008060408385031215612a8457600080fd5b6000612a908585612724565b9250506020612a6785828601612818565b60008060008060608587031215612ab757600080fd5b6000612ac38787612724565b9450506020612ad487828801612818565b935050604085013567ffffffffffffffff811115612af157600080fd5b612afd878288016127cf565b95989497509550505050565b600080600080600060a08688031215612b2157600080fd5b6000612b2d8888612724565b9550506020612b3e88828901612818565b945050604061289a88828901612818565b600060208284031215612b6157600080fd5b600061284c8484612823565b6000612b798383612ba8565b505060200190565b60006120808383612d4a565b6000612b798383612d30565b612ba2816141a2565b82525050565b612ba28161416a565b6000612bbc8261415d565b612bc68185614161565b9350612bd18361414b565b8060005b83811015612bff578151612be98882612b6d565b9750612bf48361414b565b925050600101612bd5565b509495945050505050565b6000612c158261415d565b612c1f8185614161565b935083602082028501612c318561414b565b8060005b85811015612c6b5784840389528151612c4e8582612b81565b9450612c598361414b565b60209a909a0199925050600101612c35565b5091979650505050505050565b6000612c838261415d565b612c8d8185614161565b935083602082028501612c9f8561414b565b8060005b85811015612c6b5784840389528151612cbc8582612b81565b9450612cc78361414b565b60209a909a0199925050600101612ca3565b6000612ce48261415d565b612cee8185614161565b9350612cf98361414b565b8060005b83811015612bff578151612d118882612b8d565b9750612d1c8361414b565b925050600101612cfd565b612ba281614175565b612ba281611e93565b612ba2612d4582611e93565b611e93565b6000612d558261415d565b612d5f8185614161565b9350612d6f8185602086016141d6565b612d7881614202565b9093019392505050565b600081546001811660008114612d9f5760018114612dc557612e04565b607f6002830416612db08187614161565b60ff1984168152955050602085019250612e04565b60028204612dd38187614161565b9550612dde85614151565b60005b82811015612dfd57815488820152600190910190602001612de1565b8701945050505b505092915050565b612ba2816141a9565b612ba2816141b4565b6000612e2a8385614161565b9350612e378385846141ca565b612d7883614202565b6000612e4d603283614161565b7f476f7665726e6f72427261766f3a3a63617374566f7465496e7465726e616c3a81527120696e76616c696420766f7465207479706560701b602082015260400192915050565b6000612ea1602883610f6c565b7f42616c6c6f742875696e743235362070726f706f73616c49642c75696e743820815267737570706f72742960c01b602082015260280192915050565b6000612eeb603383614161565b7f476f7665726e6f72427261766f3a3a696e697469616c697a653a2063616e206f8152726e6c7920696e697469616c697a65206f6e636560681b602082015260400192915050565b6000612f40602a83614161565b7f476f7665726e6f72427261766f3a5f73657450656e64696e6741646d696e3a2081526961646d696e206f6e6c7960b01b602082015260400192915050565b6000612f8c605583614161565b7f476f7665726e6f72427261766f3a3a71756575654f72526576657274496e746581527f726e616c3a206964656e746963616c2070726f706f73616c20616374696f6e20602082015274616c7265616479207175657565642061742065746160581b604082015260600192915050565b6000613009602b83614161565b7f476f7665726e6f72427261766f3a3a5f736574566f74696e67506572696f643a81526a2061646d696e206f6e6c7960a81b602082015260400192915050565b6000613056603383614161565b60008051602061424f83398151915281527269642074696d656c6f636b206164647265737360681b602082015260400192915050565b6000613099602a83614161565b7f476f7665726e6f72427261766f3a3a5f736574566f74696e6744656c61793a2081526961646d696e206f6e6c7960b01b602082015260400192915050565b60006130e5603183614161565b7f476f7665726e6f72427261766f3a3a70726f706f73653a20476f7665726e6f7281527020427261766f206e6f742061637469766560781b602082015260400192915050565b6000613138600283610f6c565b61190160f01b815260020192915050565b6000613156603683614161565b7f476f7665726e6f72427261766f3a3a5f736574566f74696e67506572696f643a815275081a5b9d985b1a59081d9bdd1a5b99c81c195c9a5bd960521b602082015260400192915050565b60006131ae603183614161565b7f476f7665726e6f72427261766f3a3a63617374566f7465496e7465726e616c3a815270081d9bdd1a5b99c81a5cc818db1bdcd959607a1b602082015260400192915050565b6000613201603483614161565b7f476f7665726e6f72427261766f3a3a63617374566f7465496e7465726e616c3a815273081d9bdd195c88185b1c9958591e481d9bdd195960621b602082015260400192915050565b6000613257603483614161565b7f476f7665726e6f72427261766f3a3a5f736574566f74696e6744656c61793a20815273696e76616c696420766f74696e672064656c617960601b602082015260400192915050565b60006132ad603583614161565b60008051602061424f8339815191528152741a59081c1c9bdc1bdcd85b081d1a1c995cda1bdb19605a1b602082015260400192915050565b60006132f2604583614161565b7f476f7665726e6f72427261766f3a3a657865637574653a2070726f706f73616c81527f2063616e206f6e6c7920626520657865637574656420696620697420697320716020820152641d595d595960da1b604082015260600192915050565b600061335f602f83614161565b7f476f7665726e6f72427261766f3a3a63617374566f746542795369673a20696e81526e76616c6964207369676e617475726560881b602082015260400192915050565b60006133b0602f83614161565b60008051602061424f83398151915281526e696420766f74696e672064656c617960881b602082015260400192915050565b60006133ef604483614161565b7f476f7665726e6f72427261766f3a3a70726f706f73653a2070726f706f73616c81527f2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d6020820152630c2e8c6d60e31b604082015260600192915050565b600061345b602583614161565b7f476f7665726e6f72427261766f3a3a696e697469616c697a653a2061646d696e815264206f6e6c7960d81b602082015260400192915050565b60006134a2604083614161565b7f476f7665726e6f72427261766f3a3a5f73657450726f706f73616c546872657381527f686f6c643a20696e76616c69642070726f706f73616c207468726573686f6c64602082015260400192915050565b6000613501604483614161565b7f476f7665726e6f72427261766f3a3a71756575653a2070726f706f73616c206381527f616e206f6e6c79206265207175657565642069662069742069732073756363656020820152631959195960e21b604082015260600192915050565b600061356d601183614161565b706164646974696f6e206f766572666c6f7760781b815260200192915050565b600061359a604383610f6c565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201526263742960e81b604082015260430192915050565b6000613605602c83614161565b7f476f7665726e6f72427261766f3a3a70726f706f73653a206d7573742070726f81526b7669646520616374696f6e7360a01b602082015260400192915050565b6000613653602e83614161565b7f476f7665726e6f72427261766f3a5f61636365707441646d696e3a2070656e6481526d696e672061646d696e206f6e6c7960901b602082015260400192915050565b60006136a3602f83614161565b60008051602061424f83398151915281526e696420636f6d70206164647265737360881b602082015260400192915050565b60006136e2602f83614161565b7f476f7665726e6f72427261766f3a3a63616e63656c3a2070726f706f7365722081526e18589bdd99481d1a1c995cda1bdb19608a1b602082015260400192915050565b6000613733602883614161565b7f476f7665726e6f72427261766f3a3a70726f706f73653a20746f6f206d616e7981526720616374696f6e7360c01b602082015260400192915050565b600061377d605983614161565b7f476f7665726e6f72427261766f3a3a70726f706f73653a206f6e65206c69766581527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208201527f20616c72656164792070656e64696e672070726f706f73616c00000000000000604082015260600192915050565b6000613802605883614161565b7f476f7665726e6f72427261766f3a3a70726f706f73653a206f6e65206c69766581527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208201527f20616c7265616479206163746976652070726f706f73616c0000000000000000604082015260600192915050565b6000611bda600083614161565b6000613894603f83614161565b7f476f7665726e6f72427261766f3a3a70726f706f73653a2070726f706f73657281527f20766f7465732062656c6f772070726f706f73616c207468726573686f6c6400602082015260400192915050565b60006138f3603683614161565b7f476f7665726e6f72427261766f3a3a63616e63656c3a2063616e6e6f742063618152751b98d95b08195e1958dd5d1959081c1c9bdc1bdcd85b60521b602082015260400192915050565b600061394b603083614161565b7f476f7665726e6f72427261766f3a3a5f73657450726f706f73616c546872657381526f686f6c643a2061646d696e206f6e6c7960801b602082015260400192915050565b600061399d602983614161565b7f476f7665726e6f72427261766f3a3a73746174653a20696e76616c69642070728152681bdc1bdcd85b081a5960ba1b602082015260400192915050565b60006139e8603083614161565b60008051602061424f83398151915281526f1a59081d9bdd1a5b99c81c195c9a5bd960821b602082015260400192915050565b6000613a28601583614161565b747375627472616374696f6e20756e646572666c6f7760581b815260200192915050565b80516060830190613a5d8482612d27565b506020820151613a706020850182613a89565b506040820151613a836040850182613a9b565b50505050565b612ba281614190565b612ba2816141bf565b612ba281614196565b6000611bda82612e94565b6000613aba8261312b565b9150613ac68285612d39565b602082019150613ad68284612d39565b5060200192915050565b6000611bda8261358d565b60208101611bda8284612ba8565b60408101613b078285612b99565b6120806020830184612d30565b60408101613b228285612ba8565b6120806020830184612ba8565b60408101613b078285612ba8565b60a08101613b4b8288612ba8565b613b586020830187612d30565b8181036040830152613b6a8186612d4a565b90508181036060830152613b7e8185612d4a565b9050613b8d6080830184612d30565b9695505050505050565b60a08101613ba58288612ba8565b613bb26020830187612d30565b8181036040830152613bc48186612d82565b90508181036060830152613b7e8185612d82565b60808082528101613be98187612bb1565b90508181036020830152613bfd8186612cd9565b90508181036040830152613c118185612c78565b90508181036060830152613b8d8184612c0a565b60208101611bda8284612d30565b60808101613c418287612d30565b613c4e6020830186612d30565b613c5b6040830185612d30565b6118e26060830184612ba8565b60608101613c768286612d30565b613c836020830185612d30565b61284c6040830184613a89565b60808101613c9e8287612d30565b613cab6020830186613a89565b613cb86040830185612d30565b6118e26060830184612d30565b60208101611bda8284612e0c565b60208101611bda8284612e15565b602080825281016120808184612d4a565b60208082528101611bda81612e40565b60208082528101611bda81612ede565b60208082528101611bda81612f33565b60208082528101611bda81612f7f565b60208082528101611bda81612ffc565b60208082528101611bda81613049565b60208082528101611bda8161308c565b60208082528101611bda816130d8565b60208082528101611bda81613149565b60208082528101611bda816131a1565b60208082528101611bda816131f4565b60208082528101611bda8161324a565b60208082528101611bda816132a0565b60208082528101611bda816132e5565b60208082528101611bda81613352565b60208082528101611bda816133a3565b60208082528101611bda816133e2565b60208082528101611bda8161344e565b60208082528101611bda81613495565b60208082528101611bda816134f4565b60208082528101611bda81613560565b60208082528101611bda816135f8565b60208082528101611bda81613646565b60208082528101611bda81613696565b60208082528101611bda816136d5565b60208082528101611bda81613726565b60208082528101611bda81613770565b60208082528101611bda816137f5565b60208082528101611bda81613887565b60208082528101611bda816138e6565b60208082528101611bda8161393e565b60208082528101611bda81613990565b60208082528101611bda816139db565b60208082528101611bda81613a1b565b60608101611bda8284613a4c565b6101208101613f2f828c612d30565b613f3c602083018b612b99565b8181036040830152613f4e818a612bb1565b90508181036060830152613f628189612cd9565b90508181036080830152613f768188612c78565b905081810360a0830152613f8a8187612c0a565b9050613f9960c0830186612d30565b613fa660e0830185612d30565b818103610100830152613fb98184612d4a565b9b9a5050505050505050505050565b6101408101613fd7828d612d30565b613fe4602083018c612ba8565b613ff1604083018b612d30565b613ffe606083018a612d30565b61400b6080830189612d30565b61401860a0830188612d30565b61402560c0830187612d30565b61403260e0830186612d30565b614040610100830185612d27565b613fb9610120830184612d27565b60408101613b078285612d30565b6080810161406a8288612d30565b6140776020830187613a89565b6140846040830186613a92565b8181036060830152614097818486612e1e565b979650505050505050565b608081016140b08286612d30565b6140bd6020830185613a89565b6140ca6040830184613a92565b81810360608301526118e28161387a565b60405181810167ffffffffffffffff811182821017156140fa57600080fd5b604052919050565b600067ffffffffffffffff82111561411957600080fd5b5060209081020190565b600067ffffffffffffffff82111561413a57600080fd5b506020601f91909101601f19160190565b60200190565b60009081526020902090565b5190565b90815260200190565b6000611bda82614184565b151590565b80610f6c8161420c565b6001600160a01b031690565b60ff1690565b6001600160601b031690565b6000611bda825b6000611bda8261416a565b6000611bda8261417a565b6000611bda82614196565b82818337506000910152565b60005b838110156141f15781810151838201526020016141d9565b83811115613a835750506000910152565b601f01601f191690565b6008811061256257fe5b61421f8161416a565b811461256257600080fd5b61421f81614175565b61421f81611e93565b61421f81614190565b61421f8161419656fe476f7665726e6f72427261766f3a3a696e697469616c697a653a20696e76616ca365627a7a7231582060988686456a6ed3991f7e5be7f8a1fd8fcdf6cd480d1759762c1d9bf558868d6c6578706572696d656e74616cf564736f6c63430005100040"; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegatorStorage__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegatorStorage__factory.ts new file mode 100644 index 00000000000..7e9ce06da20 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegatorStorage__factory.ts @@ -0,0 +1,94 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GovernorBravoDelegatorStorage } from "../GovernorBravoDelegatorStorage"; + +export class GovernorBravoDelegatorStorage__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + overrides || {} + ) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): GovernorBravoDelegatorStorage { + return super.attach(address) as GovernorBravoDelegatorStorage; + } + connect(signer: Signer): GovernorBravoDelegatorStorage__factory { + return super.connect(signer) as GovernorBravoDelegatorStorage__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorBravoDelegatorStorage { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernorBravoDelegatorStorage; + } +} + +const _abi = [ + { + constant: true, + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "implementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "pendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50610106806100206000396000f3fe6080604052348015600f57600080fd5b5060043610603c5760003560e01c8063267822471460415780635c60da1b14605b578063f851a440146061575b600080fd5b60476067565b6040516052919060a1565b60405180910390f35b60476076565b60476085565b6001546001600160a01b031681565b6002546001600160a01b031681565b6000546001600160a01b031681565b609b8160b3565b82525050565b6020810160ad82846094565b92915050565b60006001600160a01b03821660ad56fea365627a7a72315820d590f11729b6522b5134fec69ec792ea7f44ffaf87ce8e51f0e343c0dc79a0c06c6578706572696d656e74616cf564736f6c63430005100040"; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegator__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegator__factory.ts new file mode 100644 index 00000000000..b3316e76895 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorBravoDelegator__factory.ts @@ -0,0 +1,449 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GovernorBravoDelegator } from "../GovernorBravoDelegator"; + +export class GovernorBravoDelegator__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + timelock_: string, + comp_: string, + admin_: string, + implementation_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + timelock_, + comp_, + admin_, + implementation_, + votingPeriod_, + votingDelay_, + proposalThreshold_, + overrides || {} + ) as Promise; + } + getDeployTransaction( + timelock_: string, + comp_: string, + admin_: string, + implementation_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + timelock_, + comp_, + admin_, + implementation_, + votingPeriod_, + votingDelay_, + proposalThreshold_, + overrides || {} + ); + } + attach(address: string): GovernorBravoDelegator { + return super.attach(address) as GovernorBravoDelegator; + } + connect(signer: Signer): GovernorBravoDelegator__factory { + return super.connect(signer) as GovernorBravoDelegator__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorBravoDelegator { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernorBravoDelegator; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "timelock_", + type: "address", + }, + { + internalType: "address", + name: "comp_", + type: "address", + }, + { + internalType: "address", + name: "admin_", + type: "address", + }, + { + internalType: "address", + name: "implementation_", + type: "address", + }, + { + internalType: "uint256", + name: "votingPeriod_", + type: "uint256", + }, + { + internalType: "uint256", + name: "votingDelay_", + type: "uint256", + }, + { + internalType: "uint256", + name: "proposalThreshold_", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldImplementation", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "NewImplementation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldPendingAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldProposalThreshold", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newProposalThreshold", + type: "uint256", + }, + ], + name: "ProposalThresholdSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "votes", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldVotingDelay", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotingDelay", + type: "uint256", + }, + ], + name: "VotingDelaySet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldVotingPeriod", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotingPeriod", + type: "uint256", + }, + ], + name: "VotingPeriodSet", + type: "event", + }, + { + payable: true, + stateMutability: "payable", + type: "fallback", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "implementation_", + type: "address", + }, + ], + name: "_setImplementation", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "implementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "pendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b506040516200096d3803806200096d83398101604081905262000034916200023c565b600080546001600160a01b031916331790556040516200009c90859062000068908a908a908890889088906024016200041f565b60408051601f198184030181529190526020810180516001600160e01b0390811663344fe42d60e21b17909152620000de16565b620000b0846001600160e01b036200015a16565b5050600080546001600160a01b0319166001600160a01b039490941693909317909255506200051492505050565b60006060836001600160a01b031683604051620000fc9190620003eb565b600060405180830381855af49150503d806000811462000139576040519150601f19603f3d011682016040523d82523d6000602084013e6200013e565b606091505b5091509150600082141562000154573d60208201fd5b50505050565b6000546001600160a01b03163314620001905760405162461bcd60e51b8152600401620001879062000487565b60405180910390fd5b6001600160a01b038116620001b95760405162461bcd60e51b8152600401620001879062000475565b600280546001600160a01b038381166001600160a01b031983161792839055604051918116927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a9262000210928592169062000400565b60405180910390a15050565b80516200022981620004ef565b92915050565b8051620002298162000509565b600080600080600080600060e0888a0312156200025857600080fd5b6000620002668a8a6200021c565b9750506020620002798a828b016200021c565b96505060406200028c8a828b016200021c565b95505060606200029f8a828b016200021c565b9450506080620002b28a828b016200022f565b93505060a0620002c58a828b016200022f565b92505060c0620002d88a828b016200022f565b91505092959891949750929550565b620002f281620004ab565b82525050565b6000620003058262000499565b6200031181856200049d565b935062000323818560208601620004c0565b9290920192915050565b60006200033c604a83620004a2565b6000805160206200094d83398151915281527f656d656e746174696f6e3a20696e76616c696420696d706c656d656e746174696020820152696f6e206164647265737360b01b604082015260600192915050565b60006200039f603683620004a2565b6000805160206200094d83398151915281527f656d656e746174696f6e3a2061646d696e206f6e6c7900000000000000000000602082015260400192915050565b620002f281620004bd565b6000620003f98284620002f8565b9392505050565b60408101620004108285620002e7565b620003f96020830184620002e7565b60a081016200042f8288620002e7565b6200043e6020830187620002e7565b6200044d6040830186620003e0565b6200045c6060830185620003e0565b6200046b6080830184620003e0565b9695505050505050565b6020808252810162000229816200032d565b60208082528101620002298162000390565b5190565b919050565b90815260200190565b60006001600160a01b03821662000229565b90565b60005b83811015620004dd578181015183820152602001620004c3565b83811115620001545750506000910152565b620004fa81620004ab565b81146200050657600080fd5b50565b620004fa81620004bd565b61042980620005246000396000f3fe60806040526004361061003f5760003560e01c806326782247146100ba5780635c60da1b146100e5578063bb913f41146100fa578063f851a4401461011c575b6002546040516000916001600160a01b03169061005f9083903690610347565b600060405180830381855af49150503d806000811461009a576040519150601f19603f3d011682016040523d82523d6000602084013e61009f565b606091505b505090506040513d6000823e8180156100b6573d82f35b3d82fd5b3480156100c657600080fd5b506100cf610131565b6040516100dc9190610354565b60405180910390f35b3480156100f157600080fd5b506100cf610140565b34801561010657600080fd5b5061011a610115366004610229565b61014f565b005b34801561012857600080fd5b506100cf610209565b6001546001600160a01b031681565b6002546001600160a01b031681565b6000546001600160a01b031633146101825760405162461bcd60e51b815260040161017990610394565b60405180910390fd5b6001600160a01b0381166101a85760405162461bcd60e51b815260040161017990610384565b600280546001600160a01b038381166001600160a01b031983161792839055604051918116927fd604de94d45953f9138079ec1b82d533cb2160c906d1076d1f7ed54befbca97a926101fd9285921690610362565b60405180910390a15050565b6000546001600160a01b031681565b8035610223816103cf565b92915050565b60006020828403121561023b57600080fd5b60006102478484610218565b949350505050565b610258816103b2565b82525050565b600061026a83856103a4565b93506102778385846103c3565b50500190565b600061028a604a836103a9565b7f476f7665726e6f72427261766f44656c656761746f723a3a5f736574496d706c81527f656d656e746174696f6e3a20696e76616c696420696d706c656d656e746174696020820152696f6e206164647265737360b01b604082015260600192915050565b60006102fc6036836103a9565b7f476f7665726e6f72427261766f44656c656761746f723a3a5f736574496d706c815275656d656e746174696f6e3a2061646d696e206f6e6c7960501b602082015260400192915050565b600061024782848661025e565b60208101610223828461024f565b60408101610370828561024f565b61037d602083018461024f565b9392505050565b602080825281016102238161027d565b60208082528101610223816102ef565b919050565b90815260200190565b60006001600160a01b038216610223565b82818337506000910152565b6103d8816103b2565b81146103e357600080fd5b5056fea365627a7a72315820be56a12fb89b40a71ecda4e00f67acfba48cde039aac44b77b9516eab15da6796c6578706572696d656e74616cf564736f6c63430005100040476f7665726e6f72427261766f44656c656761746f723a3a5f736574496d706c"; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorBravoEvents__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorBravoEvents__factory.ts new file mode 100644 index 00000000000..95c81fd0ef1 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorBravoEvents__factory.ts @@ -0,0 +1,300 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GovernorBravoEvents } from "../GovernorBravoEvents"; + +export class GovernorBravoEvents__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): GovernorBravoEvents { + return super.attach(address) as GovernorBravoEvents; + } + connect(signer: Signer): GovernorBravoEvents__factory { + return super.connect(signer) as GovernorBravoEvents__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorBravoEvents { + return new Contract(address, _abi, signerOrProvider) as GovernorBravoEvents; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldImplementation", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "NewImplementation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldPendingAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldProposalThreshold", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newProposalThreshold", + type: "uint256", + }, + ], + name: "ProposalThresholdSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "votes", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldVotingDelay", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotingDelay", + type: "uint256", + }, + ], + name: "VotingDelaySet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldVotingPeriod", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotingPeriod", + type: "uint256", + }, + ], + name: "VotingPeriodSet", + type: "event", + }, +]; + +const _bytecode = + "0x6080604052348015600f57600080fd5b50604c80601d6000396000f3fe6080604052600080fdfea365627a7a72315820d7f4d04869d505f91c5478982d4af387218399546007d12ea3a592a08558eb1f6c6578706572696d656e74616cf564736f6c63430005100040"; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorBravoImmutable__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorBravoImmutable__factory.ts new file mode 100644 index 00000000000..5003a09f72b --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorBravoImmutable__factory.ts @@ -0,0 +1,1165 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GovernorBravoImmutable } from "../GovernorBravoImmutable"; + +export class GovernorBravoImmutable__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + timelock_: string, + comp_: string, + admin_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + timelock_, + comp_, + admin_, + votingPeriod_, + votingDelay_, + proposalThreshold_, + overrides || {} + ) as Promise; + } + getDeployTransaction( + timelock_: string, + comp_: string, + admin_: string, + votingPeriod_: BigNumberish, + votingDelay_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + timelock_, + comp_, + admin_, + votingPeriod_, + votingDelay_, + proposalThreshold_, + overrides || {} + ); + } + attach(address: string): GovernorBravoImmutable { + return super.attach(address) as GovernorBravoImmutable; + } + connect(signer: Signer): GovernorBravoImmutable__factory { + return super.connect(signer) as GovernorBravoImmutable__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorBravoImmutable { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernorBravoImmutable; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "timelock_", + type: "address", + }, + { + internalType: "address", + name: "comp_", + type: "address", + }, + { + internalType: "address", + name: "admin_", + type: "address", + }, + { + internalType: "uint256", + name: "votingPeriod_", + type: "uint256", + }, + { + internalType: "uint256", + name: "votingDelay_", + type: "uint256", + }, + { + internalType: "uint256", + name: "proposalThreshold_", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldImplementation", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "NewImplementation", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldPendingAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldProposalThreshold", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newProposalThreshold", + type: "uint256", + }, + ], + name: "ProposalThresholdSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "votes", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldVotingDelay", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotingDelay", + type: "uint256", + }, + ], + name: "VotingDelaySet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldVotingPeriod", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newVotingPeriod", + type: "uint256", + }, + ], + name: "VotingPeriodSet", + type: "event", + }, + { + constant: true, + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "DOMAIN_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MAX_PROPOSAL_THRESHOLD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MAX_VOTING_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MAX_VOTING_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MIN_PROPOSAL_THRESHOLD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MIN_VOTING_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MIN_VOTING_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "_acceptAdmin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [], + name: "_initiate", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "_setPendingAdmin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "newProposalThreshold", + type: "uint256", + }, + ], + name: "_setProposalThreshold", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "newVotingDelay", + type: "uint256", + }, + ], + name: "_setVotingDelay", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "newVotingPeriod", + type: "uint256", + }, + ], + name: "_setVotingPeriod", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "cancel", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "comp", + outputs: [ + { + internalType: "contract CompInterface", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "execute", + outputs: [], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getActions", + outputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "getReceipt", + outputs: [ + { + components: [ + { + internalType: "bool", + name: "hasVoted", + type: "bool", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint96", + name: "votes", + type: "uint96", + }, + ], + internalType: "struct GovernorBravoDelegateStorageV1.Receipt", + name: "", + type: "tuple", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "implementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "initialProposalId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "timelock_", + type: "address", + }, + { + internalType: "address", + name: "comp_", + type: "address", + }, + { + internalType: "uint256", + name: "votingPeriod_", + type: "uint256", + }, + { + internalType: "uint256", + name: "votingDelay_", + type: "uint256", + }, + { + internalType: "uint256", + name: "proposalThreshold_", + type: "uint256", + }, + ], + name: "initialize", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "latestProposalIds", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "pendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalMaxOperations", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "proposals", + outputs: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "proposer", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + { + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "abstainVotes", + type: "uint256", + }, + { + internalType: "bool", + name: "canceled", + type: "bool", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "queue", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "quorumVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "setInitialProposalId", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum GovernorBravoDelegateStorageV1.ProposalState", + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "timelock", + outputs: [ + { + internalType: "contract TimelockInterface", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b506040516200439c3803806200439c83398101604081905262000034916200014b565b600080546001600160a01b031916331790556200005e86868585856001600160e01b036200008b16565b5050600080546001600160a01b0319166001600160a01b03939093169290921790915550620002f0915050565b6000546001600160a01b03163314620000c15760405162461bcd60e51b8152600401620000b8906200029b565b60405180910390fd5b6008546001600160a01b031615620000ed5760405162461bcd60e51b8152600401620000b89062000289565b600880546001600160a01b039687166001600160a01b0319918216179091556009805495909616941693909317909355600455600391909155600555565b80516200013881620002cb565b92915050565b80516200013881620002e5565b60008060008060008060c087890312156200016557600080fd5b60006200017389896200012b565b96505060206200018689828a016200012b565b95505060406200019989828a016200012b565b9450506060620001ac89828a016200013e565b9350506080620001bf89828a016200013e565b92505060a0620001d289828a016200013e565b9150509295509295509295565b6000620001ee603383620002ad565b7f476f7665726e6f72427261766f3a3a696e697469616c697a653a2063616e206f81527f6e6c7920696e697469616c697a65206f6e636500000000000000000000000000602082015260400192915050565b60006200024f602583620002ad565b7f476f7665726e6f72427261766f3a3a696e697469616c697a653a2061646d696e815264206f6e6c7960d81b602082015260400192915050565b602080825281016200013881620001df565b60208082528101620001388162000240565b90815260200190565b60006001600160a01b03821662000138565b90565b620002d681620002b6565b8114620002e257600080fd5b50565b620002d681620002c8565b61409c80620003006000396000f3fe6080604052600436106102465760003560e01c806378a574d011610139578063d33219b4116100b6578063e23a9a521161007a578063e23a9a521461062c578063e48083fe1461039c578063e9c714f214610659578063f851a4401461066e578063fc4eee4214610683578063fe0d94c11461069857610246565b8063d33219b4146105ad578063da35c664146105c2578063da95691a146105d7578063ddf0b009146105f7578063deaaa7cc1461061757610246565b8063a64e024a116100fd578063a64e024a1461052e578063b112626314610543578063b58131b014610558578063b71d1a0c1461056d578063d13f90b41461058d57610246565b806378a574d0146104cf578063791f5d231461039c5780637b3c71d3146104e45780637bdbe4d014610504578063878f14821461051957610246565b806324bc1a64116101c75780633bccf4fd1161018b5780633bccf4fd1461042d5780633e4f49e61461044d57806340e58ee51461047a578063567813881461049a5780635c60da1b146104ba57610246565b806324bc1a641461039c57806325fd935a146103b157806326782247146103c6578063328dd982146103e85780633932abb11461041857610246565b806317977c611161020e57806317977c611461031257806317ba1b8b146103325780631dfb1b5a1461035257806320606b7014610372578063215809ca1461038757610246565b8063013cf08b1461024b57806302a251a31461028a57806306fdde03146102ac5780630ea2d98c146102ce578063109d0af8146102f0575b600080fd5b34801561025757600080fd5b5061026b610266366004612952565b6106ab565b6040516102819a99989796959493929190613dd3565b60405180910390f35b34801561029657600080fd5b5061029f61070e565b6040516102819190613a70565b3480156102b857600080fd5b506102c1610714565b6040516102819190613b2c565b3480156102da57600080fd5b506102ee6102e9366004612952565b610747565b005b3480156102fc57600080fd5b506103056107f1565b6040516102819190613b10565b34801561031e57600080fd5b5061029f61032d366004612767565b610800565b34801561033e57600080fd5b506102ee61034d366004612952565b610812565b34801561035e57600080fd5b506102ee61036d366004612952565b6108ad565b34801561037e57600080fd5b5061029f610940565b34801561039357600080fd5b5061029f610957565b3480156103a857600080fd5b5061029f61095d565b3480156103bd57600080fd5b5061029f610962565b3480156103d257600080fd5b506103db610970565b6040516102819190613936565b3480156103f457600080fd5b50610408610403366004612952565b61097f565b6040516102819493929190613a23565b34801561042457600080fd5b5061029f610c0e565b34801561043957600080fd5b506102ee610448366004612a42565b610c14565b34801561045957600080fd5b5061046d610468366004612952565b610def565b6040516102819190613b1e565b34801561048657600080fd5b506102ee610495366004612952565b610f6c565b3480156104a657600080fd5b506102ee6104b53660046129aa565b6111c0565b3480156104c657600080fd5b506103db61120a565b3480156104db57600080fd5b506102ee611219565b3480156104f057600080fd5b506102ee6104ff3660046129da565b611225565b34801561051057600080fd5b5061029f611275565b34801561052557600080fd5b506102ee61127a565b34801561053a57600080fd5b5061029f611286565b34801561054f57600080fd5b5061029f61128d565b34801561056457600080fd5b5061029f611293565b34801561057957600080fd5b506102ee610588366004612767565b611299565b34801561059957600080fd5b506102ee6105a836600461278d565b611316565b3480156105b957600080fd5b506103056113a7565b3480156105ce57600080fd5b5061029f6113b6565b3480156105e357600080fd5b5061029f6105f2366004612802565b6113bc565b34801561060357600080fd5b506102ee610612366004612952565b611829565b34801561062357600080fd5b5061029f611aa5565b34801561063857600080fd5b5061064c610647366004612970565b611ab1565b6040516102819190613d1d565b34801561066557600080fd5b506102ee611b1e565b34801561067a57600080fd5b506103db611bfc565b34801561068f57600080fd5b5061029f611c0b565b6102ee6106a6366004612952565b611c11565b600a60208190526000918252604090912080546001820154600283015460078401546008850154600986015496860154600b870154600c9097015495976001600160a01b0390951696939592949193919290919060ff808216916101009004168a565b60045481565b60405180604001604052806017815260200176436f6d706f756e6420476f7665726e6f7220427261766f60481b81525081565b6000546001600160a01b0316331461077a5760405162461bcd60e51b815260040161077190613b7d565b60405180910390fd5b611680811015801561078f575062013b008111155b6107ab5760405162461bcd60e51b815260040161077190613bad565b60048054908290556040517f7e3f7f0708a84de9203036abaa450dccc85ad5ff52f78c170f3edb55cf5e8828906107e59083908590613e59565b60405180910390a15050565b6009546001600160a01b031681565b600b6020526000908152604090205481565b6000546001600160a01b0316331461083c5760405162461bcd60e51b815260040161077190613ced565b60018110158015610857575069152d02c7e14af68000008111155b6108735760405162461bcd60e51b815260040161077190613c2d565b60058054908290556040517fccb45da8d5717e6c4544694297c4ba5cf151d455c9bb0ed4fc7a38411bc05461906107e59083908590613e59565b6000546001600160a01b031633146108d75760405162461bcd60e51b815260040161077190613b8d565b600181101580156108ea5750619d808111155b6109065760405162461bcd60e51b815260040161077190613bdd565b60038054908290556040517fc565b045403dc03c2eea82b81a0465edad9e2e7fc4d97e11421c209da93d7a93906107e59083908590613e59565b60405161094c9061392b565b604051809103902081565b61168081565b600181565b69152d02c7e14af680000081565b6001546001600160a01b031681565b6060806060806000600a600087815260200190815260200160002090508060030181600401826005018360060183805480602002602001604051908101604052809291908181526020018280548015610a0157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116109e3575b5050505050935082805480602002602001604051908101604052809291908181526020018280548015610a5357602002820191906000526020600020905b815481526020019060010190808311610a3f575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b82821015610b265760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610b125780601f10610ae757610100808354040283529160200191610b12565b820191906000526020600020905b815481529060010190602001808311610af557829003601f168201915b505050505081526020019060010190610a7b565b50505050915080805480602002602001604051908101604052809291908181526020016000905b82821015610bf85760008481526020908190208301805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015610be45780601f10610bb957610100808354040283529160200191610be4565b820191906000526020600020905b815481529060010190602001808311610bc757829003601f168201915b505050505081526020019060010190610b4d565b5050505090509450945094509450509193509193565b60035481565b6000604051610c229061392b565b604080519182900382208282019091526017825276436f6d706f756e6420476f7665726e6f7220427261766f60481b6020909201919091527f3d9e905142ff365fb68ce863f26a44f5583cf7ec11bcde450555f50b7e1b5614610c83611dca565b30604051602001610c979493929190613a7e565b6040516020818303038152906040528051906020012090506000604051610cbd906138ef565b604051908190038120610cd69189908990602001613ab3565b60405160208183030381529060405280519060200120905060008282604051602001610d039291906138fa565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610d409493929190613adb565b6020604051602081039080840390855afa158015610d62573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610d955760405162461bcd60e51b815260040161077190613bfd565b806001600160a01b03167fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda48a8a610dcd858e8e611dcf565b604051610ddc93929190613ead565b60405180910390a2505050505050505050565b60008160075410158015610e04575060065482115b610e205760405162461bcd60e51b815260040161077190613cfd565b6000828152600a60205260409020600c81015460ff1615610e45576002915050610f67565b80600701544311610e5a576000915050610f67565b80600801544311610e6f576001915050610f67565b80600a01548160090154111580610e8a575060018160090154105b15610e99576003915050610f67565b6002810154610eac576004915050610f67565b600c810154610100900460ff1615610ec8576007915050610f67565b6002810154600854604080516360d143f160e11b81529051610f5193926001600160a01b03169163c1a287e2916004808301926020929190829003018186803b158015610f1457600080fd5b505afa158015610f28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610f4c91908101906128ff565b611fc0565b4210610f61576006915050610f67565b60059150505b919050565b6007610f7782610def565b6007811115610f8257fe5b1415610fa05760405162461bcd60e51b815260040161077190613cdd565b6000818152600a6020526040902060018101546001600160a01b031633148061106857506005546009546001838101546001600160a01b039283169263782d6fe192911690610ff0904390611fe5565b6040518363ffffffff1660e01b815260040161100d92919061397a565b60206040518083038186803b15801561102557600080fd5b505afa158015611039573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061105d9190810190612a88565b6001600160601b0316105b6110845760405162461bcd60e51b815260040161077190613c8d565b600c8101805460ff1916600117905560005b6003820154811015611190576008546003830180546001600160a01b039092169163591fcdfe9190849081106110c857fe5b6000918252602090912001546004850180546001600160a01b0390921691859081106110f057fe5b906000526020600020015485600501858154811061110a57fe5b9060005260206000200186600601868154811061112357fe5b9060005260206000200187600201546040518663ffffffff1660e01b81526004016111529594939291906139e2565b600060405180830381600087803b15801561116c57600080fd5b505af1158015611180573d6000803e3d6000fd5b5050600190920191506110969050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c826040516107e59190613a70565b337fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda483836111ef848383611dcf565b6040516111fe93929190613ead565b60405180910390a25050565b6002546001600160a01b031681565b60016006819055600755565b337fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda48585611254848383611dcf565b8686604051611267959493929190613e67565b60405180910390a250505050565b600a81565b60016007819055600655565b62013b0081565b619d8081565b60055481565b6000546001600160a01b031633146112c35760405162461bcd60e51b815260040161077190613b5d565b600180546001600160a01b038381166001600160a01b03198316179092556040519116907fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9906107e5908390859061395f565b6000546001600160a01b031633146113405760405162461bcd60e51b815260040161077190613c1d565b6008546001600160a01b0316156113695760405162461bcd60e51b815260040161077190613b4d565b600880546001600160a01b039687166001600160a01b0319918216179091556009805495909616941693909317909355600455600391909155600555565b6008546001600160a01b031681565b60075481565b6009546000906001600160a01b03166113e75760405162461bcd60e51b815260040161077190613c3d565b6006546114065760405162461bcd60e51b815260040161077190613b9d565b6005546009546001600160a01b031663782d6fe133611426436001611fe5565b6040518363ffffffff1660e01b8152600401611443929190613944565b60206040518083038186803b15801561145b57600080fd5b505afa15801561146f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506114939190810190612a88565b6001600160601b0316116114b95760405162461bcd60e51b815260040161077190613ccd565b845186511480156114cb575083518651145b80156114d8575082518651145b6114f45760405162461bcd60e51b815260040161077190613c0d565b85516115125760405162461bcd60e51b815260040161077190613c6d565b600a865111156115345760405162461bcd60e51b815260040161077190613c9d565b336000908152600b602052604090205480156115b157600061155582610def565b9050600181600781111561156557fe5b14156115835760405162461bcd60e51b815260040161077190613cbd565b600081600781111561159157fe5b14156115af5760405162461bcd60e51b815260040161077190613cad565b505b60006115bf43600354611fc0565b905060006115cf82600454611fc0565b60078054600101905590506115e261216c565b604051806101c001604052806007548152602001336001600160a01b03168152602001600081526020018b81526020018a815260200189815260200188815260200184815260200183815260200160008152602001600081526020016000815260200160001515815260200160001515815250905080600a6000836000015181526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506040820151816002015560608201518160030190805190602001906116cc9291906121e8565b50608082015180516116e891600484019160209091019061224d565b5060a08201518051611704916005840191602090910190612294565b5060c082015180516117209160068401916020909101906122ed565b5060e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b015561018082015181600c0160006101000a81548160ff0219169083151502179055506101a082015181600c0160016101000a81548160ff0219169083151502179055509050508060000151600b600083602001516001600160a01b03166001600160a01b03168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000151338c8c8c8c89898e60405161181199989796959493929190613d2b565b60405180910390a15193505050505b95945050505050565b600461183482610def565b600781111561183f57fe5b1461185c5760405162461bcd60e51b815260040161077190613c4d565b6000818152600a602090815260408083206008548251630d48571f60e31b815292519194936118b69342936001600160a01b0390931692636a42b8f892600480840193919291829003018186803b158015610f1457600080fd5b905060005b6003830154811015611a5e57611a568360030182815481106118d957fe5b6000918252602090912001546004850180546001600160a01b03909216918490811061190157fe5b906000526020600020015485600501848154811061191b57fe5b600091825260209182902001805460408051601f60026000196101006001871615020190941693909304928301859004850281018501909152818152928301828280156119a95780601f1061197e576101008083540402835291602001916119a9565b820191906000526020600020905b81548152906001019060200180831161198c57829003601f168201915b50505050508660060185815481106119bd57fe5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815292830182828015611a4b5780601f10611a2057610100808354040283529160200191611a4b565b820191906000526020600020905b815481529060010190602001808311611a2e57829003601f168201915b50505050508661200d565b6001016118bb565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290611a989085908490613e59565b60405180910390a1505050565b60405161094c906138ef565b611ab9612346565b506000828152600a602090815260408083206001600160a01b0385168452600d018252918290208251606081018452905460ff8082161515835261010082041692820192909252620100009091046001600160601b0316918101919091525b92915050565b6001546001600160a01b031633148015611b3757503315155b611b535760405162461bcd60e51b815260040161077190613c7d565b60008054600180546001600160a01b038082166001600160a01b03198086168217968790559092169092556040519282169390927ff9ffabca9c8276e99321725bcb43fb076a6c66a54b7f21c4e8146d8519b417dc92611bb792869291169061395f565b60405180910390a16001546040517fca4f2f25d0898edd99413412fb94012f9e54ec8142f9b093e7720646a95b16a9916107e59184916001600160a01b03169061395f565b6000546001600160a01b031681565b60065481565b6005611c1c82610def565b6007811115611c2757fe5b14611c445760405162461bcd60e51b815260040161077190613bed565b6000818152600a60205260408120600c8101805461ff001916610100179055905b6003820154811015611d9a576008546004830180546001600160a01b0390921691630825f38f919084908110611c9757fe5b9060005260206000200154846003018481548110611cb157fe5b6000918252602090912001546004860180546001600160a01b039092169186908110611cd957fe5b9060005260206000200154866005018681548110611cf357fe5b90600052602060002001876006018781548110611d0c57fe5b9060005260206000200188600201546040518763ffffffff1660e01b8152600401611d3b9594939291906139e2565b6000604051808303818588803b158015611d5457600080fd5b505af1158015611d68573d6000803e3d6000fd5b50505050506040513d6000823e601f3d908101601f19168201604052611d91919081019061291d565b50600101611c65565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f826040516107e59190613a70565b465b90565b60006001611ddc84610def565b6007811115611de757fe5b14611e045760405162461bcd60e51b815260040161077190613bbd565b60028260ff161115611e285760405162461bcd60e51b815260040161077190613b3d565b6000838152600a602090815260408083206001600160a01b0388168452600d8101909252909120805460ff1615611e715760405162461bcd60e51b815260040161077190613bcd565b600954600783015460405163782d6fe160e01b81526000926001600160a01b03169163782d6fe191611ea7918b9160040161397a565b60206040518083038186803b158015611ebf57600080fd5b505afa158015611ed3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611ef79190810190612a88565b905060ff8516611f2257611f1883600a0154826001600160601b0316611fc0565b600a840155611f78565b8460ff1660011415611f4f57611f458360090154826001600160601b0316611fc0565b6009840155611f78565b8460ff1660021415611f7857611f7283600b0154826001600160601b0316611fc0565b600b8401555b8154600160ff199091161761ff00191661010060ff871602176dffffffffffffffffffffffff00001916620100006001600160601b03831602179091559150505b9392505050565b600082820183811015611fb95760405162461bcd60e51b815260040161077190613c5d565b6000828211156120075760405162461bcd60e51b815260040161077190613d0d565b50900390565b6008546040516001600160a01b039091169063f2b065379061203b9088908890889088908890602001613988565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b815260040161206d9190613a70565b60206040518083038186803b15801561208557600080fd5b505afa158015612099573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506120bd91908101906128e1565b156120da5760405162461bcd60e51b815260040161077190613b6d565b600854604051633a66f90160e01b81526001600160a01b0390911690633a66f901906121129088908890889088908890600401613988565b602060405180830381600087803b15801561212c57600080fd5b505af1158015612140573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061216491908101906128ff565b505050505050565b604051806101c001604052806000815260200160006001600160a01b03168152602001600081526020016060815260200160608152602001606081526020016060815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b82805482825590600052602060002090810192821561223d579160200282015b8281111561223d57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190612208565b50612249929150612366565b5090565b828054828255906000526020600020908101928215612288579160200282015b8281111561228857825182559160200191906001019061226d565b5061224992915061238a565b8280548282559060005260206000209081019282156122e1579160200282015b828111156122e157825180516122d19184916020909101906123a4565b50916020019190600101906122b4565b50612249929150612411565b82805482825590600052602060002090810192821561233a579160200282015b8281111561233a578251805161232a9184916020909101906123a4565b509160200191906001019061230d565b50612249929150612434565b604080516060810182526000808252602082018190529181019190915290565b611dcc91905b808211156122495780546001600160a01b031916815560010161236c565b611dcc91905b808211156122495760008155600101612390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106123e557805160ff1916838001178555612288565b82800160010185558215612288579182018281111561228857825182559160200191906001019061226d565b611dcc91905b8082111561224957600061242b8282612457565b50600101612417565b611dcc91905b8082111561224957600061244e8282612457565b5060010161243a565b50805460018160011615610100020316600290046000825580601f1061247d575061249b565b601f01602090049060005260206000209081019061249b919061238a565b50565b8035611b1881614021565b600082601f8301126124ba57600080fd5b81356124cd6124c882613f0d565b613ee6565b915081818352602084019350602081019050838560208402820111156124f257600080fd5b60005b8381101561251e5781612508888261249e565b84525060209283019291909101906001016124f5565b5050505092915050565b600082601f83011261253957600080fd5b81356125476124c882613f0d565b81815260209384019390925082018360005b8381101561251e578135860161256f8882612673565b8452506020928301929190910190600101612559565b600082601f83011261259657600080fd5b81356125a46124c882613f0d565b81815260209384019390925082018360005b8381101561251e57813586016125cc8882612673565b84525060209283019291909101906001016125b6565b600082601f8301126125f357600080fd5b81356126016124c882613f0d565b9150818183526020840193506020810190508385602084028201111561262657600080fd5b60005b8381101561251e578161263c888261265d565b8452506020928301929190910190600101612629565b8051611b1881614035565b8035611b188161403e565b8051611b188161403e565b600082601f83011261268457600080fd5b81356126926124c882613f2e565b915080825260208301602083018583830111156126ae57600080fd5b6126b9838284613fd5565b50505092915050565b600082601f8301126126d357600080fd5b81516126e16124c882613f2e565b915080825260208301602083018583830111156126fd57600080fd5b6126b9838284613fe1565b60008083601f84011261271a57600080fd5b50813567ffffffffffffffff81111561273257600080fd5b60208301915083600182028301111561274a57600080fd5b9250929050565b8035611b1881614047565b8051611b1881614050565b60006020828403121561277957600080fd5b6000612785848461249e565b949350505050565b600080600080600060a086880312156127a557600080fd5b60006127b1888861249e565b95505060206127c28882890161249e565b94505060406127d38882890161265d565b93505060606127e48882890161265d565b92505060806127f58882890161265d565b9150509295509295909350565b600080600080600060a0868803121561281a57600080fd5b853567ffffffffffffffff81111561283157600080fd5b61283d888289016124a9565b955050602086013567ffffffffffffffff81111561285a57600080fd5b612866888289016125e2565b945050604086013567ffffffffffffffff81111561288357600080fd5b61288f88828901612585565b935050606086013567ffffffffffffffff8111156128ac57600080fd5b6128b888828901612528565b925050608086013567ffffffffffffffff8111156128d557600080fd5b6127f588828901612673565b6000602082840312156128f357600080fd5b60006127858484612652565b60006020828403121561291157600080fd5b60006127858484612668565b60006020828403121561292f57600080fd5b815167ffffffffffffffff81111561294657600080fd5b612785848285016126c2565b60006020828403121561296457600080fd5b6000612785848461265d565b6000806040838503121561298357600080fd5b600061298f858561265d565b92505060206129a08582860161249e565b9150509250929050565b600080604083850312156129bd57600080fd5b60006129c9858561265d565b92505060206129a085828601612751565b600080600080606085870312156129f057600080fd5b60006129fc878761265d565b9450506020612a0d87828801612751565b935050604085013567ffffffffffffffff811115612a2a57600080fd5b612a3687828801612708565b95989497509550505050565b600080600080600060a08688031215612a5a57600080fd5b6000612a66888861265d565b9550506020612a7788828901612751565b94505060406127d388828901612751565b600060208284031215612a9a57600080fd5b6000612785848461275c565b6000612ab28383612ae1565b505060200190565b6000611fb98383612c83565b6000612ab28383612c69565b612adb81613fad565b82525050565b612adb81613f75565b6000612af582613f68565b612aff8185613f6c565b9350612b0a83613f56565b8060005b83811015612b38578151612b228882612aa6565b9750612b2d83613f56565b925050600101612b0e565b509495945050505050565b6000612b4e82613f68565b612b588185613f6c565b935083602082028501612b6a85613f56565b8060005b85811015612ba45784840389528151612b878582612aba565b9450612b9283613f56565b60209a909a0199925050600101612b6e565b5091979650505050505050565b6000612bbc82613f68565b612bc68185613f6c565b935083602082028501612bd885613f56565b8060005b85811015612ba45784840389528151612bf58582612aba565b9450612c0083613f56565b60209a909a0199925050600101612bdc565b6000612c1d82613f68565b612c278185613f6c565b9350612c3283613f56565b8060005b83811015612b38578151612c4a8882612ac6565b9750612c5583613f56565b925050600101612c36565b612adb81613f80565b612adb81611dcc565b612adb612c7e82611dcc565b611dcc565b6000612c8e82613f68565b612c988185613f6c565b9350612ca8818560208601613fe1565b612cb18161400d565b9093019392505050565b600081546001811660008114612cd85760018114612cfe57612d3d565b607f6002830416612ce98187613f6c565b60ff1984168152955050602085019250612d3d565b60028204612d0c8187613f6c565b9550612d1785613f5c565b60005b82811015612d3657815488820152600190910190602001612d1a565b8701945050505b505092915050565b612adb81613fb4565b612adb81613fbf565b6000612d638385613f6c565b9350612d70838584613fd5565b612cb18361400d565b6000612d86603283613f6c565b7f476f7665726e6f72427261766f3a3a63617374566f7465496e7465726e616c3a81527120696e76616c696420766f7465207479706560701b602082015260400192915050565b6000612dda602883610f67565b7f42616c6c6f742875696e743235362070726f706f73616c49642c75696e743820815267737570706f72742960c01b602082015260280192915050565b6000612e24603383613f6c565b7f476f7665726e6f72427261766f3a3a696e697469616c697a653a2063616e206f8152726e6c7920696e697469616c697a65206f6e636560681b602082015260400192915050565b6000612e79602a83613f6c565b7f476f7665726e6f72427261766f3a5f73657450656e64696e6741646d696e3a2081526961646d696e206f6e6c7960b01b602082015260400192915050565b6000612ec5605583613f6c565b7f476f7665726e6f72427261766f3a3a71756575654f72526576657274496e746581527f726e616c3a206964656e746963616c2070726f706f73616c20616374696f6e20602082015274616c7265616479207175657565642061742065746160581b604082015260600192915050565b6000612f42602b83613f6c565b7f476f7665726e6f72427261766f3a3a5f736574566f74696e67506572696f643a81526a2061646d696e206f6e6c7960a81b602082015260400192915050565b6000612f8f602a83613f6c565b7f476f7665726e6f72427261766f3a3a5f736574566f74696e6744656c61793a2081526961646d696e206f6e6c7960b01b602082015260400192915050565b6000612fdb603183613f6c565b7f476f7665726e6f72427261766f3a3a70726f706f73653a20476f7665726e6f7281527020427261766f206e6f742061637469766560781b602082015260400192915050565b600061302e600283610f67565b61190160f01b815260020192915050565b600061304c603683613f6c565b7f476f7665726e6f72427261766f3a3a5f736574566f74696e67506572696f643a815275081a5b9d985b1a59081d9bdd1a5b99c81c195c9a5bd960521b602082015260400192915050565b60006130a4603183613f6c565b7f476f7665726e6f72427261766f3a3a63617374566f7465496e7465726e616c3a815270081d9bdd1a5b99c81a5cc818db1bdcd959607a1b602082015260400192915050565b60006130f7603483613f6c565b7f476f7665726e6f72427261766f3a3a63617374566f7465496e7465726e616c3a815273081d9bdd195c88185b1c9958591e481d9bdd195960621b602082015260400192915050565b600061314d603483613f6c565b7f476f7665726e6f72427261766f3a3a5f736574566f74696e6744656c61793a20815273696e76616c696420766f74696e672064656c617960601b602082015260400192915050565b60006131a3604583613f6c565b7f476f7665726e6f72427261766f3a3a657865637574653a2070726f706f73616c81527f2063616e206f6e6c7920626520657865637574656420696620697420697320716020820152641d595d595960da1b604082015260600192915050565b6000613210602f83613f6c565b7f476f7665726e6f72427261766f3a3a63617374566f746542795369673a20696e81526e76616c6964207369676e617475726560881b602082015260400192915050565b6000613261604483613f6c565b7f476f7665726e6f72427261766f3a3a70726f706f73653a2070726f706f73616c81527f2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d6020820152630c2e8c6d60e31b604082015260600192915050565b60006132cd602583613f6c565b7f476f7665726e6f72427261766f3a3a696e697469616c697a653a2061646d696e815264206f6e6c7960d81b602082015260400192915050565b6000613314604083613f6c565b7f476f7665726e6f72427261766f3a3a5f73657450726f706f73616c546872657381527f686f6c643a20696e76616c69642070726f706f73616c207468726573686f6c64602082015260400192915050565b6000613373603683613f6c565b7f476f7665726e6f72427261766f3a3a70726f706f73653a20476f7665726e6f7281527508109c985d9bc81b9bdd081a5b9a5d1a585b1a5e995960521b602082015260400192915050565b60006133cb604483613f6c565b7f476f7665726e6f72427261766f3a3a71756575653a2070726f706f73616c206381527f616e206f6e6c79206265207175657565642069662069742069732073756363656020820152631959195960e21b604082015260600192915050565b6000613437601183613f6c565b706164646974696f6e206f766572666c6f7760781b815260200192915050565b6000613464604383610f67565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201526263742960e81b604082015260430192915050565b60006134cf602c83613f6c565b7f476f7665726e6f72427261766f3a3a70726f706f73653a206d7573742070726f81526b7669646520616374696f6e7360a01b602082015260400192915050565b600061351d602e83613f6c565b7f476f7665726e6f72427261766f3a5f61636365707441646d696e3a2070656e6481526d696e672061646d696e206f6e6c7960901b602082015260400192915050565b600061356d602f83613f6c565b7f476f7665726e6f72427261766f3a3a63616e63656c3a2070726f706f7365722081526e18589bdd99481d1a1c995cda1bdb19608a1b602082015260400192915050565b60006135be602883613f6c565b7f476f7665726e6f72427261766f3a3a70726f706f73653a20746f6f206d616e7981526720616374696f6e7360c01b602082015260400192915050565b6000613608605983613f6c565b7f476f7665726e6f72427261766f3a3a70726f706f73653a206f6e65206c69766581527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208201527f20616c72656164792070656e64696e672070726f706f73616c00000000000000604082015260600192915050565b600061368d605883613f6c565b7f476f7665726e6f72427261766f3a3a70726f706f73653a206f6e65206c69766581527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208201527f20616c7265616479206163746976652070726f706f73616c0000000000000000604082015260600192915050565b6000611b18600083613f6c565b600061371f603f83613f6c565b7f476f7665726e6f72427261766f3a3a70726f706f73653a2070726f706f73657281527f20766f7465732062656c6f772070726f706f73616c207468726573686f6c6400602082015260400192915050565b600061377e603683613f6c565b7f476f7665726e6f72427261766f3a3a63616e63656c3a2063616e6e6f742063618152751b98d95b08195e1958dd5d1959081c1c9bdc1bdcd85b60521b602082015260400192915050565b60006137d6603083613f6c565b7f476f7665726e6f72427261766f3a3a5f73657450726f706f73616c546872657381526f686f6c643a2061646d696e206f6e6c7960801b602082015260400192915050565b6000613828602983613f6c565b7f476f7665726e6f72427261766f3a3a73746174653a20696e76616c69642070728152681bdc1bdcd85b081a5960ba1b602082015260400192915050565b6000613873601583613f6c565b747375627472616374696f6e20756e646572666c6f7760581b815260200192915050565b805160608301906138a88482612c60565b5060208201516138bb60208501826138d4565b5060408201516138ce60408501826138e6565b50505050565b612adb81613f9b565b612adb81613fca565b612adb81613fa1565b6000611b1882612dcd565b600061390582613021565b91506139118285612c72565b6020820191506139218284612c72565b5060200192915050565b6000611b1882613457565b60208101611b188284612ae1565b604081016139528285612ad2565b611fb96020830184612c69565b6040810161396d8285612ae1565b611fb96020830184612ae1565b604081016139528285612ae1565b60a081016139968288612ae1565b6139a36020830187612c69565b81810360408301526139b58186612c83565b905081810360608301526139c98185612c83565b90506139d86080830184612c69565b9695505050505050565b60a081016139f08288612ae1565b6139fd6020830187612c69565b8181036040830152613a0f8186612cbb565b905081810360608301526139c98185612cbb565b60808082528101613a348187612aea565b90508181036020830152613a488186612c12565b90508181036040830152613a5c8185612bb1565b905081810360608301526139d88184612b43565b60208101611b188284612c69565b60808101613a8c8287612c69565b613a996020830186612c69565b613aa66040830185612c69565b6118206060830184612ae1565b60608101613ac18286612c69565b613ace6020830185612c69565b61278560408301846138d4565b60808101613ae98287612c69565b613af660208301866138d4565b613b036040830185612c69565b6118206060830184612c69565b60208101611b188284612d45565b60208101611b188284612d4e565b60208082528101611fb98184612c83565b60208082528101611b1881612d79565b60208082528101611b1881612e17565b60208082528101611b1881612e6c565b60208082528101611b1881612eb8565b60208082528101611b1881612f35565b60208082528101611b1881612f82565b60208082528101611b1881612fce565b60208082528101611b188161303f565b60208082528101611b1881613097565b60208082528101611b18816130ea565b60208082528101611b1881613140565b60208082528101611b1881613196565b60208082528101611b1881613203565b60208082528101611b1881613254565b60208082528101611b18816132c0565b60208082528101611b1881613307565b60208082528101611b1881613366565b60208082528101611b18816133be565b60208082528101611b188161342a565b60208082528101611b18816134c2565b60208082528101611b1881613510565b60208082528101611b1881613560565b60208082528101611b18816135b1565b60208082528101611b18816135fb565b60208082528101611b1881613680565b60208082528101611b1881613712565b60208082528101611b1881613771565b60208082528101611b18816137c9565b60208082528101611b188161381b565b60208082528101611b1881613866565b60608101611b188284613897565b6101208101613d3a828c612c69565b613d47602083018b612ad2565b8181036040830152613d59818a612aea565b90508181036060830152613d6d8189612c12565b90508181036080830152613d818188612bb1565b905081810360a0830152613d958187612b43565b9050613da460c0830186612c69565b613db160e0830185612c69565b818103610100830152613dc48184612c83565b9b9a5050505050505050505050565b6101408101613de2828d612c69565b613def602083018c612ae1565b613dfc604083018b612c69565b613e09606083018a612c69565b613e166080830189612c69565b613e2360a0830188612c69565b613e3060c0830187612c69565b613e3d60e0830186612c69565b613e4b610100830185612c60565b613dc4610120830184612c60565b604081016139528285612c69565b60808101613e758288612c69565b613e8260208301876138d4565b613e8f60408301866138dd565b8181036060830152613ea2818486612d57565b979650505050505050565b60808101613ebb8286612c69565b613ec860208301856138d4565b613ed560408301846138dd565b818103606083015261182081613705565b60405181810167ffffffffffffffff81118282101715613f0557600080fd5b604052919050565b600067ffffffffffffffff821115613f2457600080fd5b5060209081020190565b600067ffffffffffffffff821115613f4557600080fd5b506020601f91909101601f19160190565b60200190565b60009081526020902090565b5190565b90815260200190565b6000611b1882613f8f565b151590565b80610f6781614017565b6001600160a01b031690565b60ff1690565b6001600160601b031690565b6000611b18825b6000611b1882613f75565b6000611b1882613f85565b6000611b1882613fa1565b82818337506000910152565b60005b83811015613ffc578181015183820152602001613fe4565b838111156138ce5750506000910152565b601f01601f191690565b6008811061249b57fe5b61402a81613f75565b811461249b57600080fd5b61402a81613f80565b61402a81611dcc565b61402a81613f9b565b61402a81613fa156fea365627a7a72315820ef5e2dc3fef3449c73d169564d711e895c3d1a7fd4996a7236278d72a7f82eb86c6578706572696d656e74616cf564736f6c63430005100040"; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorCompatibilityBravo__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorCompatibilityBravo__factory.ts new file mode 100644 index 00000000000..44801ad7931 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorCompatibilityBravo__factory.ts @@ -0,0 +1,891 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { GovernorCompatibilityBravo } from "../GovernorCompatibilityBravo"; + +export class GovernorCompatibilityBravo__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorCompatibilityBravo { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernorCompatibilityBravo; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "cancel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "execute", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getActions", + outputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "getReceipt", + outputs: [ + { + components: [ + { + internalType: "bool", + name: "hasVoted", + type: "bool", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint96", + name: "votes", + type: "uint96", + }, + ], + internalType: "struct IGovernorCompatibilityBravo.Receipt", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalEta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposals", + outputs: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "proposer", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + { + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "abstainVotes", + type: "uint256", + }, + { + internalType: "bool", + name: "canceled", + type: "bool", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "queue", + outputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "queue", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "quorumVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "timelock", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorCountingSimple__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorCountingSimple__factory.ts new file mode 100644 index 00000000000..4091224ebaa --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorCountingSimple__factory.ts @@ -0,0 +1,592 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { GovernorCountingSimple } from "../GovernorCountingSimple"; + +export class GovernorCountingSimple__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorCountingSimple { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernorCountingSimple; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalVotes", + outputs: [ + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "abstainVotes", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorMock__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorMock__factory.ts new file mode 100644 index 00000000000..4e79cf3b843 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorMock__factory.ts @@ -0,0 +1,925 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GovernorMock } from "../GovernorMock"; + +export class GovernorMock__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + name_: string, + token_: string, + votingDelay_: BigNumberish, + votingPeriod_: BigNumberish, + timelock_: string, + quorumNumerator_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + name_, + token_, + votingDelay_, + votingPeriod_, + timelock_, + quorumNumerator_, + proposalThreshold_, + overrides || {} + ) as Promise; + } + getDeployTransaction( + name_: string, + token_: string, + votingDelay_: BigNumberish, + votingPeriod_: BigNumberish, + timelock_: string, + quorumNumerator_: BigNumberish, + proposalThreshold_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + name_, + token_, + votingDelay_, + votingPeriod_, + timelock_, + quorumNumerator_, + proposalThreshold_, + overrides || {} + ); + } + attach(address: string): GovernorMock { + return super.attach(address) as GovernorMock; + } + connect(signer: Signer): GovernorMock__factory { + return super.connect(signer) as GovernorMock__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorMock { + return new Contract(address, _abi, signerOrProvider) as GovernorMock; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "string", + name: "name_", + type: "string", + }, + { + internalType: "contract ERC20Votes", + name: "token_", + type: "address", + }, + { + internalType: "uint256", + name: "votingDelay_", + type: "uint256", + }, + { + internalType: "uint256", + name: "votingPeriod_", + type: "uint256", + }, + { + internalType: "contract TimelockController", + name: "timelock_", + type: "address", + }, + { + internalType: "uint256", + name: "quorumNumerator_", + type: "uint256", + }, + { + internalType: "uint256", + name: "proposalThreshold_", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldQuorumNumerator", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newQuorumNumerator", + type: "uint256", + }, + ], + name: "QuorumNumeratorUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldTimelock", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newTimelock", + type: "address", + }, + ], + name: "TimelockChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "cancel", + outputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalEta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalVotes", + outputs: [ + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "abstainVotes", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "queue", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "quorumDenominator", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "quorumNumerator", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "timelock", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract ERC20Votes", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "newQuorumNumerator", + type: "uint256", + }, + ], + name: "updateQuorumNumerator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract TimelockController", + name: "newTimelock", + type: "address", + }, + ], + name: "updateTimelock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x6101a06040523480156200001257600080fd5b506040516200305138038062003051833981016040819052620000359162000332565b8186848980620000596040805180820190915260018152603160f81b602082015290565b815160209283012081519183019190912060c082815260e08290524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301979097526060810195909552608080860193909352308583015280518086039092018252939092019092528051908401209052610100528151620000f391600091908401906200026f565b506200010190508162000139565b5060601b6001600160601b031916610120526200011e81620001a2565b50610140949094525050610160526101805250620004a99050565b600254604080516001600160a01b03928316815291831660208301527f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b60648111156200022a5760405162461bcd60e51b815260206004820152604360248201527f476f7665726e6f72566f74657351756f72756d4672616374696f6e3a2071756f60448201527f72756d4e756d657261746f72206f7665722071756f72756d44656e6f6d696e616064820152623a37b960e91b608482015260a40160405180910390fd5b600480549082905560408051828152602081018490527f0553476bf02ef2726e8ce5ced78d63e26e602e4a2257b1f559418e24b4633997910160405180910390a15050565b8280546200027d9062000456565b90600052602060002090601f016020900481019282620002a15760008555620002ec565b82601f10620002bc57805160ff1916838001178555620002ec565b82800160010185558215620002ec579182015b82811115620002ec578251825591602001919060010190620002cf565b50620002fa929150620002fe565b5090565b5b80821115620002fa5760008155600101620002ff565b80516001600160a01b03811681146200032d57600080fd5b919050565b600080600080600080600060e0888a0312156200034d578283fd5b87516001600160401b038082111562000364578485fd5b818a0191508a601f83011262000378578485fd5b8151818111156200038d576200038d62000493565b604051601f8201601f19908116603f01168101908382118183101715620003b857620003b862000493565b81604052828152602093508d84848701011115620003d4578788fd5b8791505b82821015620003f75784820184015181830185015290830190620003d8565b828211156200040857878484830101525b9a506200041a9150508a820162000315565b9750505060408801519450606088015193506200043a6080890162000315565b925060a0880151915060c0880151905092959891949750929550565b600181811c908216806200046b57607f821691505b602082108114156200048d57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b60805160a05160c05160e051610100516101205160601c610140516101605161018051612b11620005406000396000818161051c015261117b0152600081816102160152611d860152600081816102ea0152611d4601526000818161067e015281816112c70152611360015260006114f5015260006115440152600061151f015260006114a3015260006114cc0152612b116000f3fe6080604052600436106101cd5760003560e01c80637b3c71d3116100f7578063c01f9e3711610095578063deaaa7cc11610064578063deaaa7cc146105f8578063eb9019d41461062c578063f8ce560a1461064c578063fc0c546a1461066c57600080fd5b8063c01f9e3714610540578063c59057e414610560578063d33219b414610580578063dd4e2ba5146105b257600080fd5b8063a7713a70116100d1578063a7713a70146104b8578063a890c910146104cd578063ab58fb8e146104ed578063b58131b01461050d57600080fd5b80637b3c71d3146104645780637d5e81e21461048457806397c3d334146104a457600080fd5b80633932abb11161016f578063452115d61161013e578063452115d6146103a5578063544ffc9c146103c557806354fd4d501461041a578063567813881461044457600080fd5b80633932abb1146102db5780633bccf4fd1461030e5780633e4f49e61461032e578063438596321461035b57600080fd5b806306fdde03116101ab57806306fdde0314610266578063160cbed7146102885780632656227d146102a85780632d63f693146102bb57600080fd5b806301ffc9a7146101d257806302a251a31461020757806306f3f9e614610244575b600080fd5b3480156101de57600080fd5b506101f26101ed366004612420565b6106a0565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b507f00000000000000000000000000000000000000000000000000000000000000005b6040519081526020016101fe565b34801561025057600080fd5b5061026461025f366004612464565b6106b1565b005b34801561027257600080fd5b5061027b610725565b6040516101fe91906127ce565b34801561029457600080fd5b506102366102a33660046122a3565b6107b7565b6102366102b63660046122a3565b6109e4565b3480156102c757600080fd5b506102366102d6366004612464565b610ad3565b3480156102e757600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610236565b34801561031a57600080fd5b50610236610329366004612557565b610b0a565b34801561033a57600080fd5b5061034e610349366004612464565b610b9e565b6040516101fe91906127a6565b34801561036757600080fd5b506101f261037636600461247c565b60008281526005602090815260408083206001600160a01b038516845260030190915290205460ff1692915050565b3480156103b157600080fd5b506102366103c03660046122a3565b610ba9565b3480156103d157600080fd5b506103ff6103e0366004612464565b6000908152600560205260409020805460018201546002909201549092565b604080519384526020840192909252908201526060016101fe565b34801561042657600080fd5b506040805180820190915260018152603160f81b602082015261027b565b34801561045057600080fd5b5061023661045f3660046124ab565b610bc0565b34801561047057600080fd5b5061023661047f3660046124d6565b610be9565b34801561049057600080fd5b5061023661049f36600461232e565b610c3b565b3480156104b057600080fd5b506064610236565b3480156104c457600080fd5b50600454610236565b3480156104d957600080fd5b506102646104e8366004612448565b610c49565b3480156104f957600080fd5b50610236610508366004612464565b610cb5565b34801561051957600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610236565b34801561054c57600080fd5b5061023661055b366004612464565b610d5f565b34801561056c57600080fd5b5061023661057b3660046122a3565b610d8e565b34801561058c57600080fd5b506002546001600160a01b03165b6040516001600160a01b0390911681526020016101fe565b3480156105be57600080fd5b506040805180820190915260208082527f737570706f72743d627261766f2671756f72756d3d666f722c6162737461696e9082015261027b565b34801561060457600080fd5b506102367f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f81565b34801561063857600080fd5b50610236610647366004612278565b610dc8565b34801561065857600080fd5b50610236610667366004612464565b610dd4565b34801561067857600080fd5b5061059a7f000000000000000000000000000000000000000000000000000000000000000081565b60006106ab82610ddf565b92915050565b6106b9610e04565b6001600160a01b0316336001600160a01b0316146107195760405162461bcd60e51b8152602060048201526018602482015277476f7665726e6f723a206f6e6c79476f7665726e616e636560401b60448201526064015b60405180910390fd5b61072281610e1d565b50565b60606000805461073490612a65565b80601f016020809104026020016040519081016040528092919081815260200182805461076090612a65565b80156107ad5780601f10610782576101008083540402835291602001916107ad565b820191906000526020600020905b81548152906001019060200180831161079057829003601f168201915b5050505050905090565b6000806107c686868686610d8e565b905060046107d382610b9e565b60078111156107f257634e487b7160e01b600052602160045260246000fd5b1461080f5760405162461bcd60e51b815260040161071090612822565b6002546040805163793d064960e11b815290516000926001600160a01b03169163f27a0c92916004808301926020929190829003018186803b15801561085457600080fd5b505afa158015610868573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061088c9190612408565b60025460405163b1c5f42760e01b81529192506001600160a01b03169063b1c5f427906108c6908a908a908a906000908b90600401612700565b60206040518083038186803b1580156108de57600080fd5b505afa1580156108f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109169190612408565b6000838152600360205260408082209290925560025491516308f2a0bb60e41b81526001600160a01b0390921691638f2a0bb091610961918b918b918b91908b90899060040161274e565b600060405180830381600087803b15801561097b57600080fd5b505af115801561098f573d6000803e3d6000fd5b505050507f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda28928282426109c191906129cc565b604080519283526020830191909152015b60405180910390a15095945050505050565b6000806109f386868686610d8e565b90506000610a0082610b9e565b90506004816007811115610a2457634e487b7160e01b600052602160045260246000fd5b1480610a4f57506005816007811115610a4d57634e487b7160e01b600052602160045260246000fd5b145b610a6b5760405162461bcd60e51b815260040161071090612822565b600082815260016020818152604092839020600201805460ff191690921790915590518381527f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f910160405180910390a1610ac98288888888610ee5565b5095945050505050565b60008181526001602090815260408083208151928301909152546001600160401b0316908190525b6001600160401b031692915050565b604080517f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f602082015290810186905260ff851660608201526000908190610b7690610b6e9060800160405160208183030381529060405280519060200120610ef9565b868686610f47565b9050610b9387828860405180602001604052806000815250610f65565b979650505050505050565b60006106ab8261107e565b6000610bb785858585611169565b95945050505050565b600080339050610be184828560405180602001604052806000815250610f65565b949350505050565b600080339050610c3186828787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250610f6592505050565b9695505050505050565b6000610bb785858585611177565b610c51610e04565b6001600160a01b0316336001600160a01b031614610cac5760405162461bcd60e51b8152602060048201526018602482015277476f7665726e6f723a206f6e6c79476f7665726e616e636560401b6044820152606401610710565b61072281611235565b60025460008281526003602052604080822054905163d45c443560e01b81526004810191909152909182916001600160a01b039091169063d45c44359060240160206040518083038186803b158015610d0d57600080fd5b505afa158015610d21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d459190612408565b905080600114610d555780610d58565b60005b9392505050565b60008181526001602081815260408084208151928301909152909101546001600160401b031690819052610afb565b600084848484604051602001610da794939291906126b5565b60408051601f19818403018152919052805160209091012095945050505050565b6000610d58838361129e565b60006106ab82611343565b60006001600160e01b03198216636e665ced60e01b14806106ab57506106ab826113f6565b6000610e186002546001600160a01b031690565b905090565b6064811115610ea05760405162461bcd60e51b815260206004820152604360248201527f476f7665726e6f72566f74657351756f72756d4672616374696f6e3a2071756f60448201527f72756d4e756d657261746f72206f7665722071756f72756d44656e6f6d696e616064820152623a37b960e91b608482015260a401610710565b600480549082905560408051828152602081018490527f0553476bf02ef2726e8ce5ced78d63e26e602e4a2257b1f559418e24b4633997910160405180910390a15050565b610ef2858585858561142b565b5050505050565b60006106ab610f0661149f565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b6000806000610f5887878787611592565b91509150610ac98161167f565b6000848152600160208190526040822090610f7f87610b9e565b6007811115610f9e57634e487b7160e01b600052602160045260246000fd5b14610ff75760405162461bcd60e51b815260206004820152602360248201527f476f7665726e6f723a20766f7465206e6f742063757272656e746c792061637460448201526269766560e81b6064820152608401610710565b604080516020810190915281546001600160401b03169081905260009061101f908790610dc8565b905061102d87878784611880565b856001600160a01b03167fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda48887848860405161106c9493929190612951565b60405180910390a29695505050505050565b60008061108a836119ff565b905060048160078111156110ae57634e487b7160e01b600052602160045260246000fd5b146110b95792915050565b600083815260036020526040902054806110d4575092915050565b600254604051632ab0f52960e01b8152600481018390526001600160a01b0390911690632ab0f5299060240160206040518083038186803b15801561111857600080fd5b505afa15801561112c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115091906123e8565b1561115f575060079392505050565b5060059392505050565b6000610bb785858585611b62565b60007f00000000000000000000000000000000000000000000000000000000000000006111a933610647600143612a4e565b10156112295760405162461bcd60e51b815260206004820152604360248201527f476f7665726e6f72436f6d7061746962696c697479427261766f3a2070726f7060448201527f6f73657220766f7465732062656c6f772070726f706f73616c207468726573686064820152621bdb1960ea1b608482015260a401610710565b610bb785858585611c14565b600254604080516001600160a01b03928316815291831660208301527f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401910160405180910390a1600280546001600160a01b0319166001600160a01b0392909216919091179055565b604051630748d63560e31b81526001600160a01b038381166004830152602482018390526000917f000000000000000000000000000000000000000000000000000000000000000090911690633a46b1a89060440160206040518083038186803b15801561130b57600080fd5b505afa15801561131f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d589190612408565b60006064600454604051632394e7a360e21b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690638e539e8c9060240160206040518083038186803b1580156113aa57600080fd5b505afa1580156113be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113e29190612408565b6113ec9190612a2f565b6106ab9190612a0f565b60006001600160e01b0319821663bf26d89760e01b14806106ab57506301ffc9a760e01b6001600160e01b03198316146106ab565b60025460405163e38335e560e01b81526001600160a01b039091169063e38335e5903490611466908890889088906000908990600401612700565b6000604051808303818588803b15801561147f57600080fd5b505af1158015611493573d6000803e3d6000fd5b50505050505050505050565b60007f00000000000000000000000000000000000000000000000000000000000000004614156114ee57507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156115c95750600090506003611676565b8460ff16601b141580156115e157508460ff16601c14155b156115f25750600090506004611676565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611646573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661166f57600060019250925050611676565b9150600090505b94509492505050565b60008160048111156116a157634e487b7160e01b600052602160045260246000fd5b14156116aa5750565b60018160048111156116cc57634e487b7160e01b600052602160045260246000fd5b141561171a5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610710565b600281600481111561173c57634e487b7160e01b600052602160045260246000fd5b141561178a5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610710565b60038160048111156117ac57634e487b7160e01b600052602160045260246000fd5b14156118055760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610710565b600481600481111561182757634e487b7160e01b600052602160045260246000fd5b14156107225760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610710565b60008481526005602090815260408083206001600160a01b0387168452600381019092529091205460ff16156119085760405162461bcd60e51b815260206004820152602760248201527f476f7665726e6f72566f74696e6753696d706c653a20766f746520616c726561604482015266191e4818d85cdd60ca1b6064820152608401610710565b6001600160a01b03841660009081526003820160205260408120805460ff1916600117905560ff168360ff161415611959578181600001600082825461194e91906129cc565b90915550610ef29050565b60ff831660011415611979578181600101600082825461194e91906129cc565b60ff831660021415611999578181600201600082825461194e91906129cc565b60405162461bcd60e51b815260206004820152603560248201527f476f7665726e6f72566f74696e6753696d706c653a20696e76616c69642076616044820152746c756520666f7220656e756d20566f74655479706560581b6064820152608401610710565b6000818152600160208181526040808420815160a08101835281546001600160401b0390811660808301908152825283518086018552958301541685529283019390935260029092015460ff80821615801594840194909452610100909104161515606082015290611a745750600792915050565b806060015115611a875750600292915050565b805151436001600160401b039091161115611aa55750600092915050565b602081015151436001600160401b039091161115611ac65750600192915050565b611ad38160200151611e9c565b15611b1457611ae183611ecb565b8015611b00575060008381526005602052604090208054600190910154115b611b0b576003610d58565b60049392505050565b60405162461bcd60e51b815260206004820152601d60248201527f476f7665726e6f723a20756e6b6e6f776e2070726f706f73616c2069640000006044820152606401610710565b50919050565b600080611b7186868686611f02565b60008181526003602052604090205490915015610bb7576002546000828152600360205260409081902054905163c4d252f560e01b81526001600160a01b039092169163c4d252f591611bca9160040190815260200190565b600060405180830381600087803b158015611be457600080fd5b505af1158015611bf8573d6000803e3d6000fd5b5050506000828152600360205260408120555095945050505050565b600080611c2a8686868680519060200120610d8e565b90508451865114611c4d5760405162461bcd60e51b8152600401610710906127e1565b8351865114611c6e5760405162461bcd60e51b8152600401610710906127e1565b6000865111611cbf5760405162461bcd60e51b815260206004820152601860248201527f476f7665726e6f723a20656d7074792070726f706f73616c00000000000000006044820152606401610710565b600081815260016020908152604091829020825191820190925281546001600160401b03169081905215611d3f5760405162461bcd60e51b815260206004820152602160248201527f476f7665726e6f723a2070726f706f73616c20616c72656164792065786973746044820152607360f81b6064820152608401610710565b6000611d6a7f0000000000000000000000000000000000000000000000000000000000000000612038565b611d7343612038565b611d7d91906129e4565b90506000611daa7f0000000000000000000000000000000000000000000000000000000000000000612038565b611db490836129e4565b835467ffffffffffffffff19166001600160401b038416178455905060018301805467ffffffffffffffff19166001600160401b0383161790557f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e084338b8b8d516001600160401b03811115611e3a57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611e6d57816020015b6060815260200190600190039081611e585790505b508c88888e604051611e8799989796959493929190612863565b60405180910390a15091979650505050505050565b6000611eb182516001600160401b0316151590565b80156106ab57505051436001600160401b03909116111590565b600081815260056020526040812060028101546001820154611eed91906129cc565b611ef961066785610ad3565b11159392505050565b600080611f1186868686610d8e565b90506000611f1e82610b9e565b90506002816007811115611f4257634e487b7160e01b600052602160045260246000fd5b14158015611f7057506006816007811115611f6d57634e487b7160e01b600052602160045260246000fd5b14155b8015611f9c57506007816007811115611f9957634e487b7160e01b600052602160045260246000fd5b14155b611fe85760405162461bcd60e51b815260206004820152601d60248201527f476f7665726e6f723a2070726f706f73616c206e6f74206163746976650000006044820152606401610710565b60008281526001602052604090819020600201805461ff001916610100179055517f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c906109d29084815260200190565b60006001600160401b038211156120a05760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203660448201526534206269747360d01b6064820152608401610710565b5090565b60006001600160401b038311156120bd576120bd612ab0565b6120d0601f8401601f1916602001612979565b90508281528383830111156120e457600080fd5b828260208301376000602084830101529392505050565b600082601f83011261210b578081fd5b8135602061212061211b836129a9565b612979565b80838252828201915082860187848660051b890101111561213f578586fd5b855b8581101561216657813561215481612ac6565b84529284019290840190600101612141565b5090979650505050505050565b600082601f830112612183578081fd5b8135602061219361211b836129a9565b80838252828201915082860187848660051b89010111156121b2578586fd5b855b858110156121665781356001600160401b038111156121d1578788fd5b8801603f81018a136121e1578788fd5b6121f28a87830135604084016120a4565b85525092840192908401906001016121b4565b600082601f830112612215578081fd5b8135602061222561211b836129a9565b80838252828201915082860187848660051b8901011115612244578586fd5b855b8581101561216657813584529284019290840190600101612246565b803560ff8116811461227357600080fd5b919050565b6000806040838503121561228a578182fd5b823561229581612ac6565b946020939093013593505050565b600080600080608085870312156122b8578182fd5b84356001600160401b03808211156122ce578384fd5b6122da888389016120fb565b955060208701359150808211156122ef578384fd5b6122fb88838901612205565b94506040870135915080821115612310578384fd5b5061231d87828801612173565b949793965093946060013593505050565b60008060008060808587031215612343578384fd5b84356001600160401b0380821115612359578586fd5b612365888389016120fb565b9550602087013591508082111561237a578485fd5b61238688838901612205565b9450604087013591508082111561239b578384fd5b6123a788838901612173565b935060608701359150808211156123bc578283fd5b508501601f810187136123cd578182fd5b6123dc878235602084016120a4565b91505092959194509250565b6000602082840312156123f9578081fd5b81518015158114610d58578182fd5b600060208284031215612419578081fd5b5051919050565b600060208284031215612431578081fd5b81356001600160e01b031981168114610d58578182fd5b600060208284031215612459578081fd5b8135610d5881612ac6565b600060208284031215612475578081fd5b5035919050565b6000806040838503121561248e578182fd5b8235915060208301356124a081612ac6565b809150509250929050565b600080604083850312156124bd578182fd5b823591506124cd60208401612262565b90509250929050565b600080600080606085870312156124eb578182fd5b843593506124fb60208601612262565b925060408501356001600160401b0380821115612516578384fd5b818701915087601f830112612529578384fd5b813581811115612537578485fd5b886020828501011115612548578485fd5b95989497505060200194505050565b600080600080600060a0868803121561256e578283fd5b8535945061257e60208701612262565b935061258c60408701612262565b94979396509394606081013594506080013592915050565b6000815180845260208085019450808401835b838110156125dc5781516001600160a01b0316875295820195908201906001016125b7565b509495945050505050565b600081518084526020808501808196508360051b81019150828601855b8581101561262e57828403895261261c84835161266a565b98850198935090840190600101612604565b5091979650505050505050565b6000815180845260208085019450808401835b838110156125dc5781518752958201959082019060010161264e565b60008151808452815b8181101561268f57602081850181015186830182015201612673565b818111156126a05782602083870101525b50601f01601f19169290920160200192915050565b6080815260006126c860808301876125a4565b82810360208401526126da818761263b565b905082810360408401526126ee81866125e7565b91505082606083015295945050505050565b60a08152600061271360a08301886125a4565b8281036020840152612725818861263b565b9050828103604084015261273981876125e7565b60608401959095525050608001529392505050565b60c08152600061276160c08301896125a4565b8281036020840152612773818961263b565b9050828103604084015261278781886125e7565b60608401969096525050608081019290925260a0909101529392505050565b60208101600883106127c857634e487b7160e01b600052602160045260246000fd5b91905290565b602081526000610d58602083018461266a565b60208082526021908201527f476f7665726e6f723a20696e76616c69642070726f706f73616c206c656e67746040820152600d60fb1b606082015260800190565b60208082526021908201527f476f7665726e6f723a2070726f706f73616c206e6f74207375636365737366756040820152601b60fa1b606082015260800190565b60006101208b8352602060018060a01b038c168185015281604085015261288c8285018c6125a4565b915083820360608501526128a0828b61263b565b915083820360808501528189518084528284019150828160051b850101838c01865b838110156128f057601f198784030185526128de83835161266a565b948601949250908501906001016128c2565b505086810360a0880152612904818c6125e7565b94505050505061291f60c08401876001600160401b03169052565b6001600160401b03851660e0840152828103610100840152612941818561266a565b9c9b505050505050505050505050565b84815260ff84166020820152826040820152608060608201526000610c31608083018461266a565b604051601f8201601f191681016001600160401b03811182821017156129a1576129a1612ab0565b604052919050565b60006001600160401b038211156129c2576129c2612ab0565b5060051b60200190565b600082198211156129df576129df612a9a565b500190565b60006001600160401b03808316818516808303821115612a0657612a06612a9a565b01949350505050565b600082612a2a57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615612a4957612a49612a9a565b500290565b600082821015612a6057612a60612a9a565b500390565b600181811c90821680612a7957607f821691505b60208210811415611b5c57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461072257600080fdfea2646970667358221220bc39c6837731e3b255036a5b9bfcd38d27c7ee337cb99839aef4aa80000fc5da64736f6c63430008040033"; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorProposalThreshold__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorProposalThreshold__factory.ts new file mode 100644 index 00000000000..6156fb96db2 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorProposalThreshold__factory.ts @@ -0,0 +1,576 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { GovernorProposalThreshold } from "../GovernorProposalThreshold"; + +export class GovernorProposalThreshold__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorProposalThreshold { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernorProposalThreshold; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorTimelockCompound__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorTimelockCompound__factory.ts new file mode 100644 index 00000000000..9c44e420dca --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorTimelockCompound__factory.ts @@ -0,0 +1,687 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { GovernorTimelockCompound } from "../GovernorTimelockCompound"; + +export class GovernorTimelockCompound__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorTimelockCompound { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernorTimelockCompound; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldTimelock", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newTimelock", + type: "address", + }, + ], + name: "TimelockChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "__acceptAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalEta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "queue", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "timelock", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract ICompoundTimelock", + name: "newTimelock", + type: "address", + }, + ], + name: "updateTimelock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorTimelockControl__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorTimelockControl__factory.ts new file mode 100644 index 00000000000..f2706aabfb1 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorTimelockControl__factory.ts @@ -0,0 +1,680 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { GovernorTimelockControl } from "../GovernorTimelockControl"; + +export class GovernorTimelockControl__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorTimelockControl { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernorTimelockControl; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldTimelock", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newTimelock", + type: "address", + }, + ], + name: "TimelockChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalEta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "queue", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "timelock", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract TimelockController", + name: "newTimelock", + type: "address", + }, + ], + name: "updateTimelock", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorVotesComp__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorVotesComp__factory.ts new file mode 100644 index 00000000000..479581499ad --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorVotesComp__factory.ts @@ -0,0 +1,572 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { GovernorVotesComp } from "../GovernorVotesComp"; + +export class GovernorVotesComp__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorVotesComp { + return new Contract(address, _abi, signerOrProvider) as GovernorVotesComp; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract ERC20VotesComp", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorVotesQuorumFraction__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorVotesQuorumFraction__factory.ts new file mode 100644 index 00000000000..c3d105ebcaf --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorVotesQuorumFraction__factory.ts @@ -0,0 +1,634 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { GovernorVotesQuorumFraction } from "../GovernorVotesQuorumFraction"; + +export class GovernorVotesQuorumFraction__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorVotesQuorumFraction { + return new Contract( + address, + _abi, + signerOrProvider + ) as GovernorVotesQuorumFraction; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldQuorumNumerator", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newQuorumNumerator", + type: "uint256", + }, + ], + name: "QuorumNumeratorUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "quorumDenominator", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "quorumNumerator", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract ERC20Votes", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "newQuorumNumerator", + type: "uint256", + }, + ], + name: "updateQuorumNumerator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/GovernorVotes__factory.ts b/packages/chain-events/src/contractTypes/factories/GovernorVotes__factory.ts new file mode 100644 index 00000000000..b662e78d04d --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GovernorVotes__factory.ts @@ -0,0 +1,572 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { GovernorVotes } from "../GovernorVotes"; + +export class GovernorVotes__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GovernorVotes { + return new Contract(address, _abi, signerOrProvider) as GovernorVotes; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "token", + outputs: [ + { + internalType: "contract ERC20Votes", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/Governor__factory.ts b/packages/chain-events/src/contractTypes/factories/Governor__factory.ts new file mode 100644 index 00000000000..40bf9bb51f5 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/Governor__factory.ts @@ -0,0 +1,559 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { Governor } from "../Governor"; + +export class Governor__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Governor { + return new Contract(address, _abi, signerOrProvider) as Governor; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "BALLOT_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/GuildBank1__factory.ts b/packages/chain-events/src/contractTypes/factories/GuildBank1__factory.ts new file mode 100644 index 00000000000..c61d7dd297a --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GuildBank1__factory.ts @@ -0,0 +1,198 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GuildBank1 } from "../GuildBank1"; + +export class GuildBank1__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + approvedTokenAddress: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + approvedTokenAddress, + overrides || {} + ) as Promise; + } + getDeployTransaction( + approvedTokenAddress: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(approvedTokenAddress, overrides || {}); + } + attach(address: string): GuildBank1 { + return super.attach(address) as GuildBank1; + } + connect(signer: Signer): GuildBank1__factory { + return super.connect(signer) as GuildBank1__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GuildBank1 { + return new Contract(address, _abi, signerOrProvider) as GuildBank1; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "approvedTokenAddress", + type: "address", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Withdrawal", + type: "event", + }, + { + constant: true, + inputs: [], + name: "approvedToken", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "isOwner", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "renounceOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "shares", + type: "uint256", + }, + { + internalType: "uint256", + name: "totalShares", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b506040516107503803806107508339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100b716565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100bb565b3390565b610686806100ca6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063715018a6146100675780638da5cb5b146100715780638f32d59b14610095578063b5c5f672146100b1578063bab46259146100e3578063f2fde38b146100eb575b600080fd5b61006f610111565b005b6100796101b4565b604080516001600160a01b039092168252519081900360200190f35b61009d6101c3565b604080519115158252519081900360200190f35b61009d600480360360608110156100c757600080fd5b506001600160a01b0381351690602081013590604001356101e7565b6100796103ac565b61006f6004803603602081101561010157600080fd5b50356001600160a01b03166103bb565b6101196101c3565b61016a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b600080546001600160a01b03166101d8610420565b6001600160a01b031614905090565b60006101f16101c3565b610242576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600154604080516370a0823160e01b815230600482015290516000926102e09286926102d49289926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561029c57600080fd5b505afa1580156102b0573d6000803e3d6000fd5b505050506040513d60208110156102c657600080fd5b50519063ffffffff61042416565b9063ffffffff61048616565b6040805182815290519192506001600160a01b038716917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659181900360200190a26001546040805163a9059cbb60e01b81526001600160a01b038881166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561037757600080fd5b505af115801561038b573d6000803e3d6000fd5b505050506040513d60208110156103a157600080fd5b505195945050505050565b6001546001600160a01b031681565b6103c36101c3565b610414576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61041d816104c8565b50565b3390565b60008261043357506000610480565b8282028284828161044057fe5b041461047d5760405162461bcd60e51b81526004018080602001828103825260218152602001806106316021913960400191505060405180910390fd5b90505b92915050565b600061047d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610568565b6001600160a01b03811661050d5760405162461bcd60e51b815260040180806020018281038252602681526020018061060b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081836105f45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156105b95781810151838201526020016105a1565b50505050905090810190601f1680156105e65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161060057fe5b049594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a72315820ceb74c16f002cccdb9bcfc5028b8d1a622d0ac391e8e685d8b190eb57d48b25864736f6c63430005100032"; diff --git a/packages/chain-events/src/contractTypes/factories/GuildBank2__factory.ts b/packages/chain-events/src/contractTypes/factories/GuildBank2__factory.ts new file mode 100644 index 00000000000..014ccf90b7a --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/GuildBank2__factory.ts @@ -0,0 +1,208 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { GuildBank2 } from "../GuildBank2"; + +export class GuildBank2__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): GuildBank2 { + return super.attach(address) as GuildBank2; + } + connect(signer: Signer): GuildBank2__factory { + return super.connect(signer) as GuildBank2__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): GuildBank2 { + return new Contract(address, _abi, signerOrProvider) as GuildBank2; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "receiver", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "tokenAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Withdrawal", + type: "event", + }, + { + constant: true, + inputs: [], + name: "isOwner", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "renounceOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "shares", + type: "uint256", + }, + { + internalType: "uint256", + name: "totalShares", + type: "uint256", + }, + { + internalType: "contract IERC20[]", + name: "_approvedTokens", + type: "address[]", + }, + ], + name: "withdraw", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "contract IERC20", + name: "token", + type: "address", + }, + { + internalType: "address", + name: "receiver", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "withdrawToken", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405260006100176001600160e01b0361006616565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006a565b3390565b6108ae806100796000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806301e3366714610067578063715018a6146100b1578063732c8f57146100bb5780638da5cb5b1461017a5780638f32d59b1461019e578063f2fde38b146101a6575b600080fd5b61009d6004803603606081101561007d57600080fd5b506001600160a01b038135811691602081013590911690604001356101cc565b604080519115158252519081900360200190f35b6100b96102f4565b005b61009d600480360360808110156100d157600080fd5b6001600160a01b03823516916020810135916040820135919081019060808101606082013564010000000081111561010857600080fd5b82018360208201111561011a57600080fd5b8035906020019184602083028401116401000000008311171561013c57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610385945050505050565b6101826105a2565b604080516001600160a01b039092168252519081900360200190f35b61009d6105b1565b6100b9600480360360208110156101bc57600080fd5b50356001600160a01b03166105d5565b60006101d66105b1565b610215576040805162461bcd60e51b8152602060048201819052602482015260008051602061085a833981519152604482015290519081900360640190fd5b836001600160a01b0316836001600160a01b03167f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b6398846040518082815260200191505060405180910390a3836001600160a01b031663a9059cbb84846040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156102c057600080fd5b505af11580156102d4573d6000803e3d6000fd5b505050506040513d60208110156102ea57600080fd5b5051949350505050565b6102fc6105b1565b61033b576040805162461bcd60e51b8152602060048201819052602482015260008051602061085a833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061038f6105b1565b6103ce576040805162461bcd60e51b8152602060048201819052602482015260008051602061085a833981519152604482015290519081900360640190fd5b81516000901561059857600061048f85610483888786815181106103ee57fe5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561044b57600080fd5b505afa15801561045f573d6000803e3d6000fd5b505050506040513d602081101561047557600080fd5b50519063ffffffff61062816565b9063ffffffff61068a16565b905083828151811061049d57fe5b60200260200101516001600160a01b0316876001600160a01b03167f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b6398836040518082815260200191505060405180910390a38382815181106104fb57fe5b60200260200101516001600160a01b031663a9059cbb88836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561056257600080fd5b505af1158015610576573d6000803e3d6000fd5b505050506040513d602081101561058c57600080fd5b5051925061059a915050565b505b949350505050565b6000546001600160a01b031690565b600080546001600160a01b03166105c66106cc565b6001600160a01b031614905090565b6105dd6105b1565b61061c576040805162461bcd60e51b8152602060048201819052602482015260008051602061085a833981519152604482015290519081900360640190fd5b610625816106d0565b50565b60008261063757506000610684565b8282028284828161064457fe5b04146106815760405162461bcd60e51b81526004018080602001828103825260218152602001806108396021913960400191505060405180910390fd5b90505b92915050565b600061068183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610770565b3390565b6001600160a01b0381166107155760405162461bcd60e51b81526004018080602001828103825260268152602001806108136026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081836107fc5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107c15781810151838201526020016107a9565b50505050905090810190601f1680156107ee5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161080857fe5b049594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a723158200f13284600f59d49e267071d600bc79ef632f712fa3e225a29f8eabc8629245c64736f6c63430005100032"; diff --git a/packages/chain-events/src/contractTypes/factories/Helper__factory.ts b/packages/chain-events/src/contractTypes/factories/Helper__factory.ts new file mode 100644 index 00000000000..6f25cbcb87c --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/Helper__factory.ts @@ -0,0 +1,46 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { Helper } from "../Helper"; + +export class Helper__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): Helper { + return super.attach(address) as Helper; + } + connect(signer: Signer): Helper__factory { + return super.connect(signer) as Helper__factory; + } + static connect(address: string, signerOrProvider: Signer | Provider): Helper { + return new Contract(address, _abi, signerOrProvider) as Helper; + } +} + +const _abi = [ + { + inputs: [], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, +]; + +const _bytecode = + "0x6080604052348015600f57600080fd5b50603e80601d6000396000f3fe6080604052600080fdfea265627a7a723158207b3d63b2b85adea3a30fee1ae99d3a71c79f05c14ce6335a85ccf4c3774e75bd64736f6c63430005100032"; diff --git a/packages/chain-events/src/contractTypes/factories/IAaveGovernanceV2__factory.ts b/packages/chain-events/src/contractTypes/factories/IAaveGovernanceV2__factory.ts new file mode 100644 index 00000000000..5ac62a28d9c --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IAaveGovernanceV2__factory.ts @@ -0,0 +1,681 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IAaveGovernanceV2 } from "../IAaveGovernanceV2"; + +export class IAaveGovernanceV2__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IAaveGovernanceV2 { + return new Contract(address, _abi, signerOrProvider) as IAaveGovernanceV2; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "executor", + type: "address", + }, + ], + name: "ExecutorAuthorized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "executor", + type: "address", + }, + ], + name: "ExecutorUnauthorized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "newStrategy", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "initiatorChange", + type: "address", + }, + ], + name: "GovernanceStrategyChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "creator", + type: "address", + }, + { + indexed: true, + internalType: "contract IExecutorWithTimelock", + name: "executor", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "bool[]", + name: "withDelegatecalls", + type: "bool[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "strategy", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "ipfsHash", + type: "bytes32", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "initiatorExecution", + type: "address", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "initiatorQueueing", + type: "address", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "support", + type: "bool", + }, + { + indexed: false, + internalType: "uint256", + name: "votingPower", + type: "uint256", + }, + ], + name: "VoteEmitted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "newVotingDelay", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "initiatorChange", + type: "address", + }, + ], + name: "VotingDelayChanged", + type: "event", + }, + { + inputs: [], + name: "__abdicate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "executors", + type: "address[]", + }, + ], + name: "authorizeExecutors", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "cancel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IExecutorWithTimelock", + name: "executor", + type: "address", + }, + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bool[]", + name: "withDelegatecalls", + type: "bool[]", + }, + { + internalType: "bytes32", + name: "ipfsHash", + type: "bytes32", + }, + ], + name: "create", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "execute", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "getGovernanceStrategy", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getGuardian", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getProposalById", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "creator", + type: "address", + }, + { + internalType: "contract IExecutorWithTimelock", + name: "executor", + type: "address", + }, + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bool[]", + name: "withDelegatecalls", + type: "bool[]", + }, + { + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + { + internalType: "bool", + name: "canceled", + type: "bool", + }, + { + internalType: "address", + name: "strategy", + type: "address", + }, + { + internalType: "bytes32", + name: "ipfsHash", + type: "bytes32", + }, + ], + internalType: "struct IAaveGovernanceV2.ProposalWithoutVotes", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getProposalState", + outputs: [ + { + internalType: "enum IAaveGovernanceV2.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getProposalsCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "getVoteOnProposal", + outputs: [ + { + components: [ + { + internalType: "bool", + name: "support", + type: "bool", + }, + { + internalType: "uint248", + name: "votingPower", + type: "uint248", + }, + ], + internalType: "struct IAaveGovernanceV2.Vote", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getVotingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "executor", + type: "address", + }, + ], + name: "isExecutorAuthorized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "queue", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "governanceStrategy", + type: "address", + }, + ], + name: "setGovernanceStrategy", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "votingDelay", + type: "uint256", + }, + ], + name: "setVotingDelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "bool", + name: "support", + type: "bool", + }, + ], + name: "submitVote", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "bool", + name: "support", + type: "bool", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "submitVoteBySignature", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "executors", + type: "address[]", + }, + ], + name: "unauthorizeExecutors", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IAccessControl__factory.ts b/packages/chain-events/src/contractTypes/factories/IAccessControl__factory.ts new file mode 100644 index 00000000000..527360fb09d --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IAccessControl__factory.ts @@ -0,0 +1,192 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IAccessControl } from "../IAccessControl"; + +export class IAccessControl__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IAccessControl { + return new Contract(address, _abi, signerOrProvider) as IAccessControl; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "getRoleAdmin", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/ICompoundTimelock__factory.ts b/packages/chain-events/src/contractTypes/factories/ICompoundTimelock__factory.ts new file mode 100644 index 00000000000..0c24bc243f3 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ICompoundTimelock__factory.ts @@ -0,0 +1,265 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { ICompoundTimelock } from "../ICompoundTimelock"; + +export class ICompoundTimelock__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ICompoundTimelock { + return new Contract(address, _abi, signerOrProvider) as ICompoundTimelock; + } +} + +const _abi = [ + { + inputs: [], + name: "GRACE_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAXIMUM_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINIMUM_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "acceptAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "cancelTransaction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "delay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "executeTransaction", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "pendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "queueTransaction", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "queuedTransactions", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "setDelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "setPendingAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/ICuratedProjectFactory__factory.ts b/packages/chain-events/src/contractTypes/factories/ICuratedProjectFactory__factory.ts new file mode 100644 index 00000000000..c066365c8bc --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ICuratedProjectFactory__factory.ts @@ -0,0 +1,340 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { ICuratedProjectFactory } from "../ICuratedProjectFactory"; + +export class ICuratedProjectFactory__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ICuratedProjectFactory { + return new Contract( + address, + _abi, + signerOrProvider + ) as ICuratedProjectFactory; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "projectIndex", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "projectAddress", + type: "address", + }, + ], + name: "ProjectCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldAddr", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAddr", + type: "address", + }, + ], + name: "ProjectImplChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "oldFee", + type: "uint8", + }, + { + indexed: false, + internalType: "uint8", + name: "newFee", + type: "uint8", + }, + ], + name: "ProtocolFeeChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldAddr", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAddr", + type: "address", + }, + ], + name: "ProtocolFeeToChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldAddr", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAddr", + type: "address", + }, + ], + name: "ProtocolTokenImplChange", + type: "event", + }, + { + inputs: [ + { + internalType: "address[]", + name: "_tokens", + type: "address[]", + }, + ], + name: "addAcceptedTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_name", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_ipfsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_url", + type: "bytes32", + }, + { + internalType: "address", + name: "_beneficiary", + type: "address", + }, + { + internalType: "address", + name: "_acceptedToken", + type: "address", + }, + { + internalType: "uint256", + name: "_threshold", + type: "uint256", + }, + { + internalType: "uint256", + name: "_deadline", + type: "uint256", + }, + { + internalType: "uint256", + name: "_curatorFee", + type: "uint256", + }, + ], + name: "createProject", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "isAcceptedToken", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "numProjects", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "projectImp", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint32", + name: "projectIndex", + type: "uint32", + }, + ], + name: "projects", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "protocolData", + outputs: [ + { + components: [ + { + internalType: "uint8", + name: "fee", + type: "uint8", + }, + { + internalType: "address", + name: "feeTo", + type: "address", + }, + ], + internalType: "struct DataTypes.ProtocolData", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_cmnProjTokenImpl", + type: "address", + }, + ], + name: "setCmnProjTokenImpl", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_feeTo", + type: "address", + }, + ], + name: "setFeeTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_projectImpl", + type: "address", + }, + ], + name: "setProjectImpl", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint8", + name: "_protocolFee", + type: "uint8", + }, + ], + name: "setProtocolFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/ICuratedProject__factory.ts b/packages/chain-events/src/contractTypes/factories/ICuratedProject__factory.ts new file mode 100644 index 00000000000..ebef419431e --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ICuratedProject__factory.ts @@ -0,0 +1,576 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { ICuratedProject } from "../ICuratedProject"; + +export class ICuratedProject__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ICuratedProject { + return new Contract(address, _abi, signerOrProvider) as ICuratedProject; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Back", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Curate", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Failed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "name", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "oldData", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "newData", + type: "bytes32", + }, + ], + name: "ProjectDataChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Succeeded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "withdrawalType", + type: "bytes32", + }, + ], + name: "Withdraw", + type: "event", + }, + { + inputs: [], + name: "bToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "back", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "backersWithdraw", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "beneficiaryWithdraw", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "cToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "curate", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "curatorFee", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "curatorsWithdraw", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "funded", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "bytes32", + name: "name", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "ipfsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "url", + type: "bytes32", + }, + { + internalType: "address", + name: "creator", + type: "address", + }, + ], + internalType: "struct DataTypes.ProjectMetaData", + name: "_metaData", + type: "tuple", + }, + { + components: [ + { + internalType: "uint256", + name: "threshold", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "address", + name: "beneficiary", + type: "address", + }, + { + internalType: "address", + name: "acceptedToken", + type: "address", + }, + ], + internalType: "struct DataTypes.ProjectData", + name: "_projectData", + type: "tuple", + }, + { + components: [ + { + internalType: "uint8", + name: "fee", + type: "uint8", + }, + { + internalType: "address", + name: "feeTo", + type: "address", + }, + ], + internalType: "struct DataTypes.ProtocolData", + name: "_protocolData", + type: "tuple", + }, + { + internalType: "uint256", + name: "_curatorFee", + type: "uint256", + }, + { + internalType: "address", + name: "_bToken", + type: "address", + }, + { + internalType: "address", + name: "_cToken", + type: "address", + }, + ], + name: "initialize", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "lockedWithdraw", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "metaData", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "bytes32", + name: "name", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "ipfsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "url", + type: "bytes32", + }, + { + internalType: "address", + name: "creator", + type: "address", + }, + ], + internalType: "struct DataTypes.ProjectMetaData", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "projectData", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "threshold", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "address", + name: "beneficiary", + type: "address", + }, + { + internalType: "address", + name: "acceptedToken", + type: "address", + }, + ], + internalType: "struct DataTypes.ProjectData", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "protocolData", + outputs: [ + { + components: [ + { + internalType: "uint8", + name: "fee", + type: "uint8", + }, + { + internalType: "address", + name: "feeTo", + type: "address", + }, + ], + internalType: "struct DataTypes.ProtocolData", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_ipfsHash", + type: "bytes32", + }, + ], + name: "setIpfsHash", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_name", + type: "bytes32", + }, + ], + name: "setName", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_url", + type: "bytes32", + }, + ], + name: "setUrl", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "totalCuratorFunding", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalFunding", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "withdrawRemaining", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IERC165__factory.ts b/packages/chain-events/src/contractTypes/factories/IERC165__factory.ts new file mode 100644 index 00000000000..49539166a34 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IERC165__factory.ts @@ -0,0 +1,41 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IERC165 } from "../IERC165"; + +export class IERC165__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC165 { + return new Contract(address, _abi, signerOrProvider) as IERC165; + } +} + +const _abi = [ + { + constant: true, + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IERC1820Registry__factory.ts b/packages/chain-events/src/contractTypes/factories/IERC1820Registry__factory.ts new file mode 100644 index 00000000000..0a7063c076f --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IERC1820Registry__factory.ts @@ -0,0 +1,249 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IERC1820Registry } from "../IERC1820Registry"; + +export class IERC1820Registry__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC1820Registry { + return new Contract(address, _abi, signerOrProvider) as IERC1820Registry; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "interfaceHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "implementer", + type: "address", + }, + ], + name: "InterfaceImplementerSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newManager", + type: "address", + }, + ], + name: "ManagerChanged", + type: "event", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes32", + name: "interfaceHash", + type: "bytes32", + }, + ], + name: "getInterfaceImplementer", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "getManager", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "implementsERC165Interface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "implementsERC165InterfaceNoCache", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "string", + name: "interfaceName", + type: "string", + }, + ], + name: "interfaceHash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "pure", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes32", + name: "interfaceHash", + type: "bytes32", + }, + { + internalType: "address", + name: "implementer", + type: "address", + }, + ], + name: "setInterfaceImplementer", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "newManager", + type: "address", + }, + ], + name: "setManager", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "updateERC165Cache", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IERC20Metadata__factory.ts b/packages/chain-events/src/contractTypes/factories/IERC20Metadata__factory.ts new file mode 100644 index 00000000000..e68f085897f --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IERC20Metadata__factory.ts @@ -0,0 +1,242 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IERC20Metadata } from "../IERC20Metadata"; + +export class IERC20Metadata__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC20Metadata { + return new Contract(address, _abi, signerOrProvider) as IERC20Metadata; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IERC20Permit__factory.ts b/packages/chain-events/src/contractTypes/factories/IERC20Permit__factory.ts new file mode 100644 index 00000000000..f24b21ea32a --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IERC20Permit__factory.ts @@ -0,0 +1,95 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IERC20Permit } from "../IERC20Permit"; + +export class IERC20Permit__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC20Permit { + return new Contract(address, _abi, signerOrProvider) as IERC20Permit; + } +} + +const _abi = [ + { + inputs: [], + name: "DOMAIN_SEPARATOR", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "permit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IERC20__factory.ts b/packages/chain-events/src/contractTypes/factories/IERC20__factory.ts new file mode 100644 index 00000000000..2f25cccd7ea --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IERC20__factory.ts @@ -0,0 +1,212 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IERC20 } from "../IERC20"; + +export class IERC20__factory { + static connect(address: string, signerOrProvider: Signer | Provider): IERC20 { + return new Contract(address, _abi, signerOrProvider) as IERC20; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "who", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IERC721Receiver__factory.ts b/packages/chain-events/src/contractTypes/factories/IERC721Receiver__factory.ts new file mode 100644 index 00000000000..0ab31d27315 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IERC721Receiver__factory.ts @@ -0,0 +1,56 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IERC721Receiver } from "../IERC721Receiver"; + +export class IERC721Receiver__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC721Receiver { + return new Contract(address, _abi, signerOrProvider) as IERC721Receiver; + } +} + +const _abi = [ + { + constant: false, + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "onERC721Received", + outputs: [ + { + internalType: "bytes4", + name: "", + type: "bytes4", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IERC721__factory.ts b/packages/chain-events/src/contractTypes/factories/IERC721__factory.ts new file mode 100644 index 00000000000..6e4c18a05c5 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IERC721__factory.ts @@ -0,0 +1,325 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IERC721 } from "../IERC721"; + +export class IERC721__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC721 { + return new Contract(address, _abi, signerOrProvider) as IERC721; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "approved", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "approved", + type: "bool", + }, + ], + name: "ApprovalForAll", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "approve", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "getApproved", + outputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "isApprovedForAll", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "ownerOf", + outputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "safeTransferFrom", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "safeTransferFrom", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "bool", + name: "_approved", + type: "bool", + }, + ], + name: "setApprovalForAll", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "tokenId", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IERC777Recipient__factory.ts b/packages/chain-events/src/contractTypes/factories/IERC777Recipient__factory.ts new file mode 100644 index 00000000000..02cb77693f0 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IERC777Recipient__factory.ts @@ -0,0 +1,60 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IERC777Recipient } from "../IERC777Recipient"; + +export class IERC777Recipient__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC777Recipient { + return new Contract(address, _abi, signerOrProvider) as IERC777Recipient; + } +} + +const _abi = [ + { + constant: false, + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "userData", + type: "bytes", + }, + { + internalType: "bytes", + name: "operatorData", + type: "bytes", + }, + ], + name: "tokensReceived", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IERC777Sender__factory.ts b/packages/chain-events/src/contractTypes/factories/IERC777Sender__factory.ts new file mode 100644 index 00000000000..1db4d2a6b6c --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IERC777Sender__factory.ts @@ -0,0 +1,60 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IERC777Sender } from "../IERC777Sender"; + +export class IERC777Sender__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC777Sender { + return new Contract(address, _abi, signerOrProvider) as IERC777Sender; + } +} + +const _abi = [ + { + constant: false, + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "userData", + type: "bytes", + }, + { + internalType: "bytes", + name: "operatorData", + type: "bytes", + }, + ], + name: "tokensToSend", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IERC777__factory.ts b/packages/chain-events/src/contractTypes/factories/IERC777__factory.ts new file mode 100644 index 00000000000..2b92fbe02d2 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IERC777__factory.ts @@ -0,0 +1,437 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IERC777 } from "../IERC777"; + +export class IERC777__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IERC777 { + return new Contract(address, _abi, signerOrProvider) as IERC777; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "tokenHolder", + type: "address", + }, + ], + name: "AuthorizedOperator", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "operatorData", + type: "bytes", + }, + ], + name: "Burned", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "operatorData", + type: "bytes", + }, + ], + name: "Minted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "tokenHolder", + type: "address", + }, + ], + name: "RevokedOperator", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "operator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes", + name: "operatorData", + type: "bytes", + }, + ], + name: "Sent", + type: "event", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "authorizeOperator", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "burn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "defaultOperators", + outputs: [ + { + internalType: "address[]", + name: "", + type: "address[]", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "granularity", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + { + internalType: "address", + name: "tokenHolder", + type: "address", + }, + ], + name: "isOperatorFor", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "bytes", + name: "operatorData", + type: "bytes", + }, + ], + name: "operatorBurn", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "bytes", + name: "operatorData", + type: "bytes", + }, + ], + name: "operatorSend", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "operator", + type: "address", + }, + ], + name: "revokeOperator", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "send", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IExecutorWithTimelock__factory.ts b/packages/chain-events/src/contractTypes/factories/IExecutorWithTimelock__factory.ts new file mode 100644 index 00000000000..70f7933ff24 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IExecutorWithTimelock__factory.ts @@ -0,0 +1,469 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IExecutorWithTimelock } from "../IExecutorWithTimelock"; + +export class IExecutorWithTimelock__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IExecutorWithTimelock { + return new Contract( + address, + _abi, + signerOrProvider + ) as IExecutorWithTimelock; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "actionHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "CancelledAction", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "actionHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + { + indexed: false, + internalType: "bytes", + name: "resultData", + type: "bytes", + }, + ], + name: "ExecutedAction", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "delay", + type: "uint256", + }, + ], + name: "NewDelay", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "actionHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "QueuedAction", + type: "event", + }, + { + inputs: [], + name: "GRACE_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MAXIMUM_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "MINIMUM_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "cancelTransaction", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "executeTransaction", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "getAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "actionHash", + type: "bytes32", + }, + ], + name: "isActionQueued", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isProposalOverGracePeriod", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "executionTime", + type: "uint256", + }, + { + internalType: "bool", + name: "withDelegatecall", + type: "bool", + }, + ], + name: "queueTransaction", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IGovernancePowerDelegationToken__factory.ts b/packages/chain-events/src/contractTypes/factories/IGovernancePowerDelegationToken__factory.ts new file mode 100644 index 00000000000..4357ac3546c --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IGovernancePowerDelegationToken__factory.ts @@ -0,0 +1,53 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IGovernancePowerDelegationToken } from "../IGovernancePowerDelegationToken"; + +export class IGovernancePowerDelegationToken__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IGovernancePowerDelegationToken { + return new Contract( + address, + _abi, + signerOrProvider + ) as IGovernancePowerDelegationToken; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + { + internalType: "enum IGovernancePowerDelegationToken.DelegationType", + name: "delegationType", + type: "uint8", + }, + ], + name: "getPowerAtBlock", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IGovernanceStrategy__factory.ts b/packages/chain-events/src/contractTypes/factories/IGovernanceStrategy__factory.ts new file mode 100644 index 00000000000..8d2022cc1f6 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IGovernanceStrategy__factory.ts @@ -0,0 +1,106 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IGovernanceStrategy } from "../IGovernanceStrategy"; + +export class IGovernanceStrategy__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IGovernanceStrategy { + return new Contract(address, _abi, signerOrProvider) as IGovernanceStrategy; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getPropositionPowerAt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getTotalPropositionSupplyAt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getTotalVotingSupplyAt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotingPowerAt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IGovernorCompatibilityBravo__factory.ts b/packages/chain-events/src/contractTypes/factories/IGovernorCompatibilityBravo__factory.ts new file mode 100644 index 00000000000..45c44c6afd5 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IGovernorCompatibilityBravo__factory.ts @@ -0,0 +1,793 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IGovernorCompatibilityBravo } from "../IGovernorCompatibilityBravo"; + +export class IGovernorCompatibilityBravo__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IGovernorCompatibilityBravo { + return new Contract( + address, + _abi, + signerOrProvider + ) as IGovernorCompatibilityBravo; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "cancel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "execute", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "getActions", + outputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "voter", + type: "address", + }, + ], + name: "getReceipt", + outputs: [ + { + components: [ + { + internalType: "bool", + name: "hasVoted", + type: "bool", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint96", + name: "votes", + type: "uint96", + }, + ], + internalType: "struct IGovernorCompatibilityBravo.Receipt", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "proposalThreshold", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "proposals", + outputs: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "address", + name: "proposer", + type: "address", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + { + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + internalType: "uint256", + name: "forVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "againstVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "abstainVotes", + type: "uint256", + }, + { + internalType: "bool", + name: "canceled", + type: "bool", + }, + { + internalType: "bool", + name: "executed", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "queue", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "quorumVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IGovernorTimelock__factory.ts b/packages/chain-events/src/contractTypes/factories/IGovernorTimelock__factory.ts new file mode 100644 index 00000000000..eafe3c94871 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IGovernorTimelock__factory.ts @@ -0,0 +1,631 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IGovernorTimelock } from "../IGovernorTimelock"; + +export class IGovernorTimelock__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IGovernorTimelock { + return new Contract(address, _abi, signerOrProvider) as IGovernorTimelock; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ProposalQueued", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalEta", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "queue", + outputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "timelock", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IGovernor__factory.ts b/packages/chain-events/src/contractTypes/factories/IGovernor__factory.ts new file mode 100644 index 00000000000..47a5ce5fb0b --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IGovernor__factory.ts @@ -0,0 +1,546 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IGovernor } from "../IGovernor"; + +export class IGovernor__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IGovernor { + return new Contract(address, _abi, signerOrProvider) as IGovernor; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalCanceled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "proposer", + type: "address", + }, + { + indexed: false, + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + indexed: false, + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + indexed: false, + internalType: "string[]", + name: "signatures", + type: "string[]", + }, + { + indexed: false, + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + indexed: false, + internalType: "uint256", + name: "startBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "endBlock", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "ProposalCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "ProposalExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "voter", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + indexed: false, + internalType: "uint256", + name: "weight", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "VoteCast", + type: "event", + }, + { + inputs: [], + name: "COUNTING_MODE", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + ], + name: "castVote", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + ], + name: "castVoteBySig", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "uint8", + name: "support", + type: "uint8", + }, + { + internalType: "string", + name: "reason", + type: "string", + }, + ], + name: "castVoteWithReason", + outputs: [ + { + internalType: "uint256", + name: "balance", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "execute", + outputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotes", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasVoted", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "descriptionHash", + type: "bytes32", + }, + ], + name: "hashProposal", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalDeadline", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "proposalSnapshot", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "calldatas", + type: "bytes[]", + }, + { + internalType: "string", + name: "description", + type: "string", + }, + ], + name: "propose", + outputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "quorum", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "state", + outputs: [ + { + internalType: "enum IGovernor.ProposalState", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "version", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingDelay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "votingPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IProjectBaseFactory__factory.ts b/packages/chain-events/src/contractTypes/factories/IProjectBaseFactory__factory.ts new file mode 100644 index 00000000000..9d760480a68 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IProjectBaseFactory__factory.ts @@ -0,0 +1,269 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IProjectBaseFactory } from "../IProjectBaseFactory"; + +export class IProjectBaseFactory__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IProjectBaseFactory { + return new Contract(address, _abi, signerOrProvider) as IProjectBaseFactory; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "projectIndex", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "projectAddress", + type: "address", + }, + ], + name: "ProjectCreated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldAddr", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAddr", + type: "address", + }, + ], + name: "ProjectImplChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "oldFee", + type: "uint8", + }, + { + indexed: false, + internalType: "uint8", + name: "newFee", + type: "uint8", + }, + ], + name: "ProtocolFeeChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldAddr", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAddr", + type: "address", + }, + ], + name: "ProtocolFeeToChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldAddr", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAddr", + type: "address", + }, + ], + name: "ProtocolTokenImplChange", + type: "event", + }, + { + inputs: [ + { + internalType: "address[]", + name: "_tokens", + type: "address[]", + }, + ], + name: "addAcceptedTokens", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "isAcceptedToken", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "numProjects", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "projectImp", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint32", + name: "projectIndex", + type: "uint32", + }, + ], + name: "projects", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "protocolData", + outputs: [ + { + components: [ + { + internalType: "uint8", + name: "fee", + type: "uint8", + }, + { + internalType: "address", + name: "feeTo", + type: "address", + }, + ], + internalType: "struct DataTypes.ProtocolData", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_feeTo", + type: "address", + }, + ], + name: "setFeeTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_projectImpl", + type: "address", + }, + ], + name: "setProjectImpl", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint8", + name: "_protocolFee", + type: "uint8", + }, + ], + name: "setProtocolFee", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IProjectBase__factory.ts b/packages/chain-events/src/contractTypes/factories/IProjectBase__factory.ts new file mode 100644 index 00000000000..0b48f9138c0 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IProjectBase__factory.ts @@ -0,0 +1,349 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IProjectBase } from "../IProjectBase"; + +export class IProjectBase__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IProjectBase { + return new Contract(address, _abi, signerOrProvider) as IProjectBase; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Back", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Failed", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "name", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "oldData", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "newData", + type: "bytes32", + }, + ], + name: "ProjectDataChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Succeeded", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "withdrawalType", + type: "bytes32", + }, + ], + name: "Withdraw", + type: "event", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "back", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "backersWithdraw", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "beneficiaryWithdraw", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "funded", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "lockedWithdraw", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "metaData", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "id", + type: "uint256", + }, + { + internalType: "bytes32", + name: "name", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "ipfsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "url", + type: "bytes32", + }, + { + internalType: "address", + name: "creator", + type: "address", + }, + ], + internalType: "struct DataTypes.ProjectMetaData", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "projectData", + outputs: [ + { + components: [ + { + internalType: "uint256", + name: "threshold", + type: "uint256", + }, + { + internalType: "uint256", + name: "deadline", + type: "uint256", + }, + { + internalType: "address", + name: "beneficiary", + type: "address", + }, + { + internalType: "address", + name: "acceptedToken", + type: "address", + }, + ], + internalType: "struct DataTypes.ProjectData", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "protocolData", + outputs: [ + { + components: [ + { + internalType: "uint8", + name: "fee", + type: "uint8", + }, + { + internalType: "address", + name: "feeTo", + type: "address", + }, + ], + internalType: "struct DataTypes.ProtocolData", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_ipfsHash", + type: "bytes32", + }, + ], + name: "setIpfsHash", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_name", + type: "bytes32", + }, + ], + name: "setName", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_url", + type: "bytes32", + }, + ], + name: "setUrl", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "totalFunding", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IProposalValidator__factory.ts b/packages/chain-events/src/contractTypes/factories/IProposalValidator__factory.ts new file mode 100644 index 00000000000..d3553561557 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IProposalValidator__factory.ts @@ -0,0 +1,287 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IProposalValidator } from "../IProposalValidator"; + +export class IProposalValidator__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IProposalValidator { + return new Contract(address, _abi, signerOrProvider) as IProposalValidator; + } +} + +const _abi = [ + { + inputs: [], + name: "MINIMUM_QUORUM", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ONE_HUNDRED_WITH_PRECISION", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PROPOSITION_THRESHOLD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "VOTE_DIFFERENTIAL", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "VOTING_DURATION", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getMinimumPropositionPowerNeeded", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "votingSupply", + type: "uint256", + }, + ], + name: "getMinimumVotingPowerNeeded", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isProposalPassed", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "isPropositionPowerEnough", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isQuorumValid", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isVoteDifferentialValid", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "validateCreatorOfProposal", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "validateProposalCancellation", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/ITransferHook__factory.ts b/packages/chain-events/src/contractTypes/factories/ITransferHook__factory.ts new file mode 100644 index 00000000000..ceb22f95188 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ITransferHook__factory.ts @@ -0,0 +1,43 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { ITransferHook } from "../ITransferHook"; + +export class ITransferHook__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ITransferHook { + return new Contract(address, _abi, signerOrProvider) as ITransferHook; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "onTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/IVotingStrategy__factory.ts b/packages/chain-events/src/contractTypes/factories/IVotingStrategy__factory.ts new file mode 100644 index 00000000000..4a4e25c682a --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/IVotingStrategy__factory.ts @@ -0,0 +1,44 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { IVotingStrategy } from "../IVotingStrategy"; + +export class IVotingStrategy__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IVotingStrategy { + return new Contract(address, _abi, signerOrProvider) as IVotingStrategy; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getVotingPowerAt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/InitializableAdminUpgradeabilityProxy__factory.ts b/packages/chain-events/src/contractTypes/factories/InitializableAdminUpgradeabilityProxy__factory.ts new file mode 100644 index 00000000000..8aff0b10abd --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/InitializableAdminUpgradeabilityProxy__factory.ts @@ -0,0 +1,198 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { InitializableAdminUpgradeabilityProxy } from "../InitializableAdminUpgradeabilityProxy"; + +export class InitializableAdminUpgradeabilityProxy__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + overrides || {} + ) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): InitializableAdminUpgradeabilityProxy { + return super.attach(address) as InitializableAdminUpgradeabilityProxy; + } + connect(signer: Signer): InitializableAdminUpgradeabilityProxy__factory { + return super.connect( + signer + ) as InitializableAdminUpgradeabilityProxy__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): InitializableAdminUpgradeabilityProxy { + return new Contract( + address, + _abi, + signerOrProvider + ) as InitializableAdminUpgradeabilityProxy; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "previousAdmin", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "AdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "changeAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "implementation", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_logic", + type: "address", + }, + { + internalType: "address", + name: "_admin", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_logic", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + ], + name: "upgradeTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newImplementation", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "upgradeToAndCall", + outputs: [], + stateMutability: "payable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50610905806100206000396000f3fe6080604052600436106100705760003560e01c80638f2839701161004e5780638f2839701461015e578063cf7a1d7714610191578063d1f5789414610250578063f851a4401461030657610070565b80633659cfe61461007a5780634f1ef286146100ad5780635c60da1b1461012d575b61007861031b565b005b34801561008657600080fd5b506100786004803603602081101561009d57600080fd5b50356001600160a01b0316610335565b610078600480360360408110156100c357600080fd5b6001600160a01b0382351691908101906040810160208201356401000000008111156100ee57600080fd5b82018360208201111561010057600080fd5b8035906020019184600183028401116401000000008311171561012257600080fd5b50909250905061036f565b34801561013957600080fd5b5061014261041c565b604080516001600160a01b039092168252519081900360200190f35b34801561016a57600080fd5b506100786004803603602081101561018157600080fd5b50356001600160a01b0316610459565b610078600480360360608110156101a757600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156101db57600080fd5b8201836020820111156101ed57600080fd5b8035906020019184600183028401116401000000008311171561020f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610513945050505050565b6100786004803603604081101561026657600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561029157600080fd5b8201836020820111156102a357600080fd5b803590602001918460018302840111640100000000831117156102c557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610543945050505050565b34801561031257600080fd5b50610142610623565b61032361064e565b61033361032e610656565b61067b565b565b61033d61069f565b6001600160a01b0316336001600160a01b031614156103645761035f816106c4565b61036c565b61036c61031b565b50565b61037761069f565b6001600160a01b0316336001600160a01b0316141561040f57610399836106c4565b6000836001600160a01b031683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146103f6576040519150601f19603f3d011682016040523d82523d6000602084013e6103fb565b606091505b505090508061040957600080fd5b50610417565b61041761031b565b505050565b600061042661069f565b6001600160a01b0316336001600160a01b0316141561044e57610447610656565b9050610456565b61045661031b565b90565b61046161069f565b6001600160a01b0316336001600160a01b03161415610364576001600160a01b0381166104bf5760405162461bcd60e51b815260040180806020018281038252603681526020018061085f6036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f6104e861069f565b604080516001600160a01b03928316815291841660208301528051918290030190a161035f81610704565b600061051d610656565b6001600160a01b03161461053057600080fd5b61053a8382610543565b61041782610704565b600061054d610656565b6001600160a01b03161461056057600080fd5b61056982610728565b80511561061f576000826001600160a01b0316826040518082805190602001908083835b602083106105ac5780518252601f19909201916020918201910161058d565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461060c576040519150601f19603f3d011682016040523d82523d6000602084013e610611565b606091505b505090508061041757600080fd5b5050565b600061062d61069f565b6001600160a01b0316336001600160a01b0316141561044e5761044761069f565b610333610790565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561069a573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6106cd81610728565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b610731816107f0565b61076c5760405162461bcd60e51b815260040180806020018281038252603b815260200180610895603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b61079861069f565b6001600160a01b0316336001600160a01b031614156107e85760405162461bcd60e51b815260040180806020018281038252603281526020018061082d6032913960400191505060405180910390fd5b610333610333565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061082457508115155b94935050505056fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a264697066735822122000743fbeee8fef8cafa002a430c584e4459bc71f7c3c1d8eeb0afe23f30548a864736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/InitializableUpgradeabilityProxy__factory.ts b/packages/chain-events/src/contractTypes/factories/InitializableUpgradeabilityProxy__factory.ts new file mode 100644 index 00000000000..32044baab1a --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/InitializableUpgradeabilityProxy__factory.ts @@ -0,0 +1,84 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { InitializableUpgradeabilityProxy } from "../InitializableUpgradeabilityProxy"; + +export class InitializableUpgradeabilityProxy__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + overrides || {} + ) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): InitializableUpgradeabilityProxy { + return super.attach(address) as InitializableUpgradeabilityProxy; + } + connect(signer: Signer): InitializableUpgradeabilityProxy__factory { + return super.connect(signer) as InitializableUpgradeabilityProxy__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): InitializableUpgradeabilityProxy { + return new Contract( + address, + _abi, + signerOrProvider + ) as InitializableUpgradeabilityProxy; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + stateMutability: "payable", + type: "fallback", + }, + { + inputs: [ + { + internalType: "address", + name: "_logic", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "payable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50610338806100206000396000f3fe60806040526004361061001e5760003560e01c8063d1f5789414610028575b6100266100de565b005b6100266004803603604081101561003e57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561006957600080fd5b82018360208201111561007b57600080fd5b8035906020019184600183028401116401000000008311171561009d57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506100f8945050505050565b6100e66100f6565b6100f66100f16101da565b6101ff565b565b60006101026101da565b6001600160a01b03161461011557600080fd5b61011e82610223565b8051156101d6576000826001600160a01b0316826040518082805190602001908083835b602083106101615780518252601f199092019160209182019101610142565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146101c1576040519150601f19603f3d011682016040523d82523d6000602084013e6101c6565b606091505b50509050806101d457600080fd5b505b5050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e80801561021e573d6000f35b3d6000fd5b61022c8161028b565b6102675760405162461bcd60e51b815260040180806020018281038252603b8152602001806102c8603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906102bf57508115155b94935050505056fe43616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220aa32735aa664625d1e2d81fcbe14e56195c0226346644d92aefb3ac6c39971e164736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/MPondInterface__factory.ts b/packages/chain-events/src/contractTypes/factories/MPondInterface__factory.ts new file mode 100644 index 00000000000..4a48bab62bb --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/MPondInterface__factory.ts @@ -0,0 +1,44 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { MPondInterface } from "../MPondInterface"; + +export class MPondInterface__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): MPondInterface { + return new Contract(address, _abi, signerOrProvider) as MPondInterface; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getPriorVotes", + outputs: [ + { + internalType: "uint96", + name: "", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/MPond__factory.ts b/packages/chain-events/src/contractTypes/factories/MPond__factory.ts new file mode 100644 index 00000000000..a612f033692 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/MPond__factory.ts @@ -0,0 +1,741 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { MPond } from "../MPond"; + +export class MPond__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + account: string, + bridge: string, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(account, bridge, overrides || {}) as Promise; + } + getDeployTransaction( + account: string, + bridge: string, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(account, bridge, overrides || {}); + } + attach(address: string): MPond { + return super.attach(address) as MPond; + } + connect(signer: Signer): MPond__factory { + return super.connect(signer) as MPond__factory; + } + static connect(address: string, signerOrProvider: Signer | Provider): MPond { + return new Contract(address, _abi, signerOrProvider) as MPond; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "bridge", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegator", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "fromDelegate", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "toDelegate", + type: "address", + }, + ], + name: "DelegateChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "delegate", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "previousBalance", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newBalance", + type: "uint256", + }, + ], + name: "DelegateVotesChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [], + name: "DELEGATION_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "DOMAIN_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "UNDELEGATION_TYPEHASH", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "addWhiteListAddress", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "rawAmount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "bridgeSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + name: "checkpoints", + outputs: [ + { + internalType: "uint32", + name: "fromBlock", + type: "uint32", + }, + { + internalType: "uint96", + name: "votes", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "uint96", + name: "amount", + type: "uint96", + }, + ], + name: "delegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + { + internalType: "uint96", + name: "amount", + type: "uint96", + }, + ], + name: "delegateBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "delegates", + outputs: [ + { + internalType: "uint96", + name: "", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "enableAllTranfers", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "enableAllTransfers", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "getCurrentVotes", + outputs: [ + { + internalType: "uint96", + name: "", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getPriorVotes", + outputs: [ + { + internalType: "uint96", + name: "", + type: "uint96", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "isWhiteListed", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address1", + type: "address", + }, + { + internalType: "address", + name: "_address2", + type: "address", + }, + ], + name: "isWhiteListedTransfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "nonces", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "numCheckpoints", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "dst", + type: "address", + }, + { + internalType: "uint256", + name: "rawAmount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "src", + type: "address", + }, + { + internalType: "address", + name: "dst", + type: "address", + }, + { + internalType: "uint256", + name: "rawAmount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "uint96", + name: "amount", + type: "uint96", + }, + ], + name: "undelegate", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "delegatee", + type: "address", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "expiry", + type: "uint256", + }, + { + internalType: "uint8", + name: "v", + type: "uint8", + }, + { + internalType: "bytes32", + name: "r", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "s", + type: "bytes32", + }, + { + internalType: "uint96", + name: "amount", + type: "uint96", + }, + ], + name: "undelegateBySig", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x60806040526008805460ff191660011790553480156200001e57600080fd5b506040516200273238038062002732833981016040819052620000419162000229565b806001600160a01b0316826001600160a01b031614156200007f5760405162461bcd60e51b81526004016200007690620002bd565b60405180910390fd5b6001600160a01b0381166000818152600160208181526040808420805469017b7883c069166000006001600160601b031991821681179092556002845282862086805284528286208054909116821790558585526007909252808420805460ff19169093179092559051600080516020620027128339815191529162000105916200030e565b60405180910390a360006200014969021e19e0c9bab240000069017b7883c069166000006040518060600160405280602d8152602001620026e5602d9139620001e7565b6001600160a01b038416600081815260016020818152604080842080546001600160601b0388166001600160601b031991821681179092556002845282862086805284528286208054909116821790558585526007909252808420805460ff19169093179092559051939450919290916000805160206200271283398151915291620001d691906200030e565b60405180910390a350505062000330565b6000836001600160601b0316836001600160601b031611158290620002215760405162461bcd60e51b815260040162000076919062000267565b505050900390565b600080604083850312156200023c578182fd5b8251620002498162000317565b60208401519092506200025c8162000317565b809150509250929050565b6000602080835283518082850152825b81811015620002955785810183015185820160400152820162000277565b81811115620002a75783604083870101525b50601f01601f1916929092016040019392505050565b60208082526031908201527f42726964676520616e64206163636f75746e2073686f756c64206e6f74206265604082015270207468652073616d65206164647265737360781b606082015260800190565b90815260200190565b6001600160a01b03811681146200032d57600080fd5b50565b6123a580620003406000396000f3fe608060405234801561001057600080fd5b50600436106101cf5760003560e01c80637ecebe0011610104578063b9371343116100a2578063e584324211610071578063e5843242146103a5578063e7a324dc146103b8578063f1127ed8146103c0578063f851a440146103e1576101cf565b8063b93713431461036f578063c43ff0c814610377578063dd62ed3e1461037f578063e1032b8314610392576101cf565b806395d89b41116100de57806395d89b411461032e578063a65835da14610336578063a9059cbb14610349578063b4b5ea571461035c576101cf565b80637ecebe00146102f55780638164c309146103085780638b41166c1461031b576101cf565b8063313ce567116101715780636f9170f61161014b5780636f9170f61461028f5780636fcfff45146102a257806370a08231146102c2578063782d6fe1146102d5576101cf565b8063313ce5671461025f57806367cb1601146102745780636ab5cc381461027c576101cf565b806316aeac20116101ad57806316aeac201461022757806318160ddd1461023c57806320606b701461024457806323b872dd1461024c576101cf565b806302cb3a88146101d457806306fdde03146101e9578063095ea7b314610207575b600080fd5b6101e76101e2366004611ae0565b6103f6565b005b6101f1610617565b6040516101fe9190611c76565b60405180910390f35b61021a610215366004611ab6565b61064a565b6040516101fe9190611beb565b61022f610707565b6040516101fe9190611bf6565b61022f61072b565b61022f610739565b61021a61025a366004611a76565b61075d565b6102676108c6565b6040516101fe9190612148565b61021a6108cb565b61021a61028a366004611a42565b61090c565b61021a61029d366004611a27565b61095f565b6102b56102b0366004611a27565b610974565b6040516101fe9190612118565b61022f6102d0366004611a27565b61098c565b6102e86102e3366004611ab6565b6109b0565b6040516101fe9190612156565b61022f610303366004611a27565b610bbe565b61021a610316366004611a27565b610bd0565b6101e7610329366004611b91565b610c26565b6101f1610c35565b6101e7610344366004611ae0565b610c56565b61021a610357366004611ab6565b610e61565b6102e861036a366004611a27565b610ec4565b61022f610f34565b61021a610f42565b61022f61038d366004611a42565b610f4b565b6101e76103a0366004611b91565b610f7d565b6102e86103b3366004611a42565b610f88565b61022f610fae565b6103d36103ce366004611b52565b610fd2565b6040516101fe929190612129565b6103e9611007565b6040516101fe9190611bd7565b60408051808201909152601781527626b0b93634b71023b7bb32b93730b731b2902a37b5b2b760491b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f59269cbca1208251d90fa95662317aad0c2a0b4ed01fd7809a1a8c310572a7d6610471611016565b306040516020016104859493929190611c34565b60405160208183030381529060405280519060200120905060007f3001685306e2a9f6f760b7c5c2d24b3cda3fd7534488f2cedcaf2728fb7d99d6898989866040516020016104d8959493929190611bff565b60405160208183030381529060405280519060200120905060008282604051602001610505929190611bbc565b6040516020818303038152906040528051906020012090506000600182898989604051600081526020016040526040516105429493929190611c58565b6020604051602081039080840390855afa158015610564573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166105a05760405162461bcd60e51b8152600401610597906120d0565b60405180910390fd5b6001600160a01b03811660009081526005602052604090208054600181019091558a146105df5760405162461bcd60e51b815260040161059790611f0f565b884211156105ff5760405162461bcd60e51b815260040161059790612088565b61060a818c8761101a565b5050505050505050505050565b6040518060400160405280601781526020017626b0b93634b71023b7bb32b93730b731b2902a37b5b2b760491b81525081565b6000806000198314156106605750600019610685565b610682836040518060600160405280602581526020016121d360259139611194565b90505b336000818152602081815260408083206001600160a01b03891680855292529182902080546001600160601b0319166001600160601b03861617905590519091907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906106f3908590612156565b60405180910390a360019150505b92915050565b7f3001685306e2a9f6f760b7c5c2d24b3cda3fd7534488f2cedcaf2728fb7d99d681565b69021e19e0c9bab240000081565b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b6000610769338461090c565b6107855760405162461bcd60e51b815260040161059790611fe7565b6001600160a01b0384166000908152602081815260408083203380855290835281842054825160608101909352602580845291946001600160601b039091169390926107d99288926121d390830139611194565b9050866001600160a01b0316836001600160a01b03161415801561080657506001600160601b0382811614155b156108ae57600061083083836040518060600160405280603d815260200161230c603d91396111c3565b6001600160a01b03898116600081815260208181526040808320948a16808452949091529081902080546001600160601b0319166001600160601b0386161790555192935090917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906108a4908590612156565b60405180910390a3505b6108b9878783611202565b5060019695505050505050565b601281565b6006546000906001600160a01b031633146108f85760405162461bcd60e51b815260040161059790612044565b506008805460ff1916600190811790915590565b6001600160a01b03821660009081526007602052604081205460ff168061094b57506001600160a01b03821660009081526007602052604090205460ff165b80610958575060085460ff165b9392505050565b60076020526000908152604090205460ff1681565b60046020526000908152604090205463ffffffff1681565b6001600160a01b03166000908152600160205260409020546001600160601b031690565b60004382106109d15760405162461bcd60e51b815260040161059790611dcb565b6001600160a01b03831660009081526004602052604090205463ffffffff16806109ff576000915050610701565b6001600160a01b038416600090815260036020908152604080832063ffffffff600019860181168552925290912054168310610a7b576001600160a01b03841660009081526003602090815260408083206000199490940163ffffffff1683529290522054600160201b90046001600160601b03169050610701565b6001600160a01b038416600090815260036020908152604080832083805290915290205463ffffffff16831015610ab6576000915050610701565b600060001982015b8163ffffffff168163ffffffff161115610b7957600282820363ffffffff16048103610ae86119e2565b506001600160a01b038716600090815260036020908152604080832063ffffffff858116855290835292819020815180830190925254928316808252600160201b9093046001600160601b03169181019190915290871415610b54576020015194506107019350505050565b805163ffffffff16871115610b6b57819350610b72565b6001820392505b5050610abe565b506001600160a01b038516600090815260036020908152604080832063ffffffff909416835292905220546001600160601b03600160201b9091041691505092915050565b60056020526000908152604090205481565b6006546000906001600160a01b03163314610bfd5760405162461bcd60e51b815260040161059790611fb0565b506001600160a01b03166000908152600760205260409020805460ff1916600190811790915590565b610c313383836114bd565b5050565b60405180604001604052806005815260200164135413d39160da1b81525081565b60408051808201909152601781527626b0b93634b71023b7bb32b93730b731b2902a37b5b2b760491b60209091015260007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a8667f59269cbca1208251d90fa95662317aad0c2a0b4ed01fd7809a1a8c310572a7d6610cd1611016565b30604051602001610ce59493929190611c34565b60405160208183030381529060405280519060200120905060007fee15044614b31d47e846313dae86ff14f14a42386a492dcc6b086cdd1600a14a89898986604051602001610d38959493929190611bff565b60405160208183030381529060405280519060200120905060008282604051602001610d65929190611bbc565b604051602081830303815290604052805190602001209050600060018289898960405160008152602001604052604051610da29493929190611c58565b6020604051602081039080840390855afa158015610dc4573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610df75760405162461bcd60e51b815260040161059790611d3f565b6001600160a01b03811660009081526005602052604090208054600181019091558a14610e365760405162461bcd60e51b815260040161059790611e12565b88421115610e565760405162461bcd60e51b815260040161059790611d85565b61060a818c876114bd565b6000610e6d338461090c565b610e895760405162461bcd60e51b815260040161059790611eb1565b6000610ead836040518060600160405280602681526020016121f860269139611194565b9050610eba338583611202565b5060019392505050565b6001600160a01b03811660009081526004602052604081205463ffffffff1680610eef576000610958565b6001600160a01b0383166000908152600360209081526040808320600019850163ffffffff168452909152902054600160201b90046001600160601b03169392505050565b69017b7883c0691660000081565b60085460ff1681565b6001600160a01b039182166000908152602081815260408083209390941682529190915220546001600160601b031690565b610c3133838361101a565b60026020908152600092835260408084209091529082529020546001600160601b031681565b7fee15044614b31d47e846313dae86ff14f14a42386a492dcc6b086cdd1600a14a81565b600360209081526000928352604080842090915290825290205463ffffffff811690600160201b90046001600160601b031682565b6006546001600160a01b031681565b4690565b6001600160a01b038084166000908152600260209081526040808320938616835292815290829020548251808401909352601b83527f436f6d703a20756e64656c65676174657320756e646572666c6f7700000000009183019190915261108e916001600160601b039091169083906111c3565b6001600160a01b038481166000908152600260209081526040808320938716835292815282822080546001600160601b0319166001600160601b03958616179055818052908290205482518084019093526019835278436f6d703a2064656c65676174657320756e646572666c6f7760381b918301919091526111149216908390611630565b6001600160a01b03848116600081815260026020908152604080832083805290915280822080546001600160601b0319166001600160601b0396909616959095179094559251918516917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f908490a461118f8260008361166c565b505050565b600081600160601b84106111bb5760405162461bcd60e51b81526004016105979190611c76565b509192915050565b6000836001600160601b0316836001600160601b0316111582906111fa5760405162461bcd60e51b81526004016105979190611c76565b505050900390565b6001600160a01b0383166112285760405162461bcd60e51b815260040161059790611f53565b6001600160a01b03831660009081526002602090815260408083208380529091529020546001600160601b03808316911610156112775760405162461bcd60e51b815260040161059790611cc9565b6001600160a01b03821661129d5760405162461bcd60e51b815260040161059790611e54565b6001600160a01b0383166000908152600160209081526040918290205482516060810190935260368084526112e8936001600160601b03909216928592919061219d908301396111c3565b6001600160a01b038416600090815260016020908152604080832080546001600160601b0319166001600160601b039586161790556002825280832083805282529182902054825160608101909352603280845261135694919091169285929091906122da908301396111c3565b6001600160a01b038481166000908152600260209081526040808320838052825280832080546001600160601b0319166001600160601b03968716179055928616825260018152908290205482516060810190935260308084526113ca94919091169285929091906122aa90830139611630565b6001600160a01b038316600090815260016020908152604080832080546001600160601b0319166001600160601b0395861617905560028252808320838052825291829020548251606081019093526030808452611438949190911692859290919061225290830139611630565b6001600160a01b0383811660008181526002602090815260408083208380529091529081902080546001600160601b0319166001600160601b0395909516949094179093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906114b0908590612156565b60405180910390a3505050565b6001600160a01b03831660009081526002602090815260408083208380528252918290205482518084019093526019835278436f6d703a2064656c65676174657320756e646572666c6f7760381b91830191909152611529916001600160601b039091169083906111c3565b6001600160a01b038481166000908152600260209081526040808320838052825280832080546001600160601b0319166001600160601b03968716179055928616825290829020548251808401909352601883527f436f6d703a2064656c656761746573206f766572666c6f770000000000000000918301919091526115b29216908390611630565b6001600160a01b0384811660008181526002602090815260408083209488168084529490915280822080546001600160601b0319166001600160601b03969096169590951790945592519192917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f908390a461118f6000838361166c565b6000838301826001600160601b0380871690831610156116635760405162461bcd60e51b81526004016105979190611c76565b50949350505050565b816001600160a01b0316836001600160a01b03161415801561169757506000816001600160601b0316115b1561118f576001600160a01b0383161561174f576001600160a01b03831660009081526004602052604081205463ffffffff1690816116d7576000611716565b6001600160a01b0385166000908152600360209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b9050600061173d8285604051806060016040528060288152602001612282602891396111c3565b905061174b86848484611806565b5050505b6001600160a01b0382161561118f576001600160a01b03821660009081526004602052604081205463ffffffff16908161178a5760006117c9565b6001600160a01b0384166000908152600360209081526040808320600019860163ffffffff168452909152902054600160201b90046001600160601b03165b905060006117f0828560405180606001604052806027815260200161234960279139611630565b90506117fe85848484611806565b505050505050565b600061182a4360405180606001604052806034815260200161221e603491396119bb565b905060008463ffffffff1611801561187357506001600160a01b038516600090815260036020908152604080832063ffffffff6000198901811685529252909120548282169116145b156118d2576001600160a01b0385166000908152600360209081526040808320600019880163ffffffff168452909152902080546fffffffffffffffffffffffff000000001916600160201b6001600160601b03851602179055611971565b60408051808201825263ffffffff80841682526001600160601b0380861660208085019182526001600160a01b038b166000818152600383528781208c871682528352878120965187549451909516600160201b026fffffffffffffffffffffffff000000001995871663ffffffff19958616179590951694909417909555938252600490935292909220805460018801909316929091169190911790555b846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72484846040516119ac92919061216a565b60405180910390a25050505050565b600081600160201b84106111bb5760405162461bcd60e51b81526004016105979190611c76565b604080518082019091526000808252602082015290565b80356001600160a01b038116811461070157600080fd5b80356001600160601b038116811461070157600080fd5b600060208284031215611a38578081fd5b61095883836119f9565b60008060408385031215611a54578081fd5b611a5e84846119f9565b9150611a6d84602085016119f9565b90509250929050565b600080600060608486031215611a8a578081fd5b8335611a9581612184565b92506020840135611aa581612184565b929592945050506040919091013590565b60008060408385031215611ac8578182fd5b611ad284846119f9565b946020939093013593505050565b600080600080600080600060e0888a031215611afa578283fd5b611b0489896119f9565b96506020880135955060408801359450606088013560ff81168114611b27578384fd5b93506080880135925060a08801359150611b448960c08a01611a10565b905092959891949750929550565b60008060408385031215611b64578182fd5b611b6e84846119f9565b9150602083013563ffffffff81168114611b86578182fd5b809150509250929050565b60008060408385031215611ba3578182fd5b611bad84846119f9565b9150611a6d8460208501611a10565b61190160f01b81526002810192909252602282015260420190565b6001600160a01b0391909116815260200190565b901515815260200190565b90815260200190565b9485526001600160a01b03939093166020850152604084019190915260608301526001600160601b0316608082015260a00190565b938452602084019290925260408301526001600160a01b0316606082015260800190565b93845260ff9290921660208401526040830152606082015260800190565b6000602080835283518082850152825b81811015611ca257858101830151858201604001528201611c86565b81811115611cb35783604083870101525b50601f01601f1916929092016040019392505050565b60208082526050908201527f436f6d703a205f7472616e73666572546f6b656e733a20756e64656c6567617460408201527f656420616d6f756e742073686f756c642062652067726561746572207468616e60608201526f081d1c985b9cd9995c88185b5bdd5b9d60821b608082015260a00190565b60208082526026908201527f436f6d703a3a64656c656761746542795369673a20696e76616c6964207369676040820152656e617475726560d01b606082015260800190565b60208082526026908201527f436f6d703a3a64656c656761746542795369673a207369676e617475726520656040820152651e1c1a5c995960d21b606082015260800190565b60208082526027908201527f436f6d703a3a6765745072696f72566f7465733a206e6f742079657420646574604082015266195c9b5a5b995960ca1b606082015260800190565b60208082526022908201527f436f6d703a3a64656c656761746542795369673a20696e76616c6964206e6f6e604082015261636560f01b606082015260800190565b6020808252603a908201527f436f6d703a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260408201527f616e7366657220746f20746865207a65726f2061646472657373000000000000606082015260800190565b602080825260409082018190527f41746c65617374206f6620746865206164647265737320286d73672e73656e64908201527f6572206f7220647374292073686f756c642062652077686974656c6973746564606082015260800190565b60208082526024908201527f436f6d703a3a756e64656c656761746542795369673a20696e76616c6964206e6040820152636f6e636560e01b606082015260800190565b6020808252603c908201527f436f6d703a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260408201527f616e736665722066726f6d20746865207a65726f206164647265737300000000606082015260800190565b60208082526018908201527f4f6e6c792061646d696e2063616e2077686974656c6973740000000000000000604082015260600190565b60208082526039908201527f41746c65617374206f662074686520616464726573732028737263206f72206460408201527f7374292073686f756c642062652077686974656c697374656400000000000000606082015260800190565b60208082526024908201527f4f6e6c7920656e61626c652063616e20656e61626c6520616c6c207472616e736040820152636665727360e01b606082015260800190565b60208082526028908201527f436f6d703a3a756e64656c656761746542795369673a207369676e617475726560408201526708195e1c1a5c995960c21b606082015260800190565b60208082526028908201527f436f6d703a3a756e64656c656761746542795369673a20696e76616c6964207360408201526769676e617475726560c01b606082015260800190565b63ffffffff91909116815260200190565b63ffffffff9290921682526001600160601b0316602082015260400190565b60ff91909116815260200190565b6001600160601b0391909116815260200190565b6001600160601b0392831681529116602082015260400190565b6001600160a01b038116811461219957600080fd5b5056fe436f6d703a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e6365436f6d703a3a617070726f76653a20616d6f756e7420657863656564732039362062697473436f6d703a3a7472616e736665723a20616d6f756e7420657863656564732039362062697473436f6d703a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473436f6d703a205f7472616e73666572546f6b656e733a20756e64656c6567617465206164646974696f6e206572726f72436f6d703a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f7773436f6d703a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f7773436f6d703a205f7472616e666572546f6b656e733a20756e64656c6567617465207375627472616374696f6e206572726f72436f6d703a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e6365436f6d703a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f7773a2646970667358221220ac45491b4f5299399623af40ff3b35539f580eca66e68ed00d923e73b2bed40664736f6c634300060c0033436f6d703a205375627472616374696f6e206f766572666c6f7720696e2074686520636f6e7374727563746f72ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"; diff --git a/packages/chain-events/src/contractTypes/factories/Migrations__factory.ts b/packages/chain-events/src/contractTypes/factories/Migrations__factory.ts new file mode 100644 index 00000000000..1009f3d19a9 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/Migrations__factory.ts @@ -0,0 +1,100 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { Migrations } from "../Migrations"; + +export class Migrations__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): Migrations { + return super.attach(address) as Migrations; + } + connect(signer: Signer): Migrations__factory { + return super.connect(signer) as Migrations__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Migrations { + return new Contract(address, _abi, signerOrProvider) as Migrations; + } +} + +const _abi = [ + { + inputs: [], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "last_completed_migration", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "completed", + type: "uint256", + }, + ], + name: "setCompleted", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "new_address", + type: "address", + }, + ], + name: "upgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50600080546001600160a01b031916331790556101b4806100326000396000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80630900f01014610051578063445df0ac146100795780638da5cb5b14610093578063fdacd576146100b7575b600080fd5b6100776004803603602081101561006757600080fd5b50356001600160a01b03166100d4565b005b610081610151565b60408051918252519081900360200190f35b61009b610157565b604080516001600160a01b039092168252519081900360200190f35b610077600480360360208110156100cd57600080fd5b5035610166565b6000546001600160a01b031633141561014e576000819050806001600160a01b031663fdacd5766001546040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561013457600080fd5b505af1158015610148573d6000803e3d6000fd5b50505050505b50565b60015481565b6000546001600160a01b031681565b6000546001600160a01b031633141561014e5760015556fea2646970667358221220d4bbcad6d30040d80bb42a8f3b8db9b7d1c9968aa4a441a030fb7eb542ebb55964736f6c634300060c0033"; diff --git a/packages/chain-events/src/contractTypes/factories/Moloch1__factory.ts b/packages/chain-events/src/contractTypes/factories/Moloch1__factory.ts new file mode 100644 index 00000000000..3347e5ea6d2 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/Moloch1__factory.ts @@ -0,0 +1,855 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { Moloch1 } from "../Moloch1"; + +export class Moloch1__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + summoner: string, + _approvedToken: string, + _periodDuration: BigNumberish, + _votingPeriodLength: BigNumberish, + _gracePeriodLength: BigNumberish, + _abortWindow: BigNumberish, + _proposalDeposit: BigNumberish, + _dilutionBound: BigNumberish, + _processingReward: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + summoner, + _approvedToken, + _periodDuration, + _votingPeriodLength, + _gracePeriodLength, + _abortWindow, + _proposalDeposit, + _dilutionBound, + _processingReward, + overrides || {} + ) as Promise; + } + getDeployTransaction( + summoner: string, + _approvedToken: string, + _periodDuration: BigNumberish, + _votingPeriodLength: BigNumberish, + _gracePeriodLength: BigNumberish, + _abortWindow: BigNumberish, + _proposalDeposit: BigNumberish, + _dilutionBound: BigNumberish, + _processingReward: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + summoner, + _approvedToken, + _periodDuration, + _votingPeriodLength, + _gracePeriodLength, + _abortWindow, + _proposalDeposit, + _dilutionBound, + _processingReward, + overrides || {} + ); + } + attach(address: string): Moloch1 { + return super.attach(address) as Moloch1; + } + connect(signer: Signer): Moloch1__factory { + return super.connect(signer) as Moloch1__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Moloch1 { + return new Contract(address, _abi, signerOrProvider) as Moloch1; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "summoner", + type: "address", + }, + { + internalType: "address", + name: "_approvedToken", + type: "address", + }, + { + internalType: "uint256", + name: "_periodDuration", + type: "uint256", + }, + { + internalType: "uint256", + name: "_votingPeriodLength", + type: "uint256", + }, + { + internalType: "uint256", + name: "_gracePeriodLength", + type: "uint256", + }, + { + internalType: "uint256", + name: "_abortWindow", + type: "uint256", + }, + { + internalType: "uint256", + name: "_proposalDeposit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_dilutionBound", + type: "uint256", + }, + { + internalType: "uint256", + name: "_processingReward", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "applicantAddress", + type: "address", + }, + ], + name: "Abort", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "applicant", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "memberAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "tokenTribute", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "sharesRequested", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "didPass", + type: "bool", + }, + ], + name: "ProcessProposal", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "memberAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "sharesToBurn", + type: "uint256", + }, + ], + name: "Ragequit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "delegateKey", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "memberAddress", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "applicant", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "tokenTribute", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "sharesRequested", + type: "uint256", + }, + ], + name: "SubmitProposal", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "delegateKey", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "memberAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint8", + name: "uintVote", + type: "uint8", + }, + ], + name: "SubmitVote", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "summoner", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "shares", + type: "uint256", + }, + ], + name: "SummonComplete", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "memberAddress", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newDelegateKey", + type: "address", + }, + ], + name: "UpdateDelegateKey", + type: "event", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + ], + name: "abort", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "abortWindow", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "approvedToken", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "highestIndexYesVote", + type: "uint256", + }, + ], + name: "canRagequit", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "dilutionBound", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getCurrentPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "memberAddress", + type: "address", + }, + { + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + ], + name: "getMemberProposalVote", + outputs: [ + { + internalType: "enum Moloch1.Vote", + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getProposalQueueLength", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "gracePeriodLength", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "guildBank", + outputs: [ + { + internalType: "contract GuildBank1", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "startingPeriod", + type: "uint256", + }, + ], + name: "hasVotingPeriodExpired", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "memberAddressByDelegateKey", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "members", + outputs: [ + { + internalType: "address", + name: "delegateKey", + type: "address", + }, + { + internalType: "uint256", + name: "shares", + type: "uint256", + }, + { + internalType: "bool", + name: "exists", + type: "bool", + }, + { + internalType: "uint256", + name: "highestIndexYesVote", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "periodDuration", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + ], + name: "processProposal", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "processingReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalDeposit", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "proposalQueue", + outputs: [ + { + internalType: "address", + name: "proposer", + type: "address", + }, + { + internalType: "address", + name: "applicant", + type: "address", + }, + { + internalType: "uint256", + name: "sharesRequested", + type: "uint256", + }, + { + internalType: "uint256", + name: "startingPeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "yesVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "noVotes", + type: "uint256", + }, + { + internalType: "bool", + name: "processed", + type: "bool", + }, + { + internalType: "bool", + name: "didPass", + type: "bool", + }, + { + internalType: "bool", + name: "aborted", + type: "bool", + }, + { + internalType: "uint256", + name: "tokenTribute", + type: "uint256", + }, + { + internalType: "string", + name: "details", + type: "string", + }, + { + internalType: "uint256", + name: "maxTotalSharesAtYesVote", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "sharesToBurn", + type: "uint256", + }, + ], + name: "ragequit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "applicant", + type: "address", + }, + { + internalType: "uint256", + name: "tokenTribute", + type: "uint256", + }, + { + internalType: "uint256", + name: "sharesRequested", + type: "uint256", + }, + { + internalType: "string", + name: "details", + type: "string", + }, + ], + name: "submitProposal", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + { + internalType: "uint8", + name: "uintVote", + type: "uint8", + }, + ], + name: "submitVote", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "summoningTime", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalShares", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSharesRequested", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "newDelegateKey", + type: "address", + }, + ], + name: "updateDelegateKey", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "votingPeriodLength", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x60806040526000600a556000600b553480156200001b57600080fd5b5060405162003ae038038062003ae083398181016040526101208110156200004257600080fd5b508051602082015160408301516060840151608085015160a086015160c087015160e0880151610100909801519697959694959394929391929091906001600160a01b038916620000c55760405162461bcd60e51b815260040180806020018281038252602a815260200180620038ab602a913960400191505060405180910390fd5b6001600160a01b0388166200010c5760405162461bcd60e51b815260040180806020018281038252603081526020018062003a806030913960400191505060405180910390fd5b600087116200014d5760405162461bcd60e51b815260040180806020018281038252603181526020018062003a4f6031913960400191505060405180910390fd5b600086116200018e5760405162461bcd60e51b815260040180806020018281038252603581526020018062003a1a6035913960400191505060405180910390fd5b670de0b6b3a7640000861115620001d75760405162461bcd60e51b8152600401808060200182810382526037815260200180620038d56037913960400191505060405180910390fd5b670de0b6b3a7640000851115620002205760405162461bcd60e51b8152600401808060200182810382526036815260200180620039e46036913960400191505060405180910390fd5b60008411620002615760405162461bcd60e51b815260040180806020018281038252602e8152602001806200387d602e913960400191505060405180910390fd5b85841115620002a25760405162461bcd60e51b81526004018080602001828103825260578152602001806200398d6057913960600191505060405180910390fd5b60008211620002e35760405162461bcd60e51b815260040180806020018281038252603081526020018062003ab06030913960400191505060405180910390fd5b670de0b6b3a76400008211156200032c5760405162461bcd60e51b81526004018080602001828103825260328152602001806200395b6032913960400191505060405180910390fd5b808310156200036d5760405162461bcd60e51b815260040180806020018281038252604f8152602001806200390c604f913960600191505060405180910390fd5b600880546001600160a01b0319166001600160a01b038a161790556040518890620003989062000580565b6001600160a01b03909116815260405190819003602001906000f080158015620003c6573d6000803e3d6000fd5b50600960006101000a8154816001600160a01b0302191690836001600160a01b03160217905550866000819055508560018190555084600281905550836003819055508260048190555081600581905550806006819055504260078190555060405180608001604052808a6001600160a01b03168152602001600181526020016001151581526020016000815250600c60008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055506060820151816003015590505088600d60008b6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001600a81905550886001600160a01b03167f03995a801b13c36325306deef859ef977ce61c6e15a794281bf969d20482522760016040518082815260200191505060405180910390a25050505050505050506200058e565b610750806200312d83390190565b612b8f806200059e6000396000f3fe608060405234801561001057600080fd5b506004361061018e5760003560e01c80638340bbce116100de578063a3dc380011610097578063b470aade11610071578063b470aade1461057a578063bab4625914610582578063e50701f41461058a578063e63bc62d146105a75761018e565b8063a3dc38001461054d578063a42afd291461056a578063afe5475f146105725761018e565b80638340bbce146104075780638436593f1461040f5780638b15a6051461042c5780639425a47614610434578063962006c31461046557806399653fbe146105275761018e565b80633a98ef391161014b57806363858f2d1161012557806363858f2d146103e75780637896ddaf146103ef578063797daf70146103f75780637d5b6c72146103ff5761018e565b80633a98ef391461028b5780633b214a7414610293578063402c1794146103a55761018e565b806303e32fa114610193578063044a0ca8146101ad578063086146d2146101fd57806308ae4b0c146102055780631a396a4a1461025b5780632582bf2a14610263575b600080fd5b61019b6105c4565b60408051918252519081900360200190f35b6101d9600480360360408110156101c357600080fd5b506001600160a01b0381351690602001356105ca565b604051808260028111156101e957fe5b60ff16815260200191505060405180910390f35b61019b6106a6565b61022b6004803603602081101561021b57600080fd5b50356001600160a01b03166106d5565b604080516001600160a01b0390951685526020850193909352901515838301526060830152519081900360800190f35b61019b61070c565b6102896004803603602081101561027957600080fd5b50356001600160a01b0316610712565b005b61019b610903565b6102b0600480360360208110156102a957600080fd5b5035610909565b604051808d6001600160a01b03166001600160a01b031681526020018c6001600160a01b03166001600160a01b031681526020018b81526020018a815260200189815260200188815260200187151515158152602001861515151581526020018515151515815260200184815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561035f578181015183820152602001610347565b50505050905090810190601f16801561038c5780820380516001836020036101000a031916815260200191505b509d505050505050505050505050505060405180910390f35b6103cb600480360360208110156103bb57600080fd5b50356001600160a01b0316610a18565b604080516001600160a01b039092168252519081900360200190f35b61019b610a33565b61019b610a39565b61019b610a3f565b61019b610a45565b61019b610a4b565b6102896004803603602081101561042557600080fd5b5035610a51565b61019b610c69565b6104516004803603602081101561044a57600080fd5b5035610c6f565b604080519115158252519081900360200190f35b6102896004803603608081101561047b57600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156104b257600080fd5b8201836020820111156104c457600080fd5b803590602001918460018302840111640100000000831117156104e657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c96945050505050565b6102896004803603604081101561053d57600080fd5b508035906020013560ff166111f3565b6104516004803603602081101561056357600080fd5b50356115ed565b6103cb61165a565b61019b611669565b61019b61166f565b6103cb611675565b610289600480360360208110156105a057600080fd5b5035611684565b610289600480360360208110156105bd57600080fd5b50356118f5565b60065481565b6001600160a01b0382166000908152600c602052604081206002015460ff166106245760405162461bcd60e51b81526004018080602001828103825260348152602001806128306034913960400191505060405180910390fd5b600e5482106106645760405162461bcd60e51b81526004018080602001828103825260368152602001806125d66036913960400191505060405180910390fd5b600e828154811061067157fe5b600091825260208083206001600160a01b0387168452600a600b90930201919091019052604090205460ff1690505b92915050565b60006106cf6000546106c36007544261205e90919063ffffffff16565b9063ffffffff6120a716565b90505b90565b600c6020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909160ff9091169084565b600b5481565b336000908152600c60205260409020600101546107605760405162461bcd60e51b81526004018080602001828103825260218152602001806124b26021913960400191505060405180910390fd5b6001600160a01b0381166107a55760405162461bcd60e51b8152600401808060200182810382526036815260200180612a866036913960400191505060405180910390fd5b6001600160a01b038116331461087a576001600160a01b0381166000908152600c602052604090206002015460ff16156108105760405162461bcd60e51b815260040180806020018281038252603b815260200180612477603b913960400191505060405180910390fd5b6001600160a01b038082166000908152600d60209081526040808320549093168252600c9052206002015460ff161561087a5760405162461bcd60e51b815260040180806020018281038252604181526020018061295b6041913960600191505060405180910390fd5b336000818152600c6020908152604080832080546001600160a01b039081168552600d845282852080546001600160a01b031990811690915590871680865294839020805482168717905581541684178155815193845290519093927fde7b64a369e10562cc2e71f0f1f944eaf144b75fead6ecb51fac9c4dd693488592908290030190a25050565b600a5481565b600e818154811061091657fe5b6000918252602091829020600b909102018054600180830154600280850154600386015460048701546005880154600689015460078a015460088b01805460408051601f6000199d8416156101009081029e909e019093169a909a049182018f90048f028a018f0190528089526001600160a01b039b8c169e5098909a169b959a94999398929760ff808416989484048116976201000090940416959194919392830182828015610a085780601f106109dd57610100808354040283529160200191610a08565b820191906000526020600020905b8154815290600101906020018083116109eb57829003601f168201915b505050505090806009015490508c565b600d602052600090815260409020546001600160a01b031681565b60025481565b60035481565b600e5490565b60075481565b60015481565b336000908152600c6020526040902060010154610a9f5760405162461bcd60e51b81526004018080602001828103825260218152602001806124b26021913960400191505060405180910390fd5b600a54336000908152600c602052604090206001810154831115610af45760405162461bcd60e51b8152600401808060200182810382526026815260200180612a396026913960400191505060405180910390fd5b610b0181600301546115ed565b610b3c5760405162461bcd60e51b815260040180806020018281038252605e815260200180612748605e913960600191505060405180910390fd5b6001810154610b51908463ffffffff61205e16565b6001820155600a54610b69908463ffffffff61205e16565b600a5560095460408051635ae2fb3960e11b8152336004820152602481018690526044810185905290516001600160a01b039092169163b5c5f672916064808201926020929091908290030181600087803b158015610bc757600080fd5b505af1158015610bdb573d6000803e3d6000fd5b505050506040513d6020811015610bf157600080fd5b5051610c2e5760405162461bcd60e51b815260040180806020018281038252603d8152602001806124d3603d913960400191505060405180910390fd5b60408051848152905133917f667cb7a1818eacd2e3a421e734429ba9c4c7dec85e578e098b6d72cd2bfbf2f6919081900360200190a2505050565b60045481565b6000610c86600154836120e990919063ffffffff16565b610c8e6106a6565b101592915050565b336000908152600d60209081526040808320546001600160a01b03168352600c909152902060010154610cfa5760405162461bcd60e51b81526004018080602001828103825260258152602001806125106025913960400191505060405180910390fd5b6001600160a01b038416610d3f5760405162461bcd60e51b815260040180806020018281038252602e81526020018061266f602e913960400191505060405180910390fd5b670de0b6b3a7640000610d6f83610d63600b54600a546120e990919063ffffffff16565b9063ffffffff6120e916565b1115610dac5760405162461bcd60e51b81526004018080602001828103825260328152602001806128a36032913960400191505060405180910390fd5b600b54610dbf908363ffffffff6120e916565b600b55336000818152600d60209081526040808320546008546004805484516323b872dd60e01b815291820197909752306024820152604481019690965291516001600160a01b039182169592909116936323b872dd93606480850194919392918390030190829087803b158015610e3657600080fd5b505af1158015610e4a573d6000803e3d6000fd5b505050506040513d6020811015610e6057600080fd5b5051610e9d5760405162461bcd60e51b815260040180806020018281038252603f8152602001806123c1603f913960400191505060405180910390fd5b600854604080516323b872dd60e01b81526001600160a01b03888116600483015230602483015260448201889052915191909216916323b872dd9160648083019260209291908290030181600087803b158015610ef957600080fd5b505af1158015610f0d573d6000803e3d6000fd5b505050506040513d6020811015610f2357600080fd5b5051610f605760405162461bcd60e51b81526004018080602001828103825260368152602001806125356036913960400191505060405180910390fd5b6000610fb86001610d63610f726106a6565b600e5415610fb057600e8054610f8f90600163ffffffff61205e16565b81548110610f9957fe5b90600052602060002090600b020160030154610fb3565b60005b612143565b9050610fc26122af565b604051806101800160405280846001600160a01b03168152602001886001600160a01b03168152602001868152602001838152602001600081526020016000815260200160001515815260200160001515815260200160001515815260200187815260200185815260200160008152509050600e819080600181540180825580915050906001820390600052602060002090600b02016000909192909190915060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020155606082015181600301556080820151816004015560a0820151816005015560c08201518160060160006101000a81548160ff02191690831515021790555060e08201518160060160016101000a81548160ff0219169083151502179055506101008201518160060160026101000a81548160ff021916908315150217905550610120820151816007015561014082015181600801908051906020019061116d929190612328565b50610160919091015160099091015550600e5460009061119490600163ffffffff61205e16565b60408051828152602081018a905280820189905290519192506001600160a01b03808b16929087169133917f2d105ebbc222c190059b3979356e13469f6a29a350add74ac3bf4f22f16301d69181900360600190a45050505050505050565b336000908152600d60209081526040808320546001600160a01b03168352600c9091529020600101546112575760405162461bcd60e51b81526004018080602001828103825260258152602001806125106025913960400191505060405180910390fd5b336000908152600d60209081526040808320546001600160a01b0316808452600c909252909120600e5484106112be5760405162461bcd60e51b815260040180806020018281038252602c8152602001806127a6602c913960400191505060405180910390fd5b6000600e85815481106112cd57fe5b90600052602060002090600b0201905060038460ff161061131f5760405162461bcd60e51b8152600401808060200182810382526031815260200180612abc6031913960400191505060405180910390fd5b60008460ff16600281111561133057fe5b9050816003015461133f6106a6565b101561137c5760405162461bcd60e51b815260040180806020018281038252603281526020018061299c6032913960400191505060405180910390fd5b6113898260030154610c6f565b156113c55760405162461bcd60e51b81526004018080602001828103825260378152602001806126ca6037913960400191505060405180910390fd5b6001600160a01b0384166000908152600a8301602052604081205460ff1660028111156113ee57fe5b1461142a5760405162461bcd60e51b815260040180806020018281038252603e81526020018061291d603e913960400191505060405180910390fd5b600181600281111561143857fe5b148061144f5750600281600281111561144d57fe5b145b61148a5760405162461bcd60e51b815260040180806020018281038252603281526020018061260c6032913960400191505060405180910390fd5b600682015462010000900460ff16156114d45760405162461bcd60e51b815260040180806020018281038252602e8152602001806129ce602e913960400191505060405180910390fd5b6001600160a01b0384166000908152600a830160205260409020805482919060ff1916600183600281111561150557fe5b0217905550600181600281111561151857fe5b141561156c57600183015460048301546115379163ffffffff6120e916565b6004830155600383015486111561155057600383018690555b8160090154600a54111561156757600a5460098301555b61159f565b600281600281111561157a57fe5b141561159f57600183015460058301546115999163ffffffff6120e916565b60058301555b6040805160ff8716815290516001600160a01b03861691339189917f29bf0061f2faa9daa482f061b116195432d435536d8af4ae6b3c5dd78223679b919081900360200190a4505050505050565b600e5460009082106116305760405162461bcd60e51b815260040180806020018281038252602d81526020018061269d602d913960400191505060405180910390fd5b600e828154811061163d57fe5b60009182526020909120600b909102016006015460ff1692915050565b6009546001600160a01b031681565b60055481565b60005481565b6008546001600160a01b031681565b600e5481106116c45760405162461bcd60e51b8152600401808060200182810382526027815260200180612a5f6027913960400191505060405180910390fd5b6000600e82815481106116d357fe5b60009182526020909120600b9091020160018101549091506001600160a01b031633146117315760405162461bcd60e51b815260040180806020018281038252602c8152602001806125aa602c913960400191505060405180910390fd5b60038054908201546117489163ffffffff6120e916565b6117506106a6565b1061178c5760405162461bcd60e51b815260040180806020018281038252603181526020018061263e6031913960400191505060405180910390fd5b600681015462010000900460ff16156117d65760405162461bcd60e51b815260040180806020018281038252603b81526020018061243c603b913960400191505060405180910390fd5b60078101805460009182905560068301805462ff000019166201000017905560085460018401546040805163a9059cbb60e01b81526001600160a01b0392831660048201526024810185905290519394919092169263a9059cbb926044808201936020939283900390910190829087803b15801561185357600080fd5b505af1158015611867573d6000803e3d6000fd5b505050506040513d602081101561187d57600080fd5b50516118ba5760405162461bcd60e51b815260040180806020018281038252603f815260200180612864603f913960400191505060405180910390fd5b60408051338152905184917fa749dd3df92cae4d106b3eadf60c0dffd3698de09c67ce58ce6f5d02eb821313919081900360200190a2505050565b600e5481106119355760405162461bcd60e51b8152600401808060200182810382526031815260200180612b2a6031913960400191505060405180910390fd5b6000600e828154811061194457fe5b90600052602060002090600b02019050611973600254610d6360015484600301546120e990919063ffffffff16565b61197b6106a6565b10156119b85760405162461bcd60e51b815260040180806020018281038252603f81526020018061256b603f913960400191505060405180910390fd5b600681015460ff16156119fc5760405162461bcd60e51b815260040180806020018281038252603d815260200180612aed603d913960400191505060405180910390fd5b811580611a395750600e611a1783600163ffffffff61205e16565b81548110611a2157fe5b600091825260209091206006600b90920201015460ff165b611a745760405162461bcd60e51b815260040180806020018281038252603d8152602001806127d2603d913960400191505060405180910390fd5b60068101805460ff191660011790556002810154600b54611a9a9163ffffffff61205e16565b600b55600580820154600483015460098401549254600a54929091119291611ac79163ffffffff61215a16565b1015611ad1575060005b808015611ae95750600682015462010000900460ff16155b15611d895760068201805461ff00191661010017905560018201546001600160a01b03166000908152600c602052604090206002015460ff1615611b7e5760028201546001808401546001600160a01b03166000908152600c602052604090200154611b5a9163ffffffff6120e916565b6001808401546001600160a01b03166000908152600c602052604090200155611ca5565b60018201546001600160a01b039081166000908152600d60209081526040808320549093168252600c9052206002015460ff1615611c085760018201546001600160a01b039081166000908152600d602090815260408083205490931680835283832080546001600160a01b03199081168317909155600c90925292909120805490911690911790555b60408051608081018252600180850180546001600160a01b039081168085526002808901546020808801918252878901878152600060608a01818152958152600c83528a812099518a549088166001600160a01b0319918216178b559351988a019890985551928801805493151560ff19909416939093179092559151600390960195909555915416808352600d90935292902080549092161790555b6002820154600a54611cbc9163ffffffff6120e916565b600a5560085460095460078401546040805163a9059cbb60e01b81526001600160a01b039384166004820152602481019290925251919092169163a9059cbb9160448083019260209291908290030181600087803b158015611d1d57600080fd5b505af1158015611d31573d6000803e3d6000fd5b505050506040513d6020811015611d4757600080fd5b5051611d845760405162461bcd60e51b815260040180806020018281038252603d8152602001806129fc603d913960400191505060405180910390fd5b611e50565b600854600183015460078401546040805163a9059cbb60e01b81526001600160a01b039384166004820152602481019290925251919092169163a9059cbb9160448083019260209291908290030181600087803b158015611de957600080fd5b505af1158015611dfd573d6000803e3d6000fd5b505050506040513d6020811015611e1357600080fd5b5051611e505760405162461bcd60e51b815260040180806020018281038252603c815260200180612400603c913960400191505060405180910390fd5b6008546006546040805163a9059cbb60e01b81523360048201526024810192909252516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b158015611ea757600080fd5b505af1158015611ebb573d6000803e3d6000fd5b505050506040513d6020811015611ed157600080fd5b5051611f0e5760405162461bcd60e51b81526004018080602001828103825260488152602001806128d56048913960600191505060405180910390fd5b60085482546006546004546001600160a01b039384169363a9059cbb931691611f3d919063ffffffff61205e16565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015611f8c57600080fd5b505af1158015611fa0573d6000803e3d6000fd5b505050506040513d6020811015611fb657600080fd5b5051611ff35760405162461bcd60e51b81526004018080602001828103825260478152602001806127016047913960600191505060405180910390fd5b815460018301546007840154600285015460408051928352602083019190915284151582820152516001600160a01b0393841693929092169186917f3f6fc303a82367bb4947244ba21c569a5ed2e870610f1a693366142309d7cbea919081900360600190a4505050565b60006120a083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506121b3565b9392505050565b60006120a083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061224a565b6000828201838110156120a0576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008183101561215357816120a0565b5090919050565b600082612169575060006106a0565b8282028284828161217657fe5b04146120a05760405162461bcd60e51b815260040180806020018281038252602181526020018061280f6021913960400191505060405180910390fd5b600081848411156122425760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156122075781810151838201526020016121ef565b50505050905090810190601f1680156122345780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836122995760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156122075781810151838201526020016121ef565b5060008385816122a557fe5b0495945050505050565b60405180610180016040528060006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581526020016000151581526020016000815260200160608152602001600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061236957805160ff1916838001178555612396565b82800160010185558215612396579182015b8281111561239657825182559160200191906001019061237b565b506123a29291506123a6565b5090565b6106d291905b808211156123a257600081556001016123ac56fe4d6f6c6f63683a3a7375626d697450726f706f73616c202d2070726f706f73616c206465706f73697420746f6b656e207472616e73666572206661696c65644d6f6c6f63683a3a70726f6365737350726f706f73616c202d206661696c696e6720766f746520746f6b656e207472616e73666572206661696c65644d6f6c6f63683a3a61626f7274202d2070726f706f73616c206d757374206e6f74206861766520616c7265616479206265656e2061626f727465644d6f6c6f63683a3a75706461746544656c65676174654b6579202d2063616e74206f7665727772697465206578697374696e67206d656d626572734d6f6c6f63683a3a6f6e6c794d656d626572202d206e6f742061206d656d6265724d6f6c6f63683a3a7261676571756974202d207769746864726177616c206f6620746f6b656e732066726f6d206775696c6442616e6b206661696c65644d6f6c6f63683a3a6f6e6c7944656c6567617465202d206e6f7420612064656c65676174654d6f6c6f63683a3a7375626d697450726f706f73616c202d207472696275746520746f6b656e207472616e73666572206661696c65644d6f6c6f63683a3a70726f6365737350726f706f73616c202d2070726f706f73616c206973206e6f7420726561647920746f2062652070726f6365737365644d6f6c6f63683a3a61626f7274202d206d73672e73656e646572206d757374206265206170706c6963616e744d6f6c6f63683a3a6765744d656d62657250726f706f73616c566f7465202d2070726f706f73616c20646f65736e27742065786973744d6f6c6f63683a3a7375626d6974566f7465202d20766f7465206d7573742062652065697468657220596573206f72204e6f4d6f6c6f63683a3a61626f7274202d2061626f72742077696e646f77206d757374206e6f742068617665207061737365644d6f6c6f63683a3a7375626d697450726f706f73616c202d206170706c6963616e742063616e6e6f7420626520304d6f6c6f63683a3a63616e5261676571756974202d2070726f706f73616c20646f6573206e6f742065786973744d6f6c6f63683a3a7375626d6974566f7465202d2070726f706f73616c20766f74696e6720706572696f642068617320657870697265644d6f6c6f63683a3a70726f6365737350726f706f73616c202d206661696c656420746f2072657475726e2070726f706f73616c206465706f73697420746f2070726f706f7365724d6f6c6f63683a3a7261676571756974202d2063616e7420726167657175697420756e74696c206869676865737420696e6465782070726f706f73616c206d656d62657220766f74656420594553206f6e2069732070726f6365737365644d6f6c6f63683a3a7375626d6974566f7465202d2070726f706f73616c20646f6573206e6f742065786973744d6f6c6f63683a3a70726f6365737350726f706f73616c202d2070726576696f75732070726f706f73616c206d7573742062652070726f636573736564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774d6f6c6f63683a3a6765744d656d62657250726f706f73616c566f7465202d206d656d62657220646f65736e27742065786973744d6f6c6f63683a3a70726f6365737350726f706f73616c202d206661696c656420746f2072657475726e207472696275746520746f206170706c6963616e744d6f6c6f63683a3a7375626d697450726f706f73616c202d20746f6f206d616e7920736861726573207265717565737465644d6f6c6f63683a3a70726f6365737350726f706f73616c202d206661696c656420746f2073656e642070726f63657373696e672072657761726420746f206d73672e73656e6465724d6f6c6f63683a3a7375626d6974566f7465202d206d656d6265722068617320616c726561647920766f746564206f6e20746869732070726f706f73616c4d6f6c6f63683a3a75706461746544656c65676174654b6579202d2063616e74206f7665727772697465206578697374696e672064656c6567617465206b6579734d6f6c6f63683a3a7375626d6974566f7465202d20766f74696e6720706572696f6420686173206e6f7420737461727465644d6f6c6f63683a3a7375626d6974566f7465202d2070726f706f73616c20686173206265656e2061626f727465644d6f6c6f63683a3a70726f6365737350726f706f73616c202d20746f6b656e207472616e7366657220746f206775696c642062616e6b206661696c65644d6f6c6f63683a3a7261676571756974202d20696e73756666696369656e74207368617265734d6f6c6f63683a3a61626f7274202d2070726f706f73616c20646f6573206e6f742065786973744d6f6c6f63683a3a75706461746544656c65676174654b6579202d206e657744656c65676174654b65792063616e6e6f7420626520304d6f6c6f63683a3a7375626d6974566f7465202d2075696e74566f7465206d757374206265206c657373207468616e20334d6f6c6f63683a3a70726f6365737350726f706f73616c202d2070726f706f73616c2068617320616c7265616479206265656e2070726f6365737365644d6f6c6f63683a3a70726f6365737350726f706f73616c202d2070726f706f73616c20646f6573206e6f74206578697374a265627a7a72315820bb5597b3a98673a23dc7a0ddf1ed0a66781d90a78b9e5ad44d41be9759199a5b64736f6c63430005100032608060405234801561001057600080fd5b506040516107503803806107508339818101604052602081101561003357600080fd5b505160006100486001600160e01b036100b716565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350600180546001600160a01b0319166001600160a01b03929092169190911790556100bb565b3390565b610686806100ca6000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c8063715018a6146100675780638da5cb5b146100715780638f32d59b14610095578063b5c5f672146100b1578063bab46259146100e3578063f2fde38b146100eb575b600080fd5b61006f610111565b005b6100796101b4565b604080516001600160a01b039092168252519081900360200190f35b61009d6101c3565b604080519115158252519081900360200190f35b61009d600480360360608110156100c757600080fd5b506001600160a01b0381351690602081013590604001356101e7565b6100796103ac565b61006f6004803603602081101561010157600080fd5b50356001600160a01b03166103bb565b6101196101c3565b61016a576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b600080546001600160a01b03166101d8610420565b6001600160a01b031614905090565b60006101f16101c3565b610242576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600154604080516370a0823160e01b815230600482015290516000926102e09286926102d49289926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561029c57600080fd5b505afa1580156102b0573d6000803e3d6000fd5b505050506040513d60208110156102c657600080fd5b50519063ffffffff61042416565b9063ffffffff61048616565b6040805182815290519192506001600160a01b038716917f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b659181900360200190a26001546040805163a9059cbb60e01b81526001600160a01b038881166004830152602482018590529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561037757600080fd5b505af115801561038b573d6000803e3d6000fd5b505050506040513d60208110156103a157600080fd5b505195945050505050565b6001546001600160a01b031681565b6103c36101c3565b610414576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b61041d816104c8565b50565b3390565b60008261043357506000610480565b8282028284828161044057fe5b041461047d5760405162461bcd60e51b81526004018080602001828103825260218152602001806106316021913960400191505060405180910390fd5b90505b92915050565b600061047d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610568565b6001600160a01b03811661050d5760405162461bcd60e51b815260040180806020018281038252602681526020018061060b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081836105f45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156105b95781810151838201526020016105a1565b50505050905090810190601f1680156105e65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161060057fe5b049594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a72315820ceb74c16f002cccdb9bcfc5028b8d1a622d0ac391e8e685d8b190eb57d48b25864736f6c634300051000324d6f6c6f63683a3a636f6e7374727563746f72202d205f61626f727457696e646f772063616e6e6f7420626520304d6f6c6f63683a3a636f6e7374727563746f72202d2073756d6d6f6e65722063616e6e6f7420626520304d6f6c6f63683a3a636f6e7374727563746f72202d205f766f74696e67506572696f644c656e6774682065786365656473206c696d69744d6f6c6f63683a3a636f6e7374727563746f72202d205f70726f706f73616c4465706f7369742063616e6e6f7420626520736d616c6c6572207468616e205f70726f63657373696e675265776172644d6f6c6f63683a3a636f6e7374727563746f72202d205f64696c7574696f6e426f756e642065786365656473206c696d69744d6f6c6f63683a3a636f6e7374727563746f72202d205f61626f727457696e646f77206d75737420626520736d616c6c6572207468616e206f7220657175616c20746f205f766f74696e67506572696f644c656e6774684d6f6c6f63683a3a636f6e7374727563746f72202d205f6772616365506572696f644c656e6774682065786365656473206c696d69744d6f6c6f63683a3a636f6e7374727563746f72202d205f766f74696e67506572696f644c656e6774682063616e6e6f7420626520304d6f6c6f63683a3a636f6e7374727563746f72202d205f706572696f644475726174696f6e2063616e6e6f7420626520304d6f6c6f63683a3a636f6e7374727563746f72202d205f617070726f766564546f6b656e2063616e6e6f7420626520304d6f6c6f63683a3a636f6e7374727563746f72202d205f64696c7574696f6e426f756e642063616e6e6f742062652030"; diff --git a/packages/chain-events/src/contractTypes/factories/Moloch2__factory.ts b/packages/chain-events/src/contractTypes/factories/Moloch2__factory.ts new file mode 100644 index 00000000000..81ae7357aff --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/Moloch2__factory.ts @@ -0,0 +1,1070 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { Moloch2 } from "../Moloch2"; + +export class Moloch2__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + summoner: string, + _approvedTokens: string[], + _periodDuration: BigNumberish, + _votingPeriodLength: BigNumberish, + _gracePeriodLength: BigNumberish, + _emergencyExitWait: BigNumberish, + _proposalDeposit: BigNumberish, + _dilutionBound: BigNumberish, + _processingReward: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + summoner, + _approvedTokens, + _periodDuration, + _votingPeriodLength, + _gracePeriodLength, + _emergencyExitWait, + _proposalDeposit, + _dilutionBound, + _processingReward, + overrides || {} + ) as Promise; + } + getDeployTransaction( + summoner: string, + _approvedTokens: string[], + _periodDuration: BigNumberish, + _votingPeriodLength: BigNumberish, + _gracePeriodLength: BigNumberish, + _emergencyExitWait: BigNumberish, + _proposalDeposit: BigNumberish, + _dilutionBound: BigNumberish, + _processingReward: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + summoner, + _approvedTokens, + _periodDuration, + _votingPeriodLength, + _gracePeriodLength, + _emergencyExitWait, + _proposalDeposit, + _dilutionBound, + _processingReward, + overrides || {} + ); + } + attach(address: string): Moloch2 { + return super.attach(address) as Moloch2; + } + connect(signer: Signer): Moloch2__factory { + return super.connect(signer) as Moloch2__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Moloch2 { + return new Contract(address, _abi, signerOrProvider) as Moloch2; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "summoner", + type: "address", + }, + { + internalType: "address[]", + name: "_approvedTokens", + type: "address[]", + }, + { + internalType: "uint256", + name: "_periodDuration", + type: "uint256", + }, + { + internalType: "uint256", + name: "_votingPeriodLength", + type: "uint256", + }, + { + internalType: "uint256", + name: "_gracePeriodLength", + type: "uint256", + }, + { + internalType: "uint256", + name: "_emergencyExitWait", + type: "uint256", + }, + { + internalType: "uint256", + name: "_proposalDeposit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_dilutionBound", + type: "uint256", + }, + { + internalType: "uint256", + name: "_processingReward", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "applicantAddress", + type: "address", + }, + ], + name: "CancelProposal", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "applicant", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "memberAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "tributeOffered", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "sharesRequested", + type: "uint256", + }, + { + indexed: false, + internalType: "bool", + name: "didPass", + type: "bool", + }, + ], + name: "ProcessProposal", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "memberAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "sharesToBurn", + type: "uint256", + }, + ], + name: "Ragequit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "delegateKey", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "memberAddress", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "applicant", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "tributeOffered", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "sharesRequested", + type: "uint256", + }, + ], + name: "SubmitProposal", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "delegateKey", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "memberAddress", + type: "address", + }, + { + indexed: false, + internalType: "uint8", + name: "uintVote", + type: "uint8", + }, + ], + name: "SubmitVote", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "summoner", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "shares", + type: "uint256", + }, + ], + name: "SummonComplete", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "memberAddress", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newDelegateKey", + type: "address", + }, + ], + name: "UpdateDelegateKey", + type: "event", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "approvedTokens", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "highestIndexYesVote", + type: "uint256", + }, + ], + name: "canRagequit", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "cancelProposal", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "depositToken", + outputs: [ + { + internalType: "contract IERC20", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "dilutionBound", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "emergencyExitWait", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getCurrentPeriod", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "memberAddress", + type: "address", + }, + { + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + ], + name: "getMemberProposalVote", + outputs: [ + { + internalType: "enum Moloch2.Vote", + name: "", + type: "uint8", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "getProposalQueueLength", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "gracePeriodLength", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "guildBank", + outputs: [ + { + internalType: "contract GuildBank2", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "startingPeriod", + type: "uint256", + }, + ], + name: "hasVotingPeriodExpired", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "memberAddressByDelegateKey", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "members", + outputs: [ + { + internalType: "address", + name: "delegateKey", + type: "address", + }, + { + internalType: "uint256", + name: "shares", + type: "uint256", + }, + { + internalType: "bool", + name: "exists", + type: "bool", + }, + { + internalType: "uint256", + name: "highestIndexYesVote", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "periodDuration", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + ], + name: "processProposal", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "processingReward", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalCount", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "proposalDeposit", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "proposalQueue", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "proposals", + outputs: [ + { + internalType: "address", + name: "applicant", + type: "address", + }, + { + internalType: "address", + name: "proposer", + type: "address", + }, + { + internalType: "address", + name: "sponsor", + type: "address", + }, + { + internalType: "uint256", + name: "sharesRequested", + type: "uint256", + }, + { + internalType: "uint256", + name: "tributeOffered", + type: "uint256", + }, + { + internalType: "contract IERC20", + name: "tributeToken", + type: "address", + }, + { + internalType: "uint256", + name: "paymentRequested", + type: "uint256", + }, + { + internalType: "contract IERC20", + name: "paymentToken", + type: "address", + }, + { + internalType: "uint256", + name: "startingPeriod", + type: "uint256", + }, + { + internalType: "uint256", + name: "yesVotes", + type: "uint256", + }, + { + internalType: "uint256", + name: "noVotes", + type: "uint256", + }, + { + internalType: "string", + name: "details", + type: "string", + }, + { + internalType: "uint256", + name: "maxTotalSharesAtYesVote", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "proposedToKick", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "proposedToWhitelist", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "sharesToBurn", + type: "uint256", + }, + ], + name: "ragequit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "sharesToBurn", + type: "uint256", + }, + { + internalType: "contract IERC20[]", + name: "tokenList", + type: "address[]", + }, + ], + name: "safeRagequit", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "sponsorProposal", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "memberToKick", + type: "address", + }, + { + internalType: "string", + name: "details", + type: "string", + }, + ], + name: "submitGuildKickProposal", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "applicant", + type: "address", + }, + { + internalType: "uint256", + name: "sharesRequested", + type: "uint256", + }, + { + internalType: "uint256", + name: "tributeOffered", + type: "uint256", + }, + { + internalType: "address", + name: "tributeToken", + type: "address", + }, + { + internalType: "uint256", + name: "paymentRequested", + type: "uint256", + }, + { + internalType: "address", + name: "paymentToken", + type: "address", + }, + { + internalType: "string", + name: "details", + type: "string", + }, + ], + name: "submitProposal", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "proposalIndex", + type: "uint256", + }, + { + internalType: "uint8", + name: "uintVote", + type: "uint8", + }, + ], + name: "submitVote", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "tokenToWhitelist", + type: "address", + }, + { + internalType: "string", + name: "details", + type: "string", + }, + ], + name: "submitWhitelistProposal", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "summoningTime", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + name: "tokenWhitelist", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalShares", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSharesRequested", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "newDelegateKey", + type: "address", + }, + ], + name: "updateDelegateKey", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "votingPeriodLength", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x60806040526000600a556000600b556000600c553480156200002057600080fd5b50604051620053fc380380620053fc83398181016040526101208110156200004757600080fd5b8151602083018051604051929492938301929190846401000000008211156200006f57600080fd5b9083019060208201858111156200008557600080fd5b8251866020820283011164010000000082111715620000a357600080fd5b82525081516020918201928201910280838360005b83811015620000d2578181015183820152602001620000b8565b505050509190910160409081526020830151908301516060840151608085015160a086015160c087015160e090970151949850929650909490935090916001600160a01b038916620001565760405162461bcd60e51b815260040180806020018281038252602a815260200180620051ba602a913960400191505060405180910390fd5b60008711620001975760405162461bcd60e51b81526004018080602001828103825260318152602001806200533d6031913960400191505060405180910390fd5b60008611620001d85760405162461bcd60e51b8152600401808060200182810382526035815260200180620053086035913960400191505060405180910390fd5b670de0b6b3a7640000861115620002215760405162461bcd60e51b8152600401808060200182810382526037815260200180620051e46037913960400191505060405180910390fd5b670de0b6b3a76400008511156200026a5760405162461bcd60e51b81526004018080602001828103825260368152602001806200529c6036913960400191505060405180910390fd5b60008411620002ab5760405162461bcd60e51b8152600401808060200182810382526034815260200180620051866034913960400191505060405180910390fd5b60008211620002ec5760405162461bcd60e51b81526004018080602001828103825260308152602001806200539e6030913960400191505060405180910390fd5b670de0b6b3a7640000821115620003355760405162461bcd60e51b81526004018080602001828103825260328152602001806200526a6032913960400191505060405180910390fd5b6000885111620003775760405162461bcd60e51b8152600401808060200182810382526036815260200180620052d26036913960400191505060405180910390fd5b80831015620003b85760405162461bcd60e51b815260040180806020018281038252604f8152602001806200521b604f913960600191505060405180910390fd5b87600081518110620003c657fe5b6020908102919091010151600880546001600160a01b0319166001600160a01b0390921691909117905560005b8851811015620005825760006001600160a01b03168982815181106200041557fe5b60200260200101516001600160a01b03161415620004655760405162461bcd60e51b81526004018080602001828103825260308152602001806200536e6030913960400191505060405180910390fd5b600d60008a83815181106200047657fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1615620004db5760405162461bcd60e51b815260040180806020018281038252602e815260200180620053ce602e913960400191505060405180910390fd5b6001600d60008b8481518110620004ee57fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550600e8982815181106200053c57fe5b60209081029190910181015182546001808201855560009485529290932090920180546001600160a01b0319166001600160a01b039093169290921790915501620003f3565b50604051620005919062000768565b604051809103906000f080158015620005ae573d6000803e3d6000fd5b50600960006101000a8154816001600160a01b0302191690836001600160a01b03160217905550866000819055508560018190555084600281905550836003819055508260048190555081600581905550806006819055504260078190555060405180608001604052808a6001600160a01b03168152602001600181526020016001151581526020016000815250601160008b6001600160a01b03166001600160a01b0316815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055506060820151816003015590505088601260008b6001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a8154816001600160a01b0302191690836001600160a01b031602179055506001600b81905550886001600160a01b03167f03995a801b13c36325306deef859ef977ce61c6e15a794281bf969d20482522760016040518082815260200191505060405180910390a250505050505050505062000776565b610927806200485f83390190565b6140d980620007866000396000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c80638340bbce11610125578063b470aade116100ad578063de9ee2021161007c578063de9ee202146107bd578063e0a8f6f514610865578063e178034514610882578063e63bc62d146108a8578063feb7ea1d146108c55761021c565b8063b470aade1461079d578063c89039c5146107a5578063da298998146107ad578063da35c664146107b55761021c565b80639746d940116100f45780639746d9401461072d57806399653fbe1461074a578063a3dc380014610770578063a42afd291461078d578063afe5475f146107955761021c565b80638340bbce146106e35780638436593f146106eb5780638b15a605146107085780639425a476146107105761021c565b80633a98ef39116101a857806357064c581161017757806357064c58146105ce57806363858f2d146106a5578063753d7563146106ad578063797daf70146106d35780637d5b6c72146106db5761021c565b80633a98ef39146105495780633b214a74146105515780633fc24bba1461056e578063402c1794146105a85761021c565b806308ae4b0c116101ef57806308ae4b0c146103d6578063115b2d181461042c5780631a396a4a146104e25780631dafede0146104ea5780632582bf2a146105235761021c565b8063013cf08b1461022157806303e32fa114610364578063044a0ca81461037e578063086146d2146103ce575b600080fd5b61023e6004803603602081101561023757600080fd5b5035610979565b604051808e6001600160a01b03166001600160a01b031681526020018d6001600160a01b03166001600160a01b031681526020018c6001600160a01b03166001600160a01b031681526020018b81526020018a8152602001896001600160a01b03166001600160a01b03168152602001888152602001876001600160a01b03166001600160a01b0316815260200186815260200185815260200184815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b8381101561031d578181015183820152602001610305565b50505050905090810190601f16801561034a5780820380516001836020036101000a031916815260200191505b509e50505050505050505050505050505060405180910390f35b61036c610ad6565b60408051918252519081900360200190f35b6103aa6004803603604081101561039457600080fd5b506001600160a01b038135169060200135610adc565b604051808260028111156103ba57fe5b60ff16815260200191505060405180910390f35b61036c610bc6565b6103fc600480360360208110156103ec57600080fd5b50356001600160a01b0316610bf5565b604080516001600160a01b0390951685526020850193909352901515838301526060830152519081900360800190f35b6104e06004803603604081101561044257600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561046c57600080fd5b82018360208201111561047e57600080fd5b803590602001918460018302840111600160201b8311171561049f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610c2c945050505050565b005b61036c610eba565b6105076004803603602081101561050057600080fd5b5035610ec0565b604080516001600160a01b039092168252519081900360200190f35b6104e06004803603602081101561053957600080fd5b50356001600160a01b0316610ee7565b61036c6110d8565b61036c6004803603602081101561056757600080fd5b50356110de565b6105946004803603602081101561058457600080fd5b50356001600160a01b03166110fc565b604080519115158252519081900360200190f35b610507600480360360208110156105be57600080fd5b50356001600160a01b0316611111565b6104e0600480360360e08110156105e457600080fd5b6001600160a01b038235811692602081013592604082013592606083013581169260808101359260a08201359092169181019060e0810160c0820135600160201b81111561063157600080fd5b82018360208201111561064357600080fd5b803590602001918460018302840111600160201b8311171561066457600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061112c945050505050565b61036c61150b565b610594600480360360208110156106c357600080fd5b50356001600160a01b0316611511565b61036c611526565b61036c61152c565b61036c611532565b6104e06004803603602081101561070157600080fd5b5035611538565b61036c6115ed565b6105946004803603602081101561072657600080fd5b50356115f3565b6104e06004803603602081101561074357600080fd5b503561161a565b6104e06004803603604081101561076057600080fd5b508035906020013560ff16611b8e565b6105946004803603602081101561078657600080fd5b5035611f91565b61050761202a565b61036c612039565b61036c61203f565b610507612045565b61036c612054565b61036c61205a565b6104e0600480360360408110156107d357600080fd5b81359190810190604081016020820135600160201b8111156107f457600080fd5b82018360208201111561080657600080fd5b803590602001918460208302840111600160201b8311171561082757600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550612060945050505050565b6104e06004803603602081101561087b57600080fd5b50356121c2565b6105946004803603602081101561089857600080fd5b50356001600160a01b031661237a565b6104e0600480360360208110156108be57600080fd5b503561238f565b6104e0600480360360408110156108db57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561090557600080fd5b82018360208201111561091757600080fd5b803590602001918460018302840111600160201b8311171561093857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612df8945050505050565b60136020528060005260406000206000915090508060000160009054906101000a90046001600160a01b0316908060010160009054906101000a90046001600160a01b0316908060020160009054906101000a90046001600160a01b0316908060030154908060040154908060050160009054906101000a90046001600160a01b0316908060060154908060070160009054906101000a90046001600160a01b03169080600801549080600901549080600a01549080600c018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ac65780601f10610a9b57610100808354040283529160200191610ac6565b820191906000526020600020905b815481529060010190602001808311610aa957829003601f168201915b50505050509080600d015490508d565b60065481565b6001600160a01b03821660009081526011602052604081206002015460ff16610b365760405162461bcd60e51b8152600401808060200182810382526034815260200180613d9d6034913960400191505060405180910390fd5b6014548210610b765760405162461bcd60e51b81526004018080602001828103825260368152602001806139e16036913960400191505060405180910390fd5b6013600060148481548110610b8757fe5b6000918252602080832090910154835282810193909352604091820181206001600160a01b0387168252600e0190925290205460ff1690505b92915050565b6000610bef600054610be36007544261309190919063ffffffff16565b9063ffffffff6130da16565b90505b90565b60116020526000908152604090208054600182015460028301546003909301546001600160a01b0390921692909160ff9091169084565b6001600160a01b038216600090815260116020526040902060010154610c835760405162461bcd60e51b8152600401808060200182810382526045815260200180613d586045913960600191505060405180910390fd5b610c8b6134f9565b600160a0820152610c9a613517565b604051806101c00160405280856001600160a01b03168152602001336001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160006001600160a01b031681526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001838152602001848152602001600081525090508060136000600a54815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c0820151816006015560e08201518160070160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101008201518160080155610120820151816009015561014082015181600a015561016082015181600b01906006610e7f9291906135b9565b506101808201518051610e9c91600c84019160209091019061364b565b506101a09190910151600d909101555050600a805460010190555050565b600c5481565b600e8181548110610ecd57fe5b6000918252602090912001546001600160a01b0316905081565b33600090815260116020526040902060010154610f355760405162461bcd60e51b81526004018080602001828103825260218152602001806138336021913960400191505060405180910390fd5b6001600160a01b038116610f7a5760405162461bcd60e51b8152600401808060200182810382526036815260200180613f946036913960400191505060405180910390fd5b6001600160a01b038116331461104f576001600160a01b03811660009081526011602052604090206002015460ff1615610fe55760405162461bcd60e51b815260040180806020018281038252603b8152602001806137c3603b913960400191505060405180910390fd5b6001600160a01b03808216600090815260126020908152604080832054909316825260119052206002015460ff161561104f5760405162461bcd60e51b8152600401808060200182810382526041815260200180613ebe6041913960600191505060405180910390fd5b33600081815260116020908152604080832080546001600160a01b0390811685526012845282852080546001600160a01b031990811690915590871680865294839020805482168717905581541684178155815193845290519093927fde7b64a369e10562cc2e71f0f1f944eaf144b75fead6ecb51fac9c4dd693488592908290030190a25050565b600b5481565b601481815481106110eb57fe5b600091825260209091200154905081565b60106020526000908152604090205460ff1681565b6012602052600090815260409020546001600160a01b031681565b6001600160a01b0384166000908152600d602052604090205460ff166111835760405162461bcd60e51b8152600401808060200182810382526038815260200180613a496038913960400191505060405180910390fd5b6001600160a01b0382166000908152600d602052604090205460ff166111da5760405162461bcd60e51b81526004018080602001828103825260338152602001806139ae6033913960400191505060405180910390fd5b6001600160a01b03871661121f5760405162461bcd60e51b815260040180806020018281038252602e815260200180613aaf602e913960400191505060405180910390fd5b604080516323b872dd60e01b81523360048201523060248201526044810187905290516001600160a01b038616916323b872dd9160648083019260209291908290030181600087803b15801561127457600080fd5b505af1158015611288573d6000803e3d6000fd5b505050506040513d602081101561129e57600080fd5b50516112db5760405162461bcd60e51b81526004018080602001828103825260368152602001806138f36036913960400191505060405180910390fd5b6112e36134f9565b6112eb613517565b604051806101c001604052808a6001600160a01b03168152602001336001600160a01b0316815260200160006001600160a01b03168152602001898152602001888152602001876001600160a01b03168152602001868152602001856001600160a01b03168152602001600081526020016000815260200160008152602001838152602001848152602001600081525090508060136000600a54815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c0820151816006015560e08201518160070160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101008201518160080155610120820151816009015561014082015181600a015561016082015181600b019060066114cb9291906135b9565b5061018082015180516114e891600c84019160209091019061364b565b506101a09190910151600d909101555050600a8054600101905550505050505050565b60025481565b600d6020526000908152604090205460ff1681565b60145490565b60075481565b60015481565b336000908152601160205260409020600101546115865760405162461bcd60e51b81526004018080602001828103825260218152602001806138336021913960400191505060405180910390fd5b6115ea81600e8054806020026020016040519081016040528092919081815260200182805480156115e057602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115c2575b505050505061311c565b50565b60045481565b600061160a6001548361333390919063ffffffff16565b611612610bc6565b101592915050565b336000908152601260209081526040808320546001600160a01b03168352601190915290206001015461167e5760405162461bcd60e51b81526004018080602001828103825260258152602001806138ce6025913960400191505060405180910390fd5b60085460048054604080516323b872dd60e01b815233938101939093523060248401526044830191909152516001600160a01b03909216916323b872dd916064808201926020929091908290030181600087803b1580156116de57600080fd5b505af11580156116f2573d6000803e3d6000fd5b505050506040513d602081101561170857600080fd5b50516117455760405162461bcd60e51b815260040180806020018281038252603f8152602001806136fe603f913960400191505060405180910390fd5b61174d613517565b600082815260136020908152604080832081516101c08101835281546001600160a01b0390811682526001830154811694820194909452600282015484168184015260038201546060820152600482015460808201526005820154841660a082015260068083015460c080840191909152600784015490951660e083015260088301546101008301526009830154610120830152600a830154610140830152835194850193849052909491936101608601939092600b86019291908390855b825461010083900a900460ff16151581526020600192830181810494850194909303909202910180841161180c57505050928452505050600c8201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156118cf5780601f106118a4576101008083540402835291602001916118cf565b820191906000526020600020905b8154815290600101906020018083116118b257829003601f168201915b50505050508152602001600d8201548152505090508061016001516000600681106118f657fe5b6020020151156119375760405162461bcd60e51b815260040180806020018281038252603d815260200180613891603d913960400191505060405180910390fd5b610160810151606001511561197d5760405162461bcd60e51b81526004018080602001828103825260358152602001806137fe6035913960400191505060405180910390fd5b61016081015160800151156119e25760a08101516001600160a01b03166000908152600f602052604090205460ff16156119b657600080fd5b60a08101516001600160a01b03166000908152600f60205260409020805460ff19166001179055611acd565b61016081015160a0015115611a415780516001600160a01b031660009081526010602052604090205460ff1615611a1857600080fd5b80516001600160a01b03166000908152601060205260409020805460ff19166001179055611acd565b670de0b6b3a7640000611a758260600151611a69600c54600b5461333390919063ffffffff16565b9063ffffffff61333316565b1115611ab25760405162461bcd60e51b8152600401808060200182810382526032815260200180613e066032913960400191505060405180910390fd5b6060810151600c54611ac99163ffffffff61333316565b600c555b6000611b366001611a69611adf610bc6565b60145415611b2e5760148054601391600091611b0290600163ffffffff61309116565b81548110611b0c57fe5b9060005260206000200154815260200190815260200160002060080154611b31565b60005b61338d565b6101008301525033600090815260126020526040808220546001600160a01b03169201919091526014805460018101825591527fce6d7b5282bd9a3661ae061feed1dbda4e52ab073b1f9285be6e155d9c38d4ec0155565b336000908152601260209081526040808320546001600160a01b031683526011909152902060010154611bf25760405162461bcd60e51b81526004018080602001828103825260258152602001806138ce6025913960400191505060405180910390fd5b336000908152601260209081526040808320546001600160a01b031680845260119092529091206014548410611c595760405162461bcd60e51b815260040180806020018281038252602c815260200180613bd3602c913960400191505060405180910390fd5b60006013600060148781548110611c6c57fe5b90600052602060002001548152602001908152602001600020905060038460ff1610611cc95760405162461bcd60e51b8152600401808060200182810382526031815260200180613fca6031913960400191505060405180910390fd5b60008460ff166002811115611cda57fe5b600b83015490915060ff16611d205760405162461bcd60e51b8152600401808060200182810382526034815260200180613b416034913960400191505060405180910390fd5b8160080154611d2d610bc6565b1015611d6a5760405162461bcd60e51b8152600401808060200182810382526032815260200180613eff6032913960400191505060405180910390fd5b611d7782600801546115f3565b15611db35760405162461bcd60e51b8152600401808060200182810382526037815260200180613b0a6037913960400191505060405180910390fd5b6001600160a01b0384166000908152600e8301602052604081205460ff166002811115611ddc57fe5b14611e185760405162461bcd60e51b815260040180806020018281038252603e815260200180613e80603e913960400191505060405180910390fd5b6001816002811115611e2657fe5b1480611e3d57506002816002811115611e3b57fe5b145b611e785760405162461bcd60e51b8152600401808060200182810382526032815260200180613a176032913960400191505060405180910390fd5b6001600160a01b0384166000908152600e830160205260409020805482919060ff19166001836002811115611ea957fe5b02179055506001816002811115611ebc57fe5b1415611f105760018301546009830154611edb9163ffffffff61333316565b60098301556003830154861115611ef457600383018690555b81600d0154600b541115611f0b57600b54600d8301555b611f43565b6002816002811115611f1e57fe5b1415611f43576001830154600a830154611f3d9163ffffffff61333316565b600a8301555b6040805160ff8716815290516001600160a01b03861691339189917f29bf0061f2faa9daa482f061b116195432d435536d8af4ae6b3c5dd78223679b919081900360200190a4505050505050565b6014546000908210611fd45760405162461bcd60e51b815260040180806020018281038252602d815260200180613add602d913960400191505060405180910390fd5b6013600060148481548110611fe557fe5b90600052602060002001548152602001908152602001600020600b0160016006811061200d57fe5b602081049091015460ff601f9092166101000a9004169050919050565b6009546001600160a01b031681565b60055481565b60005481565b6008546001600160a01b031681565b60035481565b600a5481565b336000908152601160205260409020600101546120ae5760405162461bcd60e51b81526004018080602001828103825260218152602001806138336021913960400191505060405180910390fd5b60005b81518110156121b357600d60008383815181106120ca57fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff1661212c5760405162461bcd60e51b815260040180806020018281038252602e815260200180613a81602e913960400191505060405180910390fd5b80156121ab5781600182038151811061214157fe5b60200260200101516001600160a01b031682828151811061215e57fe5b60200260200101516001600160a01b0316116121ab5760405162461bcd60e51b81526004018080602001828103825260468152602001806139686046913960600191505060405180910390fd5b6001016120b1565b506121be828261311c565b5050565b6000818152601360205260409020600b81015460ff16156122145760405162461bcd60e51b815260040180806020018281038252603c815260200180613c82603c913960400191505060405180910390fd5b60018101546001600160a01b0316331461225f5760405162461bcd60e51b8152600401808060200182810382526035815260200180613dd16035913960400191505060405180910390fd5b600b8101805463ff00000019166301000000179055600581015460018201546004808401546040805163a9059cbb60e01b81526001600160a01b0394851693810193909352602483019190915251919092169163a9059cbb9160448083019260209291908290030181600087803b1580156122d957600080fd5b505af11580156122ed573d6000803e3d6000fd5b505050506040513d602081101561230357600080fd5b50516123405760405162461bcd60e51b815260040180806020018281038252603e815260200180613d1a603e913960400191505060405180910390fd5b60408051338152905183917fc215fed6680bb02d323dc3f8b8f85241572607538426059c9232601bd293c3be919081900360200190a25050565b600f6020526000908152604090205460ff1681565b60145481106123cf5760405162461bcd60e51b81526004018080602001828103825260318152602001806140746031913960400191505060405180910390fd5b600060136000601484815481106123e257fe5b90600052602060002001548152602001908152602001600020905061241c600254611a69600154846008015461333390919063ffffffff16565b612424610bc6565b10156124615760405162461bcd60e51b815260040180806020018281038252603f815260200180613929603f913960400191505060405180910390fd5b600b810154610100900460ff16156124aa5760405162461bcd60e51b815260040180806020018281038252603d815260200180614037603d913960400191505060405180910390fd5b81158061251257506013600060146124c985600163ffffffff61309116565b815481106124d357fe5b90600052602060002001548152602001908152602001600020600b016001600681106124fb57fe5b602081049091015460ff601f9092166101000a9004165b61254d5760405162461bcd60e51b815260040180806020018281038252603d815260200180613c45603d913960400191505060405180910390fd5b600b8101805461ff0019166101001790556003810154600c546125759163ffffffff61309116565b600c81905550600081600a0154826009015411905060008090506125b4600354611a69600254611a69600154886008015461333390919063ffffffff16565b6125bc610bc6565b106125c957506000905060015b600d830154600554600b546125e39163ffffffff6133a416565b10156125ee57600091505b6007830154600954604080516370a0823160e01b81526001600160a01b039283166004820152905191909216916370a08231916024808301926020929190829003018186803b15801561264057600080fd5b505afa158015612654573d6000803e3d6000fd5b505050506040513d602081101561266a57600080fd5b505160068401541061267b57600091505b8115612b0a57600b8301805462ff0000191662010000179081905560ff600160201b9091041615612720576005830180546001600160a01b039081166000908152600d60205260408120805460ff191660019081179091559254600e805494850181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd90920180546001600160a01b03191692909116919091179055612b05565b600b83015465010000000000900460ff16156127b65782546001600160a01b031660009081526011602090815260409182902060010154600e80548451818502810185019095528085526127b19492938301828280156115e0576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116115c257505050505061311c565b612b05565b82546001600160a01b031660009081526011602052604090206002015460ff161561282e57600383015483546001600160a01b031660009081526011602052604090206001015461280c9163ffffffff61333316565b83546001600160a01b0316600090815260116020526040902060010155612950565b82546001600160a01b03908116600090815260126020908152604080832054909316825260119052206002015460ff16156128b25782546001600160a01b0390811660009081526012602090815260408083205490931680835283832080546001600160a01b03199081168317909155601190925292909120805490911690911790555b6040805160808101825284546001600160a01b039081168083526003808801546020808601918252600186880181815260006060890181815296815260118452898120985189549089166001600160a01b0319918216178a559451928901929092555160028801805491151560ff19909216919091179055935195909201949094558754909216808252601290925292909220805490911690911790555b6003830154600b546129679163ffffffff61333316565b600b5560058301546009546004808601546040805163a9059cbb60e01b81526001600160a01b0394851693810193909352602483019190915251919092169163a9059cbb9160448083019260209291908290030181600087803b1580156129cd57600080fd5b505af11580156129e1573d6000803e3d6000fd5b505050506040513d60208110156129f757600080fd5b5051612a345760405162461bcd60e51b815260040180806020018281038252603d815260200180613f31603d913960400191505060405180910390fd5b600954600784015484546006860154604080516301e3366760e01b81526001600160a01b039485166004820152928416602484015260448301919091525191909216916301e336679160648083019260209291908290030181600087803b158015612a9e57600080fd5b505af1158015612ab2573d6000803e3d6000fd5b505050506040513d6020811015612ac857600080fd5b5051612b055760405162461bcd60e51b815260040180806020018281038252603b815260200180613cbe603b913960400191505060405180910390fd5b612bdb565b80612bdb57600583015460018401546004808601546040805163a9059cbb60e01b81526001600160a01b0394851693810193909352602483019190915251919092169163a9059cbb9160448083019260209291908290030181600087803b158015612b7457600080fd5b505af1158015612b88573d6000803e3d6000fd5b505050506040513d6020811015612b9e57600080fd5b5051612bdb5760405162461bcd60e51b815260040180806020018281038252603c815260200180613787603c913960400191505060405180910390fd5b600b830154600160201b900460ff1615612c145760058301546001600160a01b03166000908152600f60205260409020805460ff191690555b600b83015465010000000000900460ff1615612c4c5782546001600160a01b03166000908152601060205260409020805460ff191690555b6008546006546040805163a9059cbb60e01b81523360048201526024810192909252516001600160a01b039092169163a9059cbb916044808201926020929091908290030181600087803b158015612ca357600080fd5b505af1158015612cb7573d6000803e3d6000fd5b505050506040513d6020811015612ccd57600080fd5b5051612d0a5760405162461bcd60e51b8152600401808060200182810382526048815260200180613e386048913960600191505060405180910390fd5b60085460028401546006546004546001600160a01b039384169363a9059cbb931691612d3c919063ffffffff61309116565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b158015612d8b57600080fd5b505af1158015612d9f573d6000803e3d6000fd5b505050506040513d6020811015612db557600080fd5b5051612df25760405162461bcd60e51b8152600401808060200182810382526046815260200180613bff6046913960600191505060405180910390fd5b50505050565b6001600160a01b038216612e3d5760405162461bcd60e51b815260040180806020018281038252603c815260200180613ffb603c913960400191505060405180910390fd5b6001600160a01b0382166000908152600d602052604090205460ff1615612e955760405162461bcd60e51b815260040180806020018281038252604a81526020018061373d604a913960600191505060405180910390fd5b612e9d6134f9565b60016080820152612eac613517565b604051806101c0016040528060006001600160a01b03168152602001336001600160a01b0316815260200160006001600160a01b031681526020016000815260200160008152602001856001600160a01b031681526020016000815260200160006001600160a01b03168152602001600081526020016000815260200160008152602001838152602001848152602001600081525090508060136000600a54815260200190815260200160002060008201518160000160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c0820151816006015560e08201518160070160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101008201518160080155610120820151816009015561014082015181600a015561016082015181600b01906006610e7f9291906135b9565b60006130d383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506133fd565b9392505050565b60006130d383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613494565b600b5433600090815260116020526040902060018101548411156131715760405162461bcd60e51b8152600401808060200182810382526026815260200180613f6e6026913960400191505060405180910390fd5b61317e8160030154611f91565b6131b95760405162461bcd60e51b815260040180806020018281038252605e815260200180613b75605e913960600191505060405180910390fd5b60018101546131ce908563ffffffff61309116565b6001820155600b546131e6908563ffffffff61309116565b600b5560095460405163732c8f5760e01b8152336004820181815260248301889052604483018690526080606484019081528751608485015287516001600160a01b039095169463732c8f57948a9389938b939192909160a4909101906020808601910280838360005b83811015613268578181015183820152602001613250565b5050505090500195505050505050602060405180830381600087803b15801561329057600080fd5b505af11580156132a4573d6000803e3d6000fd5b505050506040513d60208110156132ba57600080fd5b50516132f75760405162461bcd60e51b815260040180806020018281038252603d815260200180613854603d913960400191505060405180910390fd5b60408051858152905133917f667cb7a1818eacd2e3a421e734429ba9c4c7dec85e578e098b6d72cd2bfbf2f6919081900360200190a250505050565b6000828201838110156130d3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008183101561339d57816130d3565b5090919050565b6000826133b357506000610bc0565b828202828482816133c057fe5b04146130d35760405162461bcd60e51b8152600401808060200182810382526021815260200180613cf96021913960400191505060405180910390fd5b6000818484111561348c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613451578181015183820152602001613439565b50505050905090810190601f16801561347e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836134e35760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315613451578181015183820152602001613439565b5060008385816134ef57fe5b0495945050505050565b6040518060c001604052806006906020820280388339509192915050565b604051806101c0016040528060006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600081526020016000815260200160006001600160a01b031681526020016000815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016135a56134f9565b815260200160608152602001600081525090565b60018301918390821561363b5791602002820160005b8382111561360c57835183826101000a81548160ff02191690831515021790555092602001926001016020816000010492830192600103026135cf565b80156136395782816101000a81549060ff021916905560010160208160000104928301926001030261360c565b505b506136479291506136c5565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061368c57805160ff19168380011785556136b9565b828001600101855582156136b9579182015b828111156136b957825182559160200191906001019061369e565b506136479291506136e3565b610bf291905b8082111561364757805460ff191681556001016136cb565b610bf291905b8082111561364757600081556001016136e956fe4d6f6c6f63683a3a7375626d697450726f706f73616c202d2070726f706f73616c206465706f73697420746f6b656e207472616e73666572206661696c65644d6f6c6f63683a3a7375626d697457686974656c69737450726f706f73616c202d2063616e277420616c726561647920686176652077686974656c69737465642074686520746f6b656e4d6f6c6f63683a3a70726f6365737350726f706f73616c202d206661696c696e6720766f746520746f6b656e207472616e73666572206661696c65644d6f6c6f63683a3a75706461746544656c65676174654b6579202d2063616e74206f7665727772697465206578697374696e67206d656d626572734d6f6c6f63683a3a73706f6e736f7250726f706f73616c202d2070726f706f73616c20686173206265656e2063616e63656c6c65644d6f6c6f63683a3a6f6e6c794d656d626572202d206e6f742061206d656d6265724d6f6c6f63683a3a7261676571756974202d207769746864726177616c206f6620746f6b656e732066726f6d206775696c6442616e6b206661696c65644d6f6c6f63683a3a73706f6e736f7250726f706f73616c202d2070726f706f73616c2068617320616c7265616479206265656e2073706f6e736f7265644d6f6c6f63683a3a6f6e6c7944656c6567617465202d206e6f7420612064656c65676174654d6f6c6f63683a3a7375626d697450726f706f73616c202d207472696275746520746f6b656e207472616e73666572206661696c65644d6f6c6f63683a3a70726f6365737350726f706f73616c202d2070726f706f73616c206973206e6f7420726561647920746f2062652070726f6365737365644d6f6c6f63683a3a736166655261676571756974202d20746f6b656e4c697374206d75737420626520756e6971756520616e6420696e20617363656e64696e67206f726465724d6f6c6f63683a3a7375626d697450726f706f73616c202d207061796d656e74206973206e6f742077686974656c69737465644d6f6c6f63683a3a6765744d656d62657250726f706f73616c566f7465202d2070726f706f73616c20646f65736e27742065786973744d6f6c6f63683a3a7375626d6974566f7465202d20766f7465206d7573742062652065697468657220596573206f72204e6f4d6f6c6f63683a3a7375626d697450726f706f73616c202d2074726962757465546f6b656e206973206e6f742077686974656c69737465644d6f6c6f63683a3a73616665526571756974202d20746f6b656e206d7573742062652077686974656c69737465644d6f6c6f63683a3a7375626d697450726f706f73616c202d206170706c6963616e742063616e6e6f7420626520304d6f6c6f63683a3a63616e5261676571756974202d2070726f706f73616c20646f6573206e6f742065786973744d6f6c6f63683a3a7375626d6974566f7465202d2070726f706f73616c20766f74696e6720706572696f642068617320657870697265644d6f6c6f63683a3a7375626d6974566f7465202d2070726f706f73616c20686173206e6f74206265656e2073706f6e736f7265644d6f6c6f63683a3a7261676571756974202d2063616e7420726167657175697420756e74696c206869676865737420696e6465782070726f706f73616c206d656d62657220766f74656420594553206f6e2069732070726f6365737365644d6f6c6f63683a3a7375626d6974566f7465202d2070726f706f73616c20646f6573206e6f742065786973744d6f6c6f63683a3a70726f6365737350726f706f73616c202d206661696c656420746f2072657475726e2070726f706f73616c206465706f73697420746f2073706f6e736f724d6f6c6f63683a3a70726f6365737350726f706f73616c202d2070726576696f75732070726f706f73616c206d7573742062652070726f6365737365644d6f6c6f63683a3a63616e63656c50726f706f73616c202d2070726f706f73616c2068617320616c7265616479206265656e2073706f6e736f7265644d6f6c6f63683a3a70726f6365737350726f706f73616c202d20746f6b656e207061796d656e7420746f206170706c6963616e74206661696c6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774d6f6c6f63683a3a70726f6365737350726f706f73616c202d206661696c656420746f2072657475726e207472696275746520746f2070726f706f7365724d6f6c6f63683a3a7375626d69744775696c644b69636b50726f706f73616c202d206d656d626572206d7573742068617665206174206c65617374206f6e652073686172654d6f6c6f63683a3a6765744d656d62657250726f706f73616c566f7465202d206d656d62657220646f65736e27742065786973744d6f6c6f63683a3a63616e63656c50726f706f73616c202d206f6e6c79207468652070726f706f7365722063616e2063616e63656c4d6f6c6f63683a3a7375626d697450726f706f73616c202d20746f6f206d616e7920736861726573207265717565737465644d6f6c6f63683a3a70726f6365737350726f706f73616c202d206661696c656420746f2073656e642070726f63657373696e672072657761726420746f206d73672e73656e6465724d6f6c6f63683a3a7375626d6974566f7465202d206d656d6265722068617320616c726561647920766f746564206f6e20746869732070726f706f73616c4d6f6c6f63683a3a75706461746544656c65676174654b6579202d2063616e74206f7665727772697465206578697374696e672064656c6567617465206b6579734d6f6c6f63683a3a7375626d6974566f7465202d20766f74696e6720706572696f6420686173206e6f7420737461727465644d6f6c6f63683a3a70726f6365737350726f706f73616c202d20746f6b656e207472616e7366657220746f206775696c642062616e6b206661696c65644d6f6c6f63683a3a7261676571756974202d20696e73756666696369656e74207368617265734d6f6c6f63683a3a75706461746544656c65676174654b6579202d206e657744656c65676174654b65792063616e6e6f7420626520304d6f6c6f63683a3a7375626d6974566f7465202d2075696e74566f7465206d757374206265206c657373207468616e20334d6f6c6f63683a3a7375626d697457686974656c69737450726f706f73616c202d206d7573742070726f7669646520746f6b656e20616464726573734d6f6c6f63683a3a70726f6365737350726f706f73616c202d2070726f706f73616c2068617320616c7265616479206265656e2070726f6365737365644d6f6c6f63683a3a70726f6365737350726f706f73616c202d2070726f706f73616c20646f6573206e6f74206578697374a265627a7a723158202756c727b1eb8bff593fae9646b884da36cdb8a3a3807d92d7ed7340ab8c2c5864736f6c63430005100032608060405260006100176001600160e01b0361006616565b600080546001600160a01b0319166001600160a01b0383169081178255604051929350917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35061006a565b3390565b6108ae806100796000396000f3fe608060405234801561001057600080fd5b50600436106100625760003560e01c806301e3366714610067578063715018a6146100b1578063732c8f57146100bb5780638da5cb5b1461017a5780638f32d59b1461019e578063f2fde38b146101a6575b600080fd5b61009d6004803603606081101561007d57600080fd5b506001600160a01b038135811691602081013590911690604001356101cc565b604080519115158252519081900360200190f35b6100b96102f4565b005b61009d600480360360808110156100d157600080fd5b6001600160a01b03823516916020810135916040820135919081019060808101606082013564010000000081111561010857600080fd5b82018360208201111561011a57600080fd5b8035906020019184602083028401116401000000008311171561013c57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610385945050505050565b6101826105a2565b604080516001600160a01b039092168252519081900360200190f35b61009d6105b1565b6100b9600480360360208110156101bc57600080fd5b50356001600160a01b03166105d5565b60006101d66105b1565b610215576040805162461bcd60e51b8152602060048201819052602482015260008051602061085a833981519152604482015290519081900360640190fd5b836001600160a01b0316836001600160a01b03167f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b6398846040518082815260200191505060405180910390a3836001600160a01b031663a9059cbb84846040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156102c057600080fd5b505af11580156102d4573d6000803e3d6000fd5b505050506040513d60208110156102ea57600080fd5b5051949350505050565b6102fc6105b1565b61033b576040805162461bcd60e51b8152602060048201819052602482015260008051602061085a833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061038f6105b1565b6103ce576040805162461bcd60e51b8152602060048201819052602482015260008051602061085a833981519152604482015290519081900360640190fd5b81516000901561059857600061048f85610483888786815181106103ee57fe5b60200260200101516001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561044b57600080fd5b505afa15801561045f573d6000803e3d6000fd5b505050506040513d602081101561047557600080fd5b50519063ffffffff61062816565b9063ffffffff61068a16565b905083828151811061049d57fe5b60200260200101516001600160a01b0316876001600160a01b03167f2717ead6b9200dd235aad468c9809ea400fe33ac69b5bfaa6d3e90fc922b6398836040518082815260200191505060405180910390a38382815181106104fb57fe5b60200260200101516001600160a01b031663a9059cbb88836040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561056257600080fd5b505af1158015610576573d6000803e3d6000fd5b505050506040513d602081101561058c57600080fd5b5051925061059a915050565b505b949350505050565b6000546001600160a01b031690565b600080546001600160a01b03166105c66106cc565b6001600160a01b031614905090565b6105dd6105b1565b61061c576040805162461bcd60e51b8152602060048201819052602482015260008051602061085a833981519152604482015290519081900360640190fd5b610625816106d0565b50565b60008261063757506000610684565b8282028284828161064457fe5b04146106815760405162461bcd60e51b81526004018080602001828103825260218152602001806108396021913960400191505060405180910390fd5b90505b92915050565b600061068183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610770565b3390565b6001600160a01b0381166107155760405162461bcd60e51b81526004018080602001828103825260268152602001806108136026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b600081836107fc5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156107c15781810151838201526020016107a9565b50505050905090810190601f1680156107ee5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161080857fe5b049594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a265627a7a723158200f13284600f59d49e267071d600bc79ef632f712fa3e225a29f8eabc8629245c64736f6c634300051000324d6f6c6f63683a3a636f6e7374727563746f72202d205f656d657267656e637945786974576169742063616e6e6f7420626520304d6f6c6f63683a3a636f6e7374727563746f72202d2073756d6d6f6e65722063616e6e6f7420626520304d6f6c6f63683a3a636f6e7374727563746f72202d205f766f74696e67506572696f644c656e6774682065786365656473206c696d69744d6f6c6f63683a3a636f6e7374727563746f72202d205f70726f706f73616c4465706f7369742063616e6e6f7420626520736d616c6c6572207468616e205f70726f63657373696e675265776172644d6f6c6f63683a3a636f6e7374727563746f72202d205f64696c7574696f6e426f756e642065786365656473206c696d69744d6f6c6f63683a3a636f6e7374727563746f72202d205f6772616365506572696f644c656e6774682065786365656473206c696d69744d6f6c6f63683a3a636f6e7374727563746f72202d206e656564206174206c65617374206f6e6520617070726f76656420746f6b656e4d6f6c6f63683a3a636f6e7374727563746f72202d205f766f74696e67506572696f644c656e6774682063616e6e6f7420626520304d6f6c6f63683a3a636f6e7374727563746f72202d205f706572696f644475726174696f6e2063616e6e6f7420626520304d6f6c6f63683a3a636f6e7374727563746f72202d205f617070726f766564546f6b656e2063616e6e6f7420626520304d6f6c6f63683a3a636f6e7374727563746f72202d205f64696c7574696f6e426f756e642063616e6e6f7420626520304d6f6c6f63683a3a636f6e7374727563746f72202d206475706c696361746520617070726f76656420746f6b656e"; diff --git a/packages/chain-events/src/contractTypes/factories/Ownable__factory.ts b/packages/chain-events/src/contractTypes/factories/Ownable__factory.ts new file mode 100644 index 00000000000..461d27d4076 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/Ownable__factory.ts @@ -0,0 +1,99 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { Ownable } from "../Ownable"; + +export class Ownable__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Ownable { + return new Contract(address, _abi, signerOrProvider) as Ownable; + } +} + +const _abi = [ + { + inputs: [], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + constant: true, + inputs: [], + name: "isOwner", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "renounceOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/ProposalValidator__factory.ts b/packages/chain-events/src/contractTypes/factories/ProposalValidator__factory.ts new file mode 100644 index 00000000000..377a118e356 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/ProposalValidator__factory.ts @@ -0,0 +1,362 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { ProposalValidator } from "../ProposalValidator"; + +export class ProposalValidator__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + propositionThreshold: BigNumberish, + votingDuration: BigNumberish, + voteDifferential: BigNumberish, + minimumQuorum: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + propositionThreshold, + votingDuration, + voteDifferential, + minimumQuorum, + overrides || {} + ) as Promise; + } + getDeployTransaction( + propositionThreshold: BigNumberish, + votingDuration: BigNumberish, + voteDifferential: BigNumberish, + minimumQuorum: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + propositionThreshold, + votingDuration, + voteDifferential, + minimumQuorum, + overrides || {} + ); + } + attach(address: string): ProposalValidator { + return super.attach(address) as ProposalValidator; + } + connect(signer: Signer): ProposalValidator__factory { + return super.connect(signer) as ProposalValidator__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): ProposalValidator { + return new Contract(address, _abi, signerOrProvider) as ProposalValidator; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "uint256", + name: "propositionThreshold", + type: "uint256", + }, + { + internalType: "uint256", + name: "votingDuration", + type: "uint256", + }, + { + internalType: "uint256", + name: "voteDifferential", + type: "uint256", + }, + { + internalType: "uint256", + name: "minimumQuorum", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [], + name: "MINIMUM_QUORUM", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ONE_HUNDRED_WITH_PRECISION", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PROPOSITION_THRESHOLD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "VOTE_DIFFERENTIAL", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "VOTING_DURATION", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "getMinimumPropositionPowerNeeded", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "votingSupply", + type: "uint256", + }, + ], + name: "getMinimumVotingPowerNeeded", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isProposalPassed", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "isPropositionPowerEnough", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isQuorumValid", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + ], + name: "isVoteDifferentialValid", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "validateCreatorOfProposal", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IAaveGovernanceV2", + name: "governance", + type: "address", + }, + { + internalType: "address", + name: "user", + type: "address", + }, + { + internalType: "uint256", + name: "blockNumber", + type: "uint256", + }, + ], + name: "validateProposalCancellation", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +]; + +const _bytecode = + "0x61010060405234801561001157600080fd5b5060405161102938038061102983398101604081905261003091610047565b60809390935260a09190915260c05260e05261007c565b6000806000806080858703121561005c578384fd5b505082516020840151604085015160609095015191969095509092509050565b60805160a05160c05160e051610f696100c060003980610609528061064e52508061041d52806104905250806104b45250806106fb528061079e5250610f696000f3fe608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063a438d2081161008c578063d0d9029811610066578063d0d9029814610176578063e50f840014610189578063f48cb1341461019c578063fd58afd4146101af576100cf565b8063a438d20814610153578063ace432091461015b578063b159beac1461016e576100cf565b806306fbb3ab146100d45780631d73fd6d146100fd57806331a7bc411461011257806366121042146101255780637aa50080146101385780639125fb581461014b575b600080fd5b6100e76100e2366004610c87565b6101b7565b6040516100f49190610ea4565b60405180910390f35b6101056101dd565b6040516100f49190610eaf565b6100e7610120366004610c47565b6101e3565b6100e7610133366004610c47565b6101f9565b6100e7610146366004610c87565b610302565b61010561048e565b6101056104b2565b6100e7610169366004610c87565b6104d6565b610105610607565b6100e7610184366004610c47565b61062b565b610105610197366004610e5b565b610640565b6101056101aa366004610c87565b61067a565b61010561079c565b60006101c383836104d6565b80156101d457506101d48383610302565b90505b92915050565b61271081565b60006101f08484846101f9565b15949350505050565b600080846001600160a01b03166306be3e8e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561023557600080fd5b505afa158015610249573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061026d9190610c2b565b9050610279858461067a565b604051631420edcb60e31b81526001600160a01b0383169063a1076e58906102a79088908890600401610e8b565b60206040518083038186803b1580156102bf57600080fd5b505afa1580156102d3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102f79190610e73565b101595945050505050565b600061030c610957565b604051633656de2160e01b81526001600160a01b03851690633656de2190610338908690600401610eaf565b60006040518083038186803b15801561035057600080fd5b505afa158015610364573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261038c9190810190610cb2565b90506000816101e001516001600160a01b0316637a71f9d78361010001516040518263ffffffff1660e01b81526004016103c69190610eaf565b60206040518083038186803b1580156103de57600080fd5b505afa1580156103f2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104169190610e73565b90506104667f00000000000000000000000000000000000000000000000000000000000000006104608361045a6127108761018001516107c090919063ffffffff16565b90610819565b9061085b565b6104848261045a6127108661016001516107c090919063ffffffff16565b1195945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006104e0610957565b604051633656de2160e01b81526001600160a01b03851690633656de219061050c908690600401610eaf565b60006040518083038186803b15801561052457600080fd5b505afa158015610538573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105609190810190610cb2565b90506000816101e001516001600160a01b0316637a71f9d78361010001516040518263ffffffff1660e01b815260040161059a9190610eaf565b60206040518083038186803b1580156105b257600080fd5b505afa1580156105c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ea9190610e73565b90506105f581610640565b82610160015110159250505092915050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60006106388484846101f9565b949350505050565b600061067261271061045a847f00000000000000000000000000000000000000000000000000000000000000006107c0565b90505b919050565b600080836001600160a01b03166306be3e8e6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106b657600080fd5b505afa1580156106ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ee9190610c2b565b905061063861271061045a7f0000000000000000000000000000000000000000000000000000000000000000846001600160a01b031663f6b50203886040518263ffffffff1660e01b81526004016107469190610eaf565b60206040518083038186803b15801561075e57600080fd5b505afa158015610772573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107969190610e73565b906107c0565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000826107cf575060006101d7565b828202828482816107dc57fe5b04146101d45760405162461bcd60e51b8152600401808060200182810382526021815260200180610f136021913960400191505060405180910390fd5b60006101d483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506108b5565b6000828201838110156101d4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600081836109415760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156109065781810151838201526020016108ee565b50505050905090810190601f1680156109335780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161094d57fe5b0495945050505050565b6040518061022001604052806000815260200160006001600160a01b0316815260200160006001600160a01b031681526020016060815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160001515815260200160006001600160a01b03168152602001600080191681525090565b805161067581610efa565b600082601f830112610a18578081fd5b8151610a2b610a2682610edc565b610eb8565b818152915060208083019084810181840286018201871015610a4c57600080fd5b60005b84811015610a74578151610a6281610efa565b84529282019290820190600101610a4f565b505050505092915050565b600082601f830112610a8f578081fd5b8151610a9d610a2682610edc565b818152915060208083019084810181840286018201871015610abe57600080fd5b60005b84811015610a7457610ad282610c1b565b84529282019290820190600101610ac1565b6000601f8381840112610af5578182fd5b8251610b03610a2682610edc565b818152925060208084019085810160005b84811015610bb1578151880189603f820112610b2f57600080fd5b8381015167ffffffffffffffff811115610b4557fe5b610b56818901601f19168601610eb8565b81815260408c81848601011115610b6c57600080fd5b60005b83811015610b8a578481018201518382018901528701610b6f565b83811115610b9b5760008885850101525b5050865250509282019290820190600101610b14565b50505050505092915050565b600082601f830112610bcd578081fd5b8151610bdb610a2682610edc565b818152915060208083019084810181840286018201871015610bfc57600080fd5b60005b84811015610a7457815184529282019290820190600101610bff565b8051801515811461067557600080fd5b600060208284031215610c3c578081fd5b81516101d481610efa565b600080600060608486031215610c5b578182fd5b8335610c6681610efa565b92506020840135610c7681610efa565b929592945050506040919091013590565b60008060408385031215610c99578182fd5b8235610ca481610efa565b946020939093013593505050565b600060208284031215610cc3578081fd5b815167ffffffffffffffff80821115610cda578283fd5b8184019150610220808387031215610cf0578384fd5b610cf981610eb8565b905082518152610d0b602084016109fd565b6020820152610d1c604084016109fd565b6040820152606083015182811115610d32578485fd5b610d3e87828601610a08565b606083015250608083015182811115610d55578485fd5b610d6187828601610bbd565b60808301525060a083015182811115610d78578485fd5b610d8487828601610ae4565b60a08301525060c083015182811115610d9b578485fd5b610da787828601610ae4565b60c08301525060e083015182811115610dbe578485fd5b610dca87828601610a7f565b60e083015250610100838101519082015261012080840151908201526101408084015190820152610160808401519082015261018080840151908201526101a09150610e17828401610c1b565b828201526101c09150610e2b828401610c1b565b828201526101e09150610e3f8284016109fd565b9181019190915261020091820151918101919091529392505050565b600060208284031215610e6c578081fd5b5035919050565b600060208284031215610e84578081fd5b5051919050565b6001600160a01b03929092168252602082015260400190565b901515815260200190565b90815260200190565b60405181810167ffffffffffffffff81118282101715610ed457fe5b604052919050565b600067ffffffffffffffff821115610ef057fe5b5060209081020190565b6001600160a01b0381168114610f0f57600080fd5b5056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220ec8a047b8c3fd5cb92a60ee11b839660df5f3a57699933a66f9a93ee4c3736f064736f6c63430007050033"; diff --git a/packages/chain-events/src/contractTypes/factories/Proxy__factory.ts b/packages/chain-events/src/contractTypes/factories/Proxy__factory.ts new file mode 100644 index 00000000000..8e5292e029a --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/Proxy__factory.ts @@ -0,0 +1,21 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { Proxy } from "../Proxy"; + +export class Proxy__factory { + static connect(address: string, signerOrProvider: Signer | Provider): Proxy { + return new Contract(address, _abi, signerOrProvider) as Proxy; + } +} + +const _abi = [ + { + stateMutability: "payable", + type: "fallback", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/SelfdestructTransfer__factory.ts b/packages/chain-events/src/contractTypes/factories/SelfdestructTransfer__factory.ts new file mode 100644 index 00000000000..f0f89a00404 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/SelfdestructTransfer__factory.ts @@ -0,0 +1,60 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Signer, Contract, ContractFactory, Overrides } from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { SelfdestructTransfer } from "../SelfdestructTransfer"; + +export class SelfdestructTransfer__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(overrides || {}) as Promise; + } + getDeployTransaction( + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(overrides || {}); + } + attach(address: string): SelfdestructTransfer { + return super.attach(address) as SelfdestructTransfer; + } + connect(signer: Signer): SelfdestructTransfer__factory { + return super.connect(signer) as SelfdestructTransfer__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): SelfdestructTransfer { + return new Contract( + address, + _abi, + signerOrProvider + ) as SelfdestructTransfer; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address payable", + name: "to", + type: "address", + }, + ], + name: "destroyAndTransfer", + outputs: [], + stateMutability: "payable", + type: "function", + }, +]; + +const _bytecode = + "0x6080604052348015600f57600080fd5b5060888061001e6000396000f3fe608060405260043610601c5760003560e01c8063785e07b3146021575b600080fd5b604460048036036020811015603557600080fd5b50356001600160a01b03166046565b005b806001600160a01b0316fffea264697066735822122039cd6f3f3e3077a165b99440c924173ee7c36146ecd3a327a12955042d1d25e064736f6c634300060c0033"; diff --git a/packages/chain-events/src/contractTypes/factories/TimelockController__factory.ts b/packages/chain-events/src/contractTypes/factories/TimelockController__factory.ts new file mode 100644 index 00000000000..37c154597d7 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/TimelockController__factory.ts @@ -0,0 +1,805 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { TimelockController } from "../TimelockController"; + +export class TimelockController__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + minDelay: BigNumberish, + proposers: string[], + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + minDelay, + proposers, + executors, + overrides || {} + ) as Promise; + } + getDeployTransaction( + minDelay: BigNumberish, + proposers: string[], + executors: string[], + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction( + minDelay, + proposers, + executors, + overrides || {} + ); + } + attach(address: string): TimelockController { + return super.attach(address) as TimelockController; + } + connect(signer: Signer): TimelockController__factory { + return super.connect(signer) as TimelockController__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TimelockController { + return new Contract(address, _abi, signerOrProvider) as TimelockController; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "uint256", + name: "minDelay", + type: "uint256", + }, + { + internalType: "address[]", + name: "proposers", + type: "address[]", + }, + { + internalType: "address[]", + name: "executors", + type: "address[]", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + { + indexed: true, + internalType: "uint256", + name: "index", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + name: "CallExecuted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + { + indexed: true, + internalType: "uint256", + name: "index", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "bytes32", + name: "predecessor", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "delay", + type: "uint256", + }, + ], + name: "CallScheduled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + ], + name: "Cancelled", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldDuration", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newDuration", + type: "uint256", + }, + ], + name: "MinDelayChange", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "previousAdminRole", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "newAdminRole", + type: "bytes32", + }, + ], + name: "RoleAdminChanged", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleGranted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + ], + name: "RoleRevoked", + type: "event", + }, + { + inputs: [], + name: "DEFAULT_ADMIN_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "EXECUTOR_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "PROPOSER_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "TIMELOCK_ADMIN_ROLE", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + ], + name: "cancel", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "bytes32", + name: "predecessor", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + ], + name: "execute", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "datas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "predecessor", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + ], + name: "executeBatch", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [], + name: "getMinDelay", + outputs: [ + { + internalType: "uint256", + name: "duration", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + ], + name: "getRoleAdmin", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + ], + name: "getTimestamp", + outputs: [ + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "grantRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "hasRole", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "bytes32", + name: "predecessor", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + ], + name: "hashOperation", + outputs: [ + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "datas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "predecessor", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + ], + name: "hashOperationBatch", + outputs: [ + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + ], + name: "isOperation", + outputs: [ + { + internalType: "bool", + name: "pending", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + ], + name: "isOperationDone", + outputs: [ + { + internalType: "bool", + name: "done", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + ], + name: "isOperationPending", + outputs: [ + { + internalType: "bool", + name: "pending", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "id", + type: "bytes32", + }, + ], + name: "isOperationReady", + outputs: [ + { + internalType: "bool", + name: "ready", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "renounceRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "role", + type: "bytes32", + }, + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "revokeRole", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "bytes32", + name: "predecessor", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "uint256", + name: "delay", + type: "uint256", + }, + ], + name: "schedule", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address[]", + name: "targets", + type: "address[]", + }, + { + internalType: "uint256[]", + name: "values", + type: "uint256[]", + }, + { + internalType: "bytes[]", + name: "datas", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "predecessor", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "salt", + type: "bytes32", + }, + { + internalType: "uint256", + name: "delay", + type: "uint256", + }, + ], + name: "scheduleBatch", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "interfaceId", + type: "bytes4", + }, + ], + name: "supportsInterface", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "newDelay", + type: "uint256", + }, + ], + name: "updateDelay", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + stateMutability: "payable", + type: "receive", + }, +]; + +const _bytecode = + "0x60806040523480156200001157600080fd5b5060405162001e6638038062001e668339810160408190526200003491620003a9565b6200004f60008051602062001e0683398151915280620001e1565b6200007960008051602062001e2683398151915260008051602062001e06833981519152620001e1565b620000a360008051602062001e4683398151915260008051602062001e06833981519152620001e1565b620000be60008051602062001e06833981519152336200022c565b620000d960008051602062001e06833981519152306200022c565b60005b825181101562000142576200012f60008051602062001e268339815191528483815181106200011b57634e487b7160e01b600052603260045260246000fd5b60200260200101516200022c60201b60201c565b6200013a816200041a565b9050620000dc565b5060005b815181101562000198576200018560008051602062001e468339815191528383815181106200011b57634e487b7160e01b600052603260045260246000fd5b62000190816200041a565b905062000146565b5060028390556040805160008152602081018590527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a150505062000458565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6200023882826200023c565b5050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff1662000238576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002983390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b80516001600160a01b0381168114620002f457600080fd5b919050565b600082601f8301126200030a578081fd5b815160206001600160401b038083111562000329576200032962000442565b8260051b604051601f19603f8301168101818110848211171562000351576200035162000442565b6040528481528381019250868401828801850189101562000370578687fd5b8692505b858310156200039d576200038881620002dc565b84529284019260019290920191840162000374565b50979650505050505050565b600080600060608486031215620003be578283fd5b835160208501519093506001600160401b0380821115620003dd578384fd5b620003eb87838801620002f9565b9350604086015191508082111562000401578283fd5b506200041086828701620002f9565b9150509250925092565b60006000198214156200043b57634e487b7160e01b81526011600452602481fd5b5060010190565b634e487b7160e01b600052604160045260246000fd5b61199e80620004686000396000f3fe60806040526004361061014f5760003560e01c806364d62353116100b6578063b1c5f4271161006f578063b1c5f427146103f3578063c4d252f514610413578063d45c443514610433578063d547741f14610460578063e38335e514610480578063f27a0c921461049357600080fd5b806364d623531461033c5780638065657f1461035c5780638f2a0bb01461037c5780638f61f4f51461039c57806391d14854146103be578063a217fddf146103de57600080fd5b8063248a9ca311610108578063248a9ca31461025b5780632ab0f5291461028b5780632f2ff15d146102bc57806331d50750146102dc57806336568abe146102fc578063584b153e1461031c57600080fd5b806301d5062a1461015b57806301ffc9a71461017d57806307bd0265146101b25780630d3cf6fc146101f4578063134008d31461022857806313bc9f201461023b57600080fd5b3661015657005b600080fd5b34801561016757600080fd5b5061017b610176366004611314565b6104a8565b005b34801561018957600080fd5b5061019d61019836600461151d565b61052c565b60405190151581526020015b60405180910390f35b3480156101be57600080fd5b506101e67fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6381565b6040519081526020016101a9565b34801561020057600080fd5b506101e67f5f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca581565b61017b6102363660046112aa565b610563565b34801561024757600080fd5b5061019d6102563660046114da565b6105db565b34801561026757600080fd5b506101e66102763660046114da565b60009081526020819052604090206001015490565b34801561029757600080fd5b5061019d6102a63660046114da565b6000908152600160208190526040909120541490565b3480156102c857600080fd5b5061017b6102d73660046114f2565b610601565b3480156102e857600080fd5b5061019d6102f73660046114da565b61062c565b34801561030857600080fd5b5061017b6103173660046114f2565b610645565b34801561032857600080fd5b5061019d6103373660046114da565b6106c8565b34801561034857600080fd5b5061017b6103573660046114da565b6106de565b34801561036857600080fd5b506101e66103773660046112aa565b610782565b34801561038857600080fd5b5061017b61039736600461142c565b6107c1565b3480156103a857600080fd5b506101e660008051602061194983398151915281565b3480156103ca57600080fd5b5061019d6103d93660046114f2565b61092c565b3480156103ea57600080fd5b506101e6600081565b3480156103ff57600080fd5b506101e661040e366004611387565b610955565b34801561041f57600080fd5b5061017b61042e3660046114da565b61099a565b34801561043f57600080fd5b506101e661044e3660046114da565b60009081526001602052604090205490565b34801561046c57600080fd5b5061017b61047b3660046114f2565b610a5e565b61017b61048e366004611387565b610a84565b34801561049f57600080fd5b506002546101e6565b6000805160206119498339815191526104c18133610be3565b60006104d1898989898989610782565b90506104dd8184610c47565b6000817f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8b8b8b8b8b8a604051610519969594939291906116b2565b60405180910390a3505050505050505050565b60006001600160e01b03198216637965db0b60e01b148061055d57506301ffc9a760e01b6001600160e01b03198316145b92915050565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e6361058f81600061092c565b61059d5761059d8133610be3565b60006105ad888888888888610782565b90506105b98185610d36565b6105c88160008a8a8a8a610dd2565b6105d181610ee6565b5050505050505050565b6000818152600160205260408120546001811180156105fa5750428111155b9392505050565b60008281526020819052604090206001015461061d8133610be3565b6106278383610f1f565b505050565b60008181526001602052604081205481905b1192915050565b6001600160a01b03811633146106ba5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6106c48282610fa3565b5050565b600081815260016020819052604082205461063e565b3330146107415760405162461bcd60e51b815260206004820152602b60248201527f54696d656c6f636b436f6e74726f6c6c65723a2063616c6c6572206d7573742060448201526a62652074696d656c6f636b60a81b60648201526084016106b1565b60025460408051918252602082018390527f11c24f4ead16507c69ac467fbd5e4eed5fb5c699626d2cc6d66421df253886d5910160405180910390a1600255565b600086868686868660405160200161079f969594939291906116b2565b6040516020818303038152906040528051906020012090509695505050505050565b6000805160206119498339815191526107da8133610be3565b8887146107f95760405162461bcd60e51b81526004016106b1906117c7565b8885146108185760405162461bcd60e51b81526004016106b1906117c7565b600061082a8b8b8b8b8b8b8b8b610955565b90506108368184610c47565b60005b8a81101561091e5780827f4cf4410cc57040e44862ef0f45f3dd5a5e02db8eb8add648d4b0e236f1d07dca8e8e8581811061088457634e487b7160e01b600052603260045260246000fd5b90506020020160208101906108999190611290565b8d8d868181106108b957634e487b7160e01b600052603260045260246000fd5b905060200201358c8c878181106108e057634e487b7160e01b600052603260045260246000fd5b90506020028101906108f29190611854565b8c8b604051610906969594939291906116b2565b60405180910390a361091781611917565b9050610839565b505050505050505050505050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600088888888888888886040516020016109769897969594939291906116ef565b60405160208183030381529060405280519060200120905098975050505050505050565b6000805160206119498339815191526109b38133610be3565b6109bc826106c8565b610a225760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e2063616044820152701b9b9bdd0818994818d85b98d95b1b1959607a1b60648201526084016106b1565b6000828152600160205260408082208290555183917fbaa1eb22f2a492ba1a5fea61b8df4d27c6c8b5f3971e63bb58fa14ff72eedb7091a25050565b600082815260208190526040902060010154610a7a8133610be3565b6106278383610fa3565b7fd8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63610ab081600061092c565b610abe57610abe8133610be3565b878614610add5760405162461bcd60e51b81526004016106b1906117c7565b878414610afc5760405162461bcd60e51b81526004016106b1906117c7565b6000610b0e8a8a8a8a8a8a8a8a610955565b9050610b1a8185610d36565b60005b89811015610bcd57610bbd82828d8d85818110610b4a57634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610b5f9190611290565b8c8c86818110610b7f57634e487b7160e01b600052603260045260246000fd5b905060200201358b8b87818110610ba657634e487b7160e01b600052603260045260246000fd5b9050602002810190610bb89190611854565b610dd2565b610bc681611917565b9050610b1d565b50610bd781610ee6565b50505050505050505050565b610bed828261092c565b6106c457610c05816001600160a01b03166014611008565b610c10836020611008565b604051602001610c2192919061160b565b60408051601f198184030181529082905262461bcd60e51b82526106b191600401611794565b610c508261062c565b15610cb55760405162461bcd60e51b815260206004820152602f60248201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e20616c60448201526e1c9958591e481cd8da19591d5b1959608a1b60648201526084016106b1565b600254811015610d165760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a20696e73756666696369656e746044820152652064656c617960d01b60648201526084016106b1565b610d208142611899565b6000928352600160205260409092209190915550565b610d3f826105db565b610d5b5760405162461bcd60e51b81526004016106b19061180a565b801580610d775750600081815260016020819052604090912054145b6106c45760405162461bcd60e51b815260206004820152602660248201527f54696d656c6f636b436f6e74726f6c6c65723a206d697373696e6720646570656044820152656e64656e637960d01b60648201526084016106b1565b6000846001600160a01b0316848484604051610def9291906115fb565b60006040518083038185875af1925050503d8060008114610e2c576040519150601f19603f3d011682016040523d82523d6000602084013e610e31565b606091505b5050905080610e9e5760405162461bcd60e51b815260206004820152603360248201527f54696d656c6f636b436f6e74726f6c6c65723a20756e6465726c79696e6720746044820152721c985b9cd858dd1a5bdb881c995d995c9d1959606a1b60648201526084016106b1565b85877fc2617efa69bab66782fa219543714338489c4e9e178271560a91b82c3f612b5887878787604051610ed59493929190611680565b60405180910390a350505050505050565b610eef816105db565b610f0b5760405162461bcd60e51b81526004016106b19061180a565b600090815260016020819052604090912055565b610f29828261092c565b6106c4576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610f5f3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610fad828261092c565b156106c4576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b606060006110178360026118b1565b611022906002611899565b67ffffffffffffffff81111561104857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611072576020820181803683370190505b509050600360fc1b8160008151811061109b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106110d857634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060006110fc8460026118b1565b611107906001611899565b90505b600181111561119b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061114957634e487b7160e01b600052603260045260246000fd5b1a60f81b82828151811061116d57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361119481611900565b905061110a565b5083156105fa5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106b1565b80356001600160a01b038116811461120157600080fd5b919050565b60008083601f840112611217578182fd5b50813567ffffffffffffffff81111561122e578182fd5b6020830191508360208260051b850101111561124957600080fd5b9250929050565b60008083601f840112611261578182fd5b50813567ffffffffffffffff811115611278578182fd5b60208301915083602082850101111561124957600080fd5b6000602082840312156112a1578081fd5b6105fa826111ea565b60008060008060008060a087890312156112c2578182fd5b6112cb876111ea565b955060208701359450604087013567ffffffffffffffff8111156112ed578283fd5b6112f989828a01611250565b979a9699509760608101359660809091013595509350505050565b600080600080600080600060c0888a03121561132e578081fd5b611337886111ea565b965060208801359550604088013567ffffffffffffffff811115611359578182fd5b6113658a828b01611250565b989b979a50986060810135976080820135975060a09091013595509350505050565b60008060008060008060008060a0898b0312156113a2578081fd5b883567ffffffffffffffff808211156113b9578283fd5b6113c58c838d01611206565b909a50985060208b01359150808211156113dd578283fd5b6113e98c838d01611206565b909850965060408b0135915080821115611401578283fd5b5061140e8b828c01611206565b999c989b509699959896976060870135966080013595509350505050565b600080600080600080600080600060c08a8c031215611449578081fd5b893567ffffffffffffffff80821115611460578283fd5b61146c8d838e01611206565b909b50995060208c0135915080821115611484578283fd5b6114908d838e01611206565b909950975060408c01359150808211156114a8578283fd5b506114b58c828d01611206565b9a9d999c50979a969997986060880135976080810135975060a0013595509350505050565b6000602082840312156114eb578081fd5b5035919050565b60008060408385031215611504578182fd5b82359150611514602084016111ea565b90509250929050565b60006020828403121561152e578081fd5b81356001600160e01b0319811681146105fa578182fd5b81835260006020808501808196508560051b8101915084845b878110156115c55782840389528135601e1988360301811261157e578687fd5b8701803567ffffffffffffffff811115611596578788fd5b8036038913156115a4578788fd5b6115b186828985016115d2565b9a87019a955050509084019060010161155e565b5091979650505050505050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b8183823760009101908152919050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516116438160178501602088016118d0565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516116748160288401602088016118d0565b01602801949350505050565b60018060a01b03851681528360208201526060604082015260006116a86060830184866115d2565b9695505050505050565b60018060a01b038716815285602082015260a0604082015260006116da60a0830186886115d2565b60608301949094525060800152949350505050565b60a0808252810188905260008960c08301825b8b811015611730576001600160a01b0361171b846111ea565b16825260209283019290910190600101611702565b5083810360208501528881526001600160fb1b0389111561174f578283fd5b8860051b9150818a6020830137016020818101838152848303909101604085015261177b81888a611545565b6060850196909652505050608001529695505050505050565b60208152600082518060208401526117b38160408501602087016118d0565b601f01601f19169190910160400192915050565b60208082526023908201527f54696d656c6f636b436f6e74726f6c6c65723a206c656e677468206d69736d616040820152620e8c6d60eb1b606082015260800190565b6020808252602a908201527f54696d656c6f636b436f6e74726f6c6c65723a206f7065726174696f6e206973604082015269206e6f7420726561647960b01b606082015260800190565b6000808335601e1984360301811261186a578283fd5b83018035915067ffffffffffffffff821115611884578283fd5b60200191503681900382131561124957600080fd5b600082198211156118ac576118ac611932565b500190565b60008160001904831182151516156118cb576118cb611932565b500290565b60005b838110156118eb5781810151838201526020016118d3565b838111156118fa576000848401525b50505050565b60008161190f5761190f611932565b506000190190565b600060001982141561192b5761192b611932565b5060010190565b634e487b7160e01b600052601160045260246000fdfeb09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1a26469706673582212209e38091602902e218a7c02bae674b95127a81a7409f107bd43167cea5ed732ab64736f6c634300080400335f58e3a2316349923ce3780f8d587db2d72378aed66a8261c916544fa6846ca5b09aa5aeb3702cfd50b6b62bc4532604938f21248a27a1d5ca736082b6819cc1d8aa0f3194971a2a116679f7c2090f6939c8d4e01a2a8d7e41d55e5351469e63"; diff --git a/packages/chain-events/src/contractTypes/factories/TimelockInterface__factory.ts b/packages/chain-events/src/contractTypes/factories/TimelockInterface__factory.ts new file mode 100644 index 00000000000..76338b59064 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/TimelockInterface__factory.ts @@ -0,0 +1,197 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "@ethersproject/providers"; + +import type { TimelockInterface } from "../TimelockInterface"; + +export class TimelockInterface__factory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TimelockInterface { + return new Contract(address, _abi, signerOrProvider) as TimelockInterface; + } +} + +const _abi = [ + { + constant: true, + inputs: [], + name: "GRACE_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "acceptAdmin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "cancelTransaction", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "delay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "executeTransaction", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "queueTransaction", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + name: "queuedTransactions", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, +]; diff --git a/packages/chain-events/src/contractTypes/factories/TimelockMock__factory.ts b/packages/chain-events/src/contractTypes/factories/TimelockMock__factory.ts new file mode 100644 index 00000000000..d48a5106b2f --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/TimelockMock__factory.ts @@ -0,0 +1,514 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { TimelockMock } from "../TimelockMock"; + +export class TimelockMock__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + admin_: string, + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy( + admin_, + delay_, + overrides || {} + ) as Promise; + } + getDeployTransaction( + admin_: string, + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(admin_, delay_, overrides || {}); + } + attach(address: string): TimelockMock { + return super.attach(address) as TimelockMock; + } + connect(signer: Signer): TimelockMock__factory { + return super.connect(signer) as TimelockMock__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): TimelockMock { + return new Contract(address, _abi, signerOrProvider) as TimelockMock; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "admin_", + type: "address", + }, + { + internalType: "uint256", + name: "delay_", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "CancelTransaction", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ExecuteTransaction", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "newDelay", + type: "uint256", + }, + ], + name: "NewDelay", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "QueueTransaction", + type: "event", + }, + { + payable: true, + stateMutability: "payable", + type: "fallback", + }, + { + constant: true, + inputs: [], + name: "GRACE_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MAXIMUM_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MINIMUM_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "acceptAdmin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "cancelTransaction", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "delay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "executeTransaction", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "pendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "queueTransaction", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "queuedTransactions", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "delay_", + type: "uint256", + }, + ], + name: "setDelay", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "pendingAdmin_", + type: "address", + }, + ], + name: "setPendingAdmin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b506040516116c43803806116c48339818101604052604081101561003357600080fd5b508051602090910151607881101561007c5760405162461bcd60e51b815260040180806020018281038252603b81526020018061164d603b913960400191505060405180910390fd5b6107088111156100bd5760405162461bcd60e51b815260040180806020018281038252603c815260200180611688603c913960400191505060405180910390fd5b600080546001600160a01b039093166001600160a01b03199093169290921790915560025561155c806100f16000396000f3fe6080604052600436106100c25760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e2146105dd578063e177246e146105f2578063f2b065371461061c578063f851a4401461065a576100c2565b80636a42b8f81461059e5780637d645fab146105b3578063b1b43ae5146105c8576100c2565b80630825f38f146100c45780630e18b68114610279578063267822471461028e5780633a66f901146102bf5780634dd18bf51461041e578063591fcdfe14610451575b005b610204600480360360a08110156100da57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561010957600080fd5b82018360208201111561011b57600080fd5b803590602001918460018302840111600160201b8311171561013c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561018e57600080fd5b8201836020820111156101a057600080fd5b803590602001918460018302840111600160201b831117156101c157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061066f915050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561023e578181015183820152602001610226565b50505050905090810190601f16801561026b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028557600080fd5b506100c2610af7565b34801561029a57600080fd5b506102a3610b93565b604080516001600160a01b039092168252519081900360200190f35b3480156102cb57600080fd5b5061040c600480360360a08110156102e257600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561031157600080fd5b82018360208201111561032357600080fd5b803590602001918460018302840111600160201b8311171561034457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561039657600080fd5b8201836020820111156103a857600080fd5b803590602001918460018302840111600160201b831117156103c957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610ba2915050565b60408051918252519081900360200190f35b34801561042a57600080fd5b506100c26004803603602081101561044157600080fd5b50356001600160a01b0316610e6b565b34801561045d57600080fd5b506100c2600480360360a081101561047457600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156104a357600080fd5b8201836020820111156104b557600080fd5b803590602001918460018302840111600160201b831117156104d657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561052857600080fd5b82018360208201111561053a57600080fd5b803590602001918460018302840111600160201b8311171561055b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610ef9915050565b3480156105aa57600080fd5b5061040c611166565b3480156105bf57600080fd5b5061040c61116c565b3480156105d457600080fd5b5061040c611172565b3480156105e957600080fd5b5061040c611177565b3480156105fe57600080fd5b506100c26004803603602081101561061557600080fd5b503561117d565b34801561062857600080fd5b506106466004803603602081101561063f57600080fd5b503561126f565b604080519115158252519081900360200190f35b34801561066657600080fd5b506102a3611284565b60606000868686868660405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156106e05781810151838201526020016106c8565b50505050905090810190601f16801561070d5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610740578181015183820152602001610728565b50505050905090810190601f16801561076d5780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301206000818152600390935291205490995060ff1697506107de96505050505050505760405162461bcd60e51b81526004018080602001828103825260418152602001806113306041913960600191505060405180910390fd5b6107f08361034863ffffffff61129316565b6107f86112f4565b11156108355760405162461bcd60e51b81526004018080602001828103825260378152602001806112f96037913960400191505060405180910390fd5b6000818152600360205260409020805460ff19169055845160609061085b5750836108e8565b85805190602001208560405160200180836001600160e01b0319166001600160e01b031916815260040182805190602001908083835b602083106108b05780518252601f199092019160209182019101610891565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60006060896001600160a01b031689846040518082805190602001908083835b602083106109275780518252601f199092019160209182019101610908565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610989576040519150601f19603f3d011682016040523d82523d6000602084013e61098e565b606091505b5091509150816109cf5760405162461bcd60e51b81526004018080602001828103825260418152602001806113716041913960600191505060405180910390fd5b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610a4c578181015183820152602001610a34565b50505050905090810190601f168015610a795780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610aac578181015183820152602001610a94565b50505050905090810190601f168015610ad95780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b6001546001600160a01b03163314610b405760405162461bcd60e51b815260040180806020018281038252603c815260200180611438603c913960400191505060405180910390fd5b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b6000610bbe600254610bb26112f4565b9063ffffffff61129316565b821015610bfc5760405162461bcd60e51b815260040180806020018281038252604d8152602001806113eb604d913960600191505060405180910390fd5b6000868686868660405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610c6b578181015183820152602001610c53565b50505050905090810190601f168015610c985780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610ccb578181015183820152602001610cb3565b50505050905090810190601f168015610cf85780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550866001600160a01b0316817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610dc3578181015183820152602001610dab565b50505050905090810190601f168015610df05780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610e23578181015183820152602001610e0b565b50505050905090810190601f168015610e505780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b333014610ea95760405162461bcd60e51b81526004018080602001828103825260408152602001806114e86040913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000858585858560405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610f68578181015183820152602001610f50565b50505050905090810190601f168015610f955780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610fc8578181015183820152602001610fb0565b50505050905090810190601f168015610ff55780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550856001600160a01b0316817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156110c05781810151838201526020016110a8565b50505050905090810190601f1680156110ed5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015611120578181015183820152602001611108565b50505050905090810190601f16801561114d5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b61070881565b607881565b61034881565b3330146111bb5760405162461bcd60e51b81526004018080602001828103825260398152602001806113b26039913960400191505060405180910390fd5b60788110156111fb5760405162461bcd60e51b81526004018080602001828103825260388152602001806114746038913960400191505060405180910390fd5b61070881111561123c5760405162461bcd60e51b815260040180806020018281038252603c8152602001806114ac603c913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60036020526000908152604090205460ff1681565b6000546001600160a01b031681565b6000828201838110156112ed576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b429056fe54696d656c6f636b4d6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b4d6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b4d6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b4d6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b4d6f636b2e54696d656c6f636b4d6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b4d6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b4d6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b4d6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b4d6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b4d6f636b2ea265627a7a723158205cb4254eb3f7b192c94088feb531fcf44c1b7f872c91464a913c33dc669e6ed964736f6c6343000510003254696d656c6f636b4d6f636b3a3a636f6e7374727563746f723a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b4d6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e"; diff --git a/packages/chain-events/src/contractTypes/factories/Timelock__factory.ts b/packages/chain-events/src/contractTypes/factories/Timelock__factory.ts new file mode 100644 index 00000000000..959386395c4 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/Timelock__factory.ts @@ -0,0 +1,510 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { Timelock } from "../Timelock"; + +export class Timelock__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + admin_: string, + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(admin_, delay_, overrides || {}) as Promise; + } + getDeployTransaction( + admin_: string, + delay_: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(admin_, delay_, overrides || {}); + } + attach(address: string): Timelock { + return super.attach(address) as Timelock; + } + connect(signer: Signer): Timelock__factory { + return super.connect(signer) as Timelock__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): Timelock { + return new Contract(address, _abi, signerOrProvider) as Timelock; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "admin_", + type: "address", + }, + { + internalType: "uint256", + name: "delay_", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "CancelTransaction", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "ExecuteTransaction", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "newDelay", + type: "uint256", + }, + ], + name: "NewDelay", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "target", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + indexed: false, + internalType: "string", + name: "signature", + type: "string", + }, + { + indexed: false, + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + indexed: false, + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "QueueTransaction", + type: "event", + }, + { + payable: true, + stateMutability: "payable", + type: "fallback", + }, + { + constant: true, + inputs: [], + name: "GRACE_PERIOD", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MAXIMUM_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: true, + inputs: [], + name: "MINIMUM_DELAY", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [], + name: "acceptAdmin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "admin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "cancelTransaction", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "delay", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "executeTransaction", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + payable: true, + stateMutability: "payable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "pendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "target", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "string", + name: "signature", + type: "string", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "uint256", + name: "eta", + type: "uint256", + }, + ], + name: "queueTransaction", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + name: "queuedTransactions", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "uint256", + name: "delay_", + type: "uint256", + }, + ], + name: "setDelay", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "pendingAdmin_", + type: "address", + }, + ], + name: "setPendingAdmin", + outputs: [], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b506040516118a63803806118a68339818101604052604081101561003357600080fd5b5080516020909101516202a30081101561007e5760405162461bcd60e51b81526004018080602001828103825260378152602001806118376037913960400191505060405180910390fd5b62278d008111156100c05760405162461bcd60e51b815260040180806020018281038252603881526020018061186e6038913960400191505060405180910390fd5b600080546001600160a01b039093166001600160a01b031990931692909217909155600255611743806100f46000396000f3fe6080604052600436106100c25760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e2146105dd578063e177246e146105f2578063f2b065371461061c578063f851a4401461065a576100c2565b80636a42b8f81461059e5780637d645fab146105b3578063b1b43ae5146105c8576100c2565b80630825f38f146100c45780630e18b68114610279578063267822471461028e5780633a66f901146102bf5780634dd18bf51461041e578063591fcdfe14610451575b005b610204600480360360a08110156100da57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561010957600080fd5b82018360208201111561011b57600080fd5b803590602001918460018302840111600160201b8311171561013c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561018e57600080fd5b8201836020820111156101a057600080fd5b803590602001918460018302840111600160201b831117156101c157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061066f915050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561023e578181015183820152602001610226565b50505050905090810190601f16801561026b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028557600080fd5b506100c2610b88565b34801561029a57600080fd5b506102a3610c24565b604080516001600160a01b039092168252519081900360200190f35b3480156102cb57600080fd5b5061040c600480360360a08110156102e257600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561031157600080fd5b82018360208201111561032357600080fd5b803590602001918460018302840111600160201b8311171561034457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561039657600080fd5b8201836020820111156103a857600080fd5b803590602001918460018302840111600160201b831117156103c957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610c33915050565b60408051918252519081900360200190f35b34801561042a57600080fd5b506100c26004803603602081101561044157600080fd5b50356001600160a01b0316610f44565b34801561045d57600080fd5b506100c2600480360360a081101561047457600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156104a357600080fd5b8201836020820111156104b557600080fd5b803590602001918460018302840111600160201b831117156104d657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561052857600080fd5b82018360208201111561053a57600080fd5b803590602001918460018302840111600160201b8311171561055b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610fd2915050565b3480156105aa57600080fd5b5061040c611288565b3480156105bf57600080fd5b5061040c61128e565b3480156105d457600080fd5b5061040c611295565b3480156105e957600080fd5b5061040c61129c565b3480156105fe57600080fd5b506100c26004803603602081101561061557600080fd5b50356112a3565b34801561062857600080fd5b506106466004803603602081101561063f57600080fd5b5035611398565b604080519115158252519081900360200190f35b34801561066657600080fd5b506102a36113ad565b6000546060906001600160a01b031633146106bb5760405162461bcd60e51b81526004018080602001828103825260388152602001806114226038913960400191505060405180910390fd5b6000868686868660405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561072a578181015183820152602001610712565b50505050905090810190601f1680156107575780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561078a578181015183820152602001610772565b50505050905090810190601f1680156107b75780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301206000818152600390935291205490995060ff16975061082896505050505050505760405162461bcd60e51b815260040180806020018281038252603d815260200180611575603d913960400191505060405180910390fd5b826108316113bc565b101561086e5760405162461bcd60e51b81526004018080602001828103825260458152602001806114c46045913960600191505060405180910390fd5b610881836212750063ffffffff6113c016565b6108896113bc565b11156108c65760405162461bcd60e51b81526004018080602001828103825260338152602001806114916033913960400191505060405180910390fd5b6000818152600360205260409020805460ff1916905584516060906108ec575083610979565b85805190602001208560405160200180836001600160e01b0319166001600160e01b031916815260040182805190602001908083835b602083106109415780518252601f199092019160209182019101610922565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60006060896001600160a01b031689846040518082805190602001908083835b602083106109b85780518252601f199092019160209182019101610999565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a1a576040519150601f19603f3d011682016040523d82523d6000602084013e610a1f565b606091505b509150915081610a605760405162461bcd60e51b815260040180806020018281038252603d815260200180611658603d913960400191505060405180910390fd5b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610add578181015183820152602001610ac5565b50505050905090810190601f168015610b0a5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610b3d578181015183820152602001610b25565b50505050905090810190601f168015610b6a5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b6001546001600160a01b03163314610bd15760405162461bcd60e51b81526004018080602001828103825260388152602001806115b26038913960400191505060405180910390fd5b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b600080546001600160a01b03163314610c7d5760405162461bcd60e51b81526004018080602001828103825260368152602001806116226036913960400191505060405180910390fd5b610c97600254610c8b6113bc565b9063ffffffff6113c016565b821015610cd55760405162461bcd60e51b81526004018080602001828103825260498152602001806116956049913960600191505060405180910390fd5b6000868686868660405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610d44578181015183820152602001610d2c565b50505050905090810190601f168015610d715780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610da4578181015183820152602001610d8c565b50505050905090810190601f168015610dd15780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550866001600160a01b0316817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610e9c578181015183820152602001610e84565b50505050905090810190601f168015610ec95780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610efc578181015183820152602001610ee4565b50505050905090810190601f168015610f295780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b333014610f825760405162461bcd60e51b81526004018080602001828103825260388152602001806115ea6038913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000546001600160a01b0316331461101b5760405162461bcd60e51b815260040180806020018281038252603781526020018061145a6037913960400191505060405180910390fd5b6000858585858560405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561108a578181015183820152602001611072565b50505050905090810190601f1680156110b75780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156110ea5781810151838201526020016110d2565b50505050905090810190601f1680156111175780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550856001600160a01b0316817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156111e25781810151838201526020016111ca565b50505050905090810190601f16801561120f5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561124257818101518382015260200161122a565b50505050905090810190601f16801561126f5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b62278d0081565b6202a30081565b6212750081565b3330146112e15760405162461bcd60e51b81526004018080602001828103825260318152602001806116de6031913960400191505060405180910390fd5b6202a3008110156113235760405162461bcd60e51b81526004018080602001828103825260348152602001806115096034913960400191505060405180910390fd5b62278d008111156113655760405162461bcd60e51b815260040180806020018281038252603881526020018061153d6038913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60036020526000908152604090205460ff1681565b6000546001600160a01b031681565b4290565b60008282018381101561141a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea265627a7a72315820857dcadf7a4ab22dea128a6b9f63f6fae4511f638de8defc87353875ec71c25a64736f6c6343000510003254696d656c6f636b3a3a636f6e7374727563746f723a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e"; diff --git a/packages/chain-events/src/contractTypes/factories/Token__factory.ts b/packages/chain-events/src/contractTypes/factories/Token__factory.ts new file mode 100644 index 00000000000..d98dfc8ca66 --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/Token__factory.ts @@ -0,0 +1,307 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BigNumberish, + Contract, + ContractFactory, + Overrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { Token } from "../Token"; + +export class Token__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + supply: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): Promise { + return super.deploy(supply, overrides || {}) as Promise; + } + getDeployTransaction( + supply: BigNumberish, + overrides?: Overrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(supply, overrides || {}); + } + attach(address: string): Token { + return super.attach(address) as Token; + } + connect(signer: Signer): Token__factory { + return super.connect(signer) as Token__factory; + } + static connect(address: string, signerOrProvider: Signer | Provider): Token { + return new Contract(address, _abi, signerOrProvider) as Token; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "uint256", + name: "supply", + type: "uint256", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256", + }, + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256", + }, + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: true, + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + payable: false, + stateMutability: "view", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, + { + constant: false, + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + payable: false, + stateMutability: "nonpayable", + type: "function", + }, +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b506040516106113803806106118339818101604052602081101561003357600080fd5b505161004833826001600160e01b0361004e16565b50610119565b6001600160a01b03821661006157600080fd5b61007a8160025461010060201b61049b1790919060201c565b6002556001600160a01b038216600090815260208181526040909120546100aa91839061049b610100821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008282018381101561011257600080fd5b9392505050565b6104e9806101286000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c806370a082311161005b57806370a0823114610149578063a457c2d71461016f578063a9059cbb1461019b578063dd62ed3e146101c757610088565b8063095ea7b31461008d57806318160ddd146100cd57806323b872dd146100e7578063395093511461011d575b600080fd5b6100b9600480360360408110156100a357600080fd5b506001600160a01b0381351690602001356101f5565b604080519115158252519081900360200190f35b6100d561020b565b60408051918252519081900360200190f35b6100b9600480360360608110156100fd57600080fd5b506001600160a01b03813581169160208101359091169060400135610211565b6100b96004803603604081101561013357600080fd5b506001600160a01b038135169060200135610268565b6100d56004803603602081101561015f57600080fd5b50356001600160a01b03166102a4565b6100b96004803603604081101561018557600080fd5b506001600160a01b0381351690602001356102bf565b6100b9600480360360408110156101b157600080fd5b506001600160a01b0381351690602001356102fb565b6100d5600480360360408110156101dd57600080fd5b506001600160a01b0381358116916020013516610308565b6000610202338484610333565b50600192915050565b60025490565b600061021e8484846103bb565b6001600160a01b03841660009081526001602090815260408083203380855292529091205461025e918691610259908663ffffffff61048616565b610333565b5060019392505050565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610202918590610259908663ffffffff61049b16565b6001600160a01b031660009081526020819052604090205490565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091610202918590610259908663ffffffff61048616565b60006102023384846103bb565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b03821661034657600080fd5b6001600160a01b03831661035957600080fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0382166103ce57600080fd5b6001600160a01b0383166000908152602081905260409020546103f7908263ffffffff61048616565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461042c908263ffffffff61049b16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008282111561049557600080fd5b50900390565b6000828201838110156104ad57600080fd5b939250505056fea265627a7a723158206bbecad43cd5c6d84d9075117ba886f2f9777f7267fffe0899f5aa910f6b6ba064736f6c63430005100032"; diff --git a/packages/chain-events/src/contractTypes/factories/UpgradeabilityProxy__factory.ts b/packages/chain-events/src/contractTypes/factories/UpgradeabilityProxy__factory.ts new file mode 100644 index 00000000000..1f7a6fa40dd --- /dev/null +++ b/packages/chain-events/src/contractTypes/factories/UpgradeabilityProxy__factory.ts @@ -0,0 +1,90 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { + Signer, + BytesLike, + Contract, + ContractFactory, + PayableOverrides, +} from "ethers"; +import { Provider, TransactionRequest } from "@ethersproject/providers"; + +import type { UpgradeabilityProxy } from "../UpgradeabilityProxy"; + +export class UpgradeabilityProxy__factory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): Promise { + return super.deploy( + _logic, + _data, + overrides || {} + ) as Promise; + } + getDeployTransaction( + _logic: string, + _data: BytesLike, + overrides?: PayableOverrides & { from?: string | Promise } + ): TransactionRequest { + return super.getDeployTransaction(_logic, _data, overrides || {}); + } + attach(address: string): UpgradeabilityProxy { + return super.attach(address) as UpgradeabilityProxy; + } + connect(signer: Signer): UpgradeabilityProxy__factory { + return super.connect(signer) as UpgradeabilityProxy__factory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): UpgradeabilityProxy { + return new Contract(address, _abi, signerOrProvider) as UpgradeabilityProxy; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_logic", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + stateMutability: "payable", + type: "constructor", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "implementation", + type: "address", + }, + ], + name: "Upgraded", + type: "event", + }, + { + stateMutability: "payable", + type: "fallback", + }, +]; + +const _bytecode = + "0x608060405260405161037b38038061037b8339818101604052604081101561002657600080fd5b81516020830180516040519294929383019291908464010000000082111561004d57600080fd5b90830190602082018581111561006257600080fd5b825164010000000081118282018810171561007c57600080fd5b82525081516020918201929091019080838360005b838110156100a9578181015183820152602001610091565b50505050905090810190601f1680156100d65780820380516001836020036101000a031916815260200191505b50604052506100e3915050565b6100ec826101ab565b8051156101a4576000826001600160a01b0316826040518082805190602001908083835b6020831061012f5780518252601f199092019160209182019101610110565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461018f576040519150601f19603f3d011682016040523d82523d6000602084013e610194565b606091505b50509050806101a257600080fd5b505b5050610259565b6101be8161021d60201b6100201760201c565b6101f95760405162461bcd60e51b815260040180806020018281038252603b815260200180610340603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061025157508115155b949350505050565b60d9806102676000396000f3fe6080604052600a600c565b005b6012601e565b601e601a605b565b6080565b565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590605357508115155b949350505050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015609e573d6000f35b3d6000fdfea2646970667358221220689b6635aacb183e8aaf9973d395782d593bad05bf942212a114a7024416a5d164736f6c6343000705003343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373"; diff --git a/packages/chain-events/src/contractTypes/index.ts b/packages/chain-events/src/contractTypes/index.ts new file mode 100644 index 00000000000..b1591a534bb --- /dev/null +++ b/packages/chain-events/src/contractTypes/index.ts @@ -0,0 +1,182 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IERC20 } from "./IERC20"; +export type { IGovernancePowerDelegationToken } from "./IGovernancePowerDelegationToken"; +export type { ITransferHook } from "./ITransferHook"; +export type { ERC20 } from "./ERC20"; +export type { AaveToken } from "./AaveToken"; +export type { AaveTokenV2 } from "./AaveTokenV2"; +export type { GovernancePowerDelegationERC20 } from "./GovernancePowerDelegationERC20"; +export type { AccessControl } from "./AccessControl"; +export type { IAccessControl } from "./IAccessControl"; +export type { GovernorCompatibilityBravo } from "./GovernorCompatibilityBravo"; +export type { IGovernorCompatibilityBravo } from "./IGovernorCompatibilityBravo"; +export type { GovernorCountingSimple } from "./GovernorCountingSimple"; +export type { GovernorProposalThreshold } from "./GovernorProposalThreshold"; +export type { GovernorTimelockCompound } from "./GovernorTimelockCompound"; +export type { ICompoundTimelock } from "./ICompoundTimelock"; +export type { GovernorTimelockControl } from "./GovernorTimelockControl"; +export type { GovernorVotes } from "./GovernorVotes"; +export type { GovernorVotesComp } from "./GovernorVotesComp"; +export type { GovernorVotesQuorumFraction } from "./GovernorVotesQuorumFraction"; +export type { IGovernorTimelock } from "./IGovernorTimelock"; +export type { Governor } from "./Governor"; +export type { IGovernor } from "./IGovernor"; +export type { TimelockController } from "./TimelockController"; +export type { ERC20Permit } from "./ERC20Permit"; +export type { IERC20Permit } from "./IERC20Permit"; +export type { ERC20Votes } from "./ERC20Votes"; +export type { ERC20VotesComp } from "./ERC20VotesComp"; +export type { IERC20Metadata } from "./IERC20Metadata"; +export type { ERC165 } from "./ERC165"; +export type { IERC165 } from "./IERC165"; +export type { Context } from "./Context"; +export type { IERC1820Registry } from "./IERC1820Registry"; +export type { Ownable } from "./Ownable"; +export type { ERC721 } from "./ERC721"; +export type { IERC721 } from "./IERC721"; +export type { IERC721Receiver } from "./IERC721Receiver"; +export type { ERC777 } from "./ERC777"; +export type { IERC777 } from "./IERC777"; +export type { IERC777Recipient } from "./IERC777Recipient"; +export type { IERC777Sender } from "./IERC777Sender"; +export type { BaseAdminUpgradeabilityProxy } from "./BaseAdminUpgradeabilityProxy"; +export type { BaseUpgradeabilityProxy } from "./BaseUpgradeabilityProxy"; +export type { InitializableAdminUpgradeabilityProxy } from "./InitializableAdminUpgradeabilityProxy"; +export type { InitializableUpgradeabilityProxy } from "./InitializableUpgradeabilityProxy"; +export type { Proxy } from "./Proxy"; +export type { UpgradeabilityProxy } from "./UpgradeabilityProxy"; +export type { AaveGovernanceV2 } from "./AaveGovernanceV2"; +export type { Executor } from "./Executor"; +export type { ExecutorWithTimelock } from "./ExecutorWithTimelock"; +export type { GovernanceStrategy } from "./GovernanceStrategy"; +export type { ProposalValidator } from "./ProposalValidator"; +export type { IAaveGovernanceV2 } from "./IAaveGovernanceV2"; +export type { IExecutorWithTimelock } from "./IExecutorWithTimelock"; +export type { IGovernanceStrategy } from "./IGovernanceStrategy"; +export type { IProposalValidator } from "./IProposalValidator"; +export type { IVotingStrategy } from "./IVotingStrategy"; +export type { AaveTokenV1Mock } from "./AaveTokenV1Mock"; +export type { AaveTokenV2Mock } from "./AaveTokenV2Mock"; +export type { FlashAttacks } from "./FlashAttacks"; +export type { SelfdestructTransfer } from "./SelfdestructTransfer"; +export type { ICuratedProject } from "./ICuratedProject"; +export type { ICuratedProjectFactory } from "./ICuratedProjectFactory"; +export type { IProjectBase } from "./IProjectBase"; +export type { IProjectBaseFactory } from "./IProjectBaseFactory"; +export type { ERC20VotesMock } from "./ERC20VotesMock"; +export type { FeiDAO } from "./FeiDAO"; +export type { GovernorAlpha } from "./GovernorAlpha"; +export type { MPondInterface } from "./MPondInterface"; +export type { TimelockInterface } from "./TimelockInterface"; +export type { GovernorAlphaMock } from "./GovernorAlphaMock"; +export type { GovernorBravoDelegate } from "./GovernorBravoDelegate"; +export type { GovernorBravoDelegateMock } from "./GovernorBravoDelegateMock"; +export type { GovernorBravoDelegator } from "./GovernorBravoDelegator"; +export type { GovernorBravoImmutable } from "./GovernorBravoImmutable"; +export type { CompInterface } from "./CompInterface"; +export type { GovernorBravoDelegateStorageV1 } from "./GovernorBravoDelegateStorageV1"; +export type { GovernorBravoDelegatorStorage } from "./GovernorBravoDelegatorStorage"; +export type { GovernorBravoEvents } from "./GovernorBravoEvents"; +export type { GovernorMock } from "./GovernorMock"; +export type { MPond } from "./MPond"; +export type { Timelock } from "./Timelock"; +export type { TimelockMock } from "./TimelockMock"; +export type { Migrations } from "./Migrations"; +export type { GuildBank1 } from "./GuildBank1"; +export type { Moloch1 } from "./Moloch1"; +export type { Token } from "./Token"; +export type { GuildBank2 } from "./GuildBank2"; +export type { Helper } from "./Helper"; +export type { Moloch2 } from "./Moloch2"; + +export { IERC20__factory } from "./factories/IERC20__factory"; +export { IGovernancePowerDelegationToken__factory } from "./factories/IGovernancePowerDelegationToken__factory"; +export { ITransferHook__factory } from "./factories/ITransferHook__factory"; +export { ERC20__factory } from "./factories/ERC20__factory"; +export { AaveToken__factory } from "./factories/AaveToken__factory"; +export { AaveTokenV2__factory } from "./factories/AaveTokenV2__factory"; +export { GovernancePowerDelegationERC20__factory } from "./factories/GovernancePowerDelegationERC20__factory"; +export { AccessControl__factory } from "./factories/AccessControl__factory"; +export { IAccessControl__factory } from "./factories/IAccessControl__factory"; +export { GovernorCompatibilityBravo__factory } from "./factories/GovernorCompatibilityBravo__factory"; +export { IGovernorCompatibilityBravo__factory } from "./factories/IGovernorCompatibilityBravo__factory"; +export { GovernorCountingSimple__factory } from "./factories/GovernorCountingSimple__factory"; +export { GovernorProposalThreshold__factory } from "./factories/GovernorProposalThreshold__factory"; +export { GovernorTimelockCompound__factory } from "./factories/GovernorTimelockCompound__factory"; +export { ICompoundTimelock__factory } from "./factories/ICompoundTimelock__factory"; +export { GovernorTimelockControl__factory } from "./factories/GovernorTimelockControl__factory"; +export { GovernorVotes__factory } from "./factories/GovernorVotes__factory"; +export { GovernorVotesComp__factory } from "./factories/GovernorVotesComp__factory"; +export { GovernorVotesQuorumFraction__factory } from "./factories/GovernorVotesQuorumFraction__factory"; +export { IGovernorTimelock__factory } from "./factories/IGovernorTimelock__factory"; +export { Governor__factory } from "./factories/Governor__factory"; +export { IGovernor__factory } from "./factories/IGovernor__factory"; +export { TimelockController__factory } from "./factories/TimelockController__factory"; +export { ERC20Permit__factory } from "./factories/ERC20Permit__factory"; +export { IERC20Permit__factory } from "./factories/IERC20Permit__factory"; +export { ERC20Votes__factory } from "./factories/ERC20Votes__factory"; +export { ERC20VotesComp__factory } from "./factories/ERC20VotesComp__factory"; +export { IERC20Metadata__factory } from "./factories/IERC20Metadata__factory"; +export { ERC165__factory } from "./factories/ERC165__factory"; +export { IERC165__factory } from "./factories/IERC165__factory"; +export { Context__factory } from "./factories/Context__factory"; +export { IERC1820Registry__factory } from "./factories/IERC1820Registry__factory"; +export { Ownable__factory } from "./factories/Ownable__factory"; +export { ERC721__factory } from "./factories/ERC721__factory"; +export { IERC721__factory } from "./factories/IERC721__factory"; +export { IERC721Receiver__factory } from "./factories/IERC721Receiver__factory"; +export { ERC777__factory } from "./factories/ERC777__factory"; +export { IERC777__factory } from "./factories/IERC777__factory"; +export { IERC777Recipient__factory } from "./factories/IERC777Recipient__factory"; +export { IERC777Sender__factory } from "./factories/IERC777Sender__factory"; +export { BaseAdminUpgradeabilityProxy__factory } from "./factories/BaseAdminUpgradeabilityProxy__factory"; +export { BaseUpgradeabilityProxy__factory } from "./factories/BaseUpgradeabilityProxy__factory"; +export { InitializableAdminUpgradeabilityProxy__factory } from "./factories/InitializableAdminUpgradeabilityProxy__factory"; +export { InitializableUpgradeabilityProxy__factory } from "./factories/InitializableUpgradeabilityProxy__factory"; +export { Proxy__factory } from "./factories/Proxy__factory"; +export { UpgradeabilityProxy__factory } from "./factories/UpgradeabilityProxy__factory"; +export { AaveGovernanceV2__factory } from "./factories/AaveGovernanceV2__factory"; +export { Executor__factory } from "./factories/Executor__factory"; +export { ExecutorWithTimelock__factory } from "./factories/ExecutorWithTimelock__factory"; +export { GovernanceStrategy__factory } from "./factories/GovernanceStrategy__factory"; +export { ProposalValidator__factory } from "./factories/ProposalValidator__factory"; +export { IAaveGovernanceV2__factory } from "./factories/IAaveGovernanceV2__factory"; +export { IExecutorWithTimelock__factory } from "./factories/IExecutorWithTimelock__factory"; +export { IGovernanceStrategy__factory } from "./factories/IGovernanceStrategy__factory"; +export { IProposalValidator__factory } from "./factories/IProposalValidator__factory"; +export { IVotingStrategy__factory } from "./factories/IVotingStrategy__factory"; +export { AaveTokenV1Mock__factory } from "./factories/AaveTokenV1Mock__factory"; +export { AaveTokenV2Mock__factory } from "./factories/AaveTokenV2Mock__factory"; +export { FlashAttacks__factory } from "./factories/FlashAttacks__factory"; +export { SelfdestructTransfer__factory } from "./factories/SelfdestructTransfer__factory"; +export { ICuratedProject__factory } from "./factories/ICuratedProject__factory"; +export { ICuratedProjectFactory__factory } from "./factories/ICuratedProjectFactory__factory"; +export { IProjectBase__factory } from "./factories/IProjectBase__factory"; +export { IProjectBaseFactory__factory } from "./factories/IProjectBaseFactory__factory"; +export { ERC20VotesMock__factory } from "./factories/ERC20VotesMock__factory"; +export { FeiDAO__factory } from "./factories/FeiDAO__factory"; +export { GovernorAlpha__factory } from "./factories/GovernorAlpha__factory"; +export { MPondInterface__factory } from "./factories/MPondInterface__factory"; +export { TimelockInterface__factory } from "./factories/TimelockInterface__factory"; +export { GovernorAlphaMock__factory } from "./factories/GovernorAlphaMock__factory"; +export { GovernorBravoDelegate__factory } from "./factories/GovernorBravoDelegate__factory"; +export { GovernorBravoDelegateMock__factory } from "./factories/GovernorBravoDelegateMock__factory"; +export { GovernorBravoDelegator__factory } from "./factories/GovernorBravoDelegator__factory"; +export { GovernorBravoImmutable__factory } from "./factories/GovernorBravoImmutable__factory"; +export { CompInterface__factory } from "./factories/CompInterface__factory"; +export { GovernorBravoDelegateStorageV1__factory } from "./factories/GovernorBravoDelegateStorageV1__factory"; +export { GovernorBravoDelegatorStorage__factory } from "./factories/GovernorBravoDelegatorStorage__factory"; +export { GovernorBravoEvents__factory } from "./factories/GovernorBravoEvents__factory"; +export { GovernorMock__factory } from "./factories/GovernorMock__factory"; +export { MPond__factory } from "./factories/MPond__factory"; +export { Timelock__factory } from "./factories/Timelock__factory"; +export { TimelockMock__factory } from "./factories/TimelockMock__factory"; +export { Migrations__factory } from "./factories/Migrations__factory"; +export { GuildBank1__factory } from "./factories/GuildBank1__factory"; +export { Moloch1__factory } from "./factories/Moloch1__factory"; +export { Token__factory } from "./factories/Token__factory"; +export { GuildBank2__factory } from "./factories/GuildBank2__factory"; +export { Helper__factory } from "./factories/Helper__factory"; +export { Moloch2__factory } from "./factories/Moloch2__factory"; diff --git a/packages/chain-events/src/eth.ts b/packages/chain-events/src/eth.ts new file mode 100644 index 00000000000..e980301174e --- /dev/null +++ b/packages/chain-events/src/eth.ts @@ -0,0 +1,34 @@ +import { providers } from 'ethers'; +import Web3 from 'web3'; + +import { addPrefix, factory } from './logging'; + +export async function createProvider( + ethNetworkUrl: string, + network?: string, + chain?: string +): Promise { + const log = factory.getLogger(addPrefix(__filename, [network, chain])); + try { + const web3Provider = new Web3.providers.WebsocketProvider(ethNetworkUrl, { + reconnect: { + auto: true, + delay: 5000, + maxAttempts: 10, + onTimeout: true, + }, + }); + const provider = new providers.Web3Provider(web3Provider); + // 12s minute polling interval (default is 4s) + provider.pollingInterval = 12000; + const blockNumber = await provider.getBlockNumber(); + if (!blockNumber) + throw new Error( + `A connection to ${ethNetworkUrl} could not be established.` + ); + return provider; + } catch (error) { + log.error(`Failed to connect on ${ethNetworkUrl}: ${error.message}`); + throw error; + } +} diff --git a/packages/chain-events/src/handlers/LoggingHandler.ts b/packages/chain-events/src/handlers/LoggingHandler.ts new file mode 100644 index 00000000000..848c3aa8c27 --- /dev/null +++ b/packages/chain-events/src/handlers/LoggingHandler.ts @@ -0,0 +1,12 @@ +import { CWEvent, IEventHandler, IChainEventData } from '../interfaces'; +import { addPrefix, factory } from '../logging'; + +export class LoggingHandler extends IEventHandler { + public async handle(event: CWEvent): Promise { + const log = factory.getLogger( + addPrefix(__filename, [event.network, event.chain]) + ); + log.info(`Received event: ${JSON.stringify(event, null, 2)}`); + return null; + } +} diff --git a/packages/chain-events/src/handlers/httpPostHandler.ts b/packages/chain-events/src/handlers/httpPostHandler.ts new file mode 100644 index 00000000000..29989d3ef64 --- /dev/null +++ b/packages/chain-events/src/handlers/httpPostHandler.ts @@ -0,0 +1,37 @@ +import fetch from 'node-fetch'; + +import { CWEvent, IEventHandler } from '../interfaces'; +import { addPrefix, factory } from '../logging'; + +export class httpPostHandler implements IEventHandler { + public readonly url; + + constructor(url) { + this.url = url; + } + + public async handle(event: CWEvent): Promise { + const log = factory.getLogger( + addPrefix(__filename, [event.network, event.chain]) + ); + + try { + const res = await fetch(this.url, { + method: 'POST', + body: JSON.stringify(event), + headers: { 'Content-Type': 'application/json' }, + }); + + // throw if there is an error + log.info(`Post request status code: ${res.status}`); + if (!res.ok) throw res; + + // log post request response + log.info(await res.json()); + } catch (error) { + log.error(`Error posting event ${event} to ${this.url}`); + // log error info returned by the server if any + log.error(await error.text()); + } + } +} diff --git a/packages/chain-events/src/handlers/index.ts b/packages/chain-events/src/handlers/index.ts new file mode 100644 index 00000000000..6df6d50a09a --- /dev/null +++ b/packages/chain-events/src/handlers/index.ts @@ -0,0 +1,2 @@ +export * from './httpPostHandler'; +export * from './LoggingHandler'; diff --git a/packages/chain-events/src/index.ts b/packages/chain-events/src/index.ts new file mode 100644 index 00000000000..882a0f218fa --- /dev/null +++ b/packages/chain-events/src/index.ts @@ -0,0 +1,19 @@ +export * from './interfaces'; +export * as MolochEvents from './chains/moloch/index'; +export * as MolochTypes from './chains/moloch/types'; +export * as CompoundEvents from './chains/compound/index'; +export * as CompoundTypes from './chains/compound/types'; +export * as SubstrateEvents from './chains/substrate/index'; +export * as SubstrateTypes from './chains/substrate/types'; +export * as Erc20Events from './chains/erc20/index'; +export * as Erc20Types from './chains/erc20/types'; +export * as Erc721Events from './chains/erc721/index'; +export * as Erc721Types from './chains/erc721/types'; +export * as AaveEvents from './chains/aave/index'; +export * as AaveTypes from './chains/aave/types'; +export * as CommonwealthEvents from './chains/commonwealth/index'; +export * as CommonwealthTypes from './chains/commonwealth/types'; + +export { Listener } from './Listener'; +export * from './handlers'; +export * from './util'; diff --git a/packages/chain-events/src/interfaces.ts b/packages/chain-events/src/interfaces.ts new file mode 100644 index 00000000000..a7a8d82546b --- /dev/null +++ b/packages/chain-events/src/interfaces.ts @@ -0,0 +1,504 @@ +/** + * Defines general interfaces for chain event fetching and processing. + */ + +import * as SubstrateTypes from './chains/substrate/types'; +import * as MolochTypes from './chains/moloch/types'; +import * as CompoundTypes from './chains/compound/types'; +import * as Erc20Types from './chains/erc20/types'; +import * as Erc721Types from './chains/erc721/types'; +import * as AaveTypes from './chains/aave/types'; +import * as CommonwealthTypes from './chains/commonwealth/types'; + +// add other events here as union types +export type IChainEntityKind = + | SubstrateTypes.EntityKind + | MolochTypes.EntityKind + | CompoundTypes.EntityKind + | AaveTypes.EntityKind + | CommonwealthTypes.EntityKind; +export type IChainEventData = + | SubstrateTypes.IEventData + | MolochTypes.IEventData + | CompoundTypes.IEventData + | AaveTypes.IEventData + | Erc20Types.IEventData + | Erc721Types.IEventData + | CommonwealthTypes.IEventData; +export type IChainEventKind = + | SubstrateTypes.EventKind + | MolochTypes.EventKind + | CompoundTypes.EventKind + | AaveTypes.EventKind + | Erc20Types.EventKind + | Erc721Types.EventKind + | CommonwealthTypes.EventKind; +export const ChainEventKinds = [ + ...SubstrateTypes.EventKinds, + ...MolochTypes.EventKinds, + ...CompoundTypes.EventKinds, + ...AaveTypes.EventKinds, + ...Erc20Types.EventKinds, + ...Erc721Types.EventKinds, + ...CommonwealthTypes.EventKinds, +]; + +// eslint-disable-next-line no-shadow +export enum SupportedNetwork { + Substrate = 'substrate', + Aave = 'aave', + Compound = 'compound', + Moloch = 'moloch', + ERC20 = 'erc20', + ERC721 = 'erc721', + Commonwealth = 'commonwealth', +} + +// eslint-disable-next-line no-shadow +export enum EntityEventKind { + Create = 0, + Update, + Vote, + Complete, +} + +export interface CWEvent { + blockNumber: number; + includeAddresses?: string[]; + excludeAddresses?: string[]; + + data: IEventData; + network: SupportedNetwork; + chain?: string; + received?: number; +} + +// handles individual events by sending them off to storage/notifying +export abstract class IEventHandler { + // throws on error, returns a db event, or void + public abstract handle( + event: CWEvent, + dbEvent?: DBEventType + ): Promise; +} + +// parses events out of blocks into a standard format and +// passes them through to the handler +export abstract class IEventProcessor { + constructor(protected _api: Api) {} + + // throws on error + public abstract process(block: RawEvent): Promise; +} + +// fetches blocks from chain in real-time via subscription for processing +export abstract class IEventSubscriber { + constructor(protected _api: Api, protected _verbose = false) {} + + public get api(): Api { + return this._api; + } + + // throws on error + public abstract subscribe(cb: (event: RawEvent) => void): Promise; + + public abstract unsubscribe(): void; +} + +export interface IDisconnectedRange { + startBlock?: number; + endBlock?: number; + maxResults?: number; +} + +export interface ISubscribeOptions { + chain: string; + api: Api; + handlers: IEventHandler[]; + skipCatchup?: boolean; + archival?: boolean; + startBlock?: number; + discoverReconnectRange?: () => Promise; + verbose?: boolean; +} + +export type SubscribeFunc< + Api, + RawEvent, + Options extends ISubscribeOptions +> = (options: Options) => Promise>; + +// synthesizes events from chain storage +export abstract class IStorageFetcher { + constructor(protected _api: Api) {} + + public abstract fetch( + range?: IDisconnectedRange, + fetchAllCompleted?: boolean + ): Promise; + + public abstract fetchOne( + id: string, + kind?: IChainEntityKind + ): Promise; +} + +// fetches historical blocks from chain for processing +export abstract class IEventPoller { + constructor(protected _api: Api) {} + + // throws on error + public abstract poll( + range: IDisconnectedRange, + maxRange?: number + ): Promise; +} + +// a set of labels used to display notifications +export interface IEventLabel { + heading: string; + label: string; + linkUrl?: string; +} + +// a function that prepares chain data for user display +export type LabelerFilter = ( + blockNumber: number, + chainId: string, + data: IChainEventData, + ...formatters +) => IEventLabel; + +export interface IEventTitle { + title: string; + description: string; +} + +export type TitlerFilter = (kind: IChainEventKind) => IEventTitle; + +export function entityToFieldName( + network: SupportedNetwork, + entity: IChainEntityKind +): string | null { + if (network === SupportedNetwork.Compound) { + return 'id'; + } + if (network === SupportedNetwork.Aave) { + return 'id'; + } + if (network === SupportedNetwork.Moloch) { + return 'proposalIndex'; + } + if (network === SupportedNetwork.Commonwealth) { + return 'id'; + } + switch (entity) { + case SubstrateTypes.EntityKind.DemocracyProposal: { + return 'proposalIndex'; + } + case SubstrateTypes.EntityKind.DemocracyReferendum: { + return 'referendumIndex'; + } + case SubstrateTypes.EntityKind.DemocracyPreimage: { + return 'proposalHash'; + } + case SubstrateTypes.EntityKind.TreasuryProposal: { + return 'proposalIndex'; + } + case SubstrateTypes.EntityKind.TreasuryBounty: { + return 'bountyIndex'; + } + case SubstrateTypes.EntityKind.CollectiveProposal: { + return 'proposalHash'; + } + case SubstrateTypes.EntityKind.SignalingProposal: { + return 'proposalHash'; + } + case SubstrateTypes.EntityKind.TipProposal: { + return 'proposalHash'; + } + default: { + return null; + } + } +} + +export function eventToEntity( + network: SupportedNetwork, + event: IChainEventKind +): [IChainEntityKind, EntityEventKind] { + if (network === SupportedNetwork.Moloch) { + switch (event) { + case MolochTypes.EventKind.SubmitProposal: { + return [MolochTypes.EntityKind.Proposal, EntityEventKind.Create]; + } + case MolochTypes.EventKind.SubmitVote: { + return [MolochTypes.EntityKind.Proposal, EntityEventKind.Vote]; + } + case MolochTypes.EventKind.ProcessProposal: { + return [MolochTypes.EntityKind.Proposal, EntityEventKind.Complete]; + } + case MolochTypes.EventKind.Abort: { + return [MolochTypes.EntityKind.Proposal, EntityEventKind.Complete]; + } + default: + return null; + } + } + if (network === SupportedNetwork.Compound) { + switch (event) { + case CompoundTypes.EventKind.ProposalCanceled: { + return [CompoundTypes.EntityKind.Proposal, EntityEventKind.Complete]; + } + case CompoundTypes.EventKind.ProposalCreated: { + return [CompoundTypes.EntityKind.Proposal, EntityEventKind.Create]; + } + case CompoundTypes.EventKind.ProposalExecuted: { + return [CompoundTypes.EntityKind.Proposal, EntityEventKind.Complete]; + } + case CompoundTypes.EventKind.ProposalQueued: { + return [CompoundTypes.EntityKind.Proposal, EntityEventKind.Update]; + } + case CompoundTypes.EventKind.VoteCast: { + return [CompoundTypes.EntityKind.Proposal, EntityEventKind.Vote]; + } + default: + return null; + } + } + if (network === SupportedNetwork.Aave) { + switch (event) { + case AaveTypes.EventKind.ProposalCreated: { + return [AaveTypes.EntityKind.Proposal, EntityEventKind.Create]; + } + case AaveTypes.EventKind.VoteEmitted: { + return [AaveTypes.EntityKind.Proposal, EntityEventKind.Vote]; + } + case AaveTypes.EventKind.ProposalQueued: { + return [AaveTypes.EntityKind.Proposal, EntityEventKind.Update]; + } + case AaveTypes.EventKind.ProposalExecuted: + case AaveTypes.EventKind.ProposalCanceled: { + return [AaveTypes.EntityKind.Proposal, EntityEventKind.Complete]; + } + default: + return null; + } + } + if (network === SupportedNetwork.Commonwealth) { + switch (event) { + case CommonwealthTypes.EventKind.ProjectCreated: { + return [CommonwealthTypes.EntityKind.Project, EntityEventKind.Create]; + } + // TODO: verify vote is correct here + case CommonwealthTypes.EventKind.ProjectBacked: + case CommonwealthTypes.EventKind.ProjectCurated: + case CommonwealthTypes.EventKind.ProjectWithdraw: { + return [CommonwealthTypes.EntityKind.Project, EntityEventKind.Vote]; + } + case CommonwealthTypes.EventKind.ProjectSucceeded: + case CommonwealthTypes.EventKind.ProjectFailed: { + return [CommonwealthTypes.EntityKind.Project, EntityEventKind.Update]; + } + default: { + return null; + } + } + } + if (network === SupportedNetwork.Substrate) { + switch (event) { + // SUBSTRATE + // Democracy Events + case SubstrateTypes.EventKind.DemocracyProposed: { + return [ + SubstrateTypes.EntityKind.DemocracyProposal, + EntityEventKind.Create, + ]; + } + case SubstrateTypes.EventKind.DemocracyTabled: { + return [ + SubstrateTypes.EntityKind.DemocracyProposal, + EntityEventKind.Complete, + ]; + } + + case SubstrateTypes.EventKind.DemocracyStarted: { + return [ + SubstrateTypes.EntityKind.DemocracyReferendum, + EntityEventKind.Create, + ]; + } + case SubstrateTypes.EventKind.DemocracyVoted: { + return [ + SubstrateTypes.EntityKind.DemocracyReferendum, + EntityEventKind.Vote, + ]; + } + case SubstrateTypes.EventKind.DemocracyPassed: { + return [ + SubstrateTypes.EntityKind.DemocracyReferendum, + EntityEventKind.Update, + ]; + } + case SubstrateTypes.EventKind.DemocracyNotPassed: + case SubstrateTypes.EventKind.DemocracyCancelled: + case SubstrateTypes.EventKind.DemocracyExecuted: { + return [ + SubstrateTypes.EntityKind.DemocracyReferendum, + EntityEventKind.Complete, + ]; + } + + // Preimage Events + case SubstrateTypes.EventKind.PreimageNoted: { + return [ + SubstrateTypes.EntityKind.DemocracyPreimage, + EntityEventKind.Create, + ]; + } + case SubstrateTypes.EventKind.PreimageUsed: + case SubstrateTypes.EventKind.PreimageInvalid: + case SubstrateTypes.EventKind.PreimageReaped: { + return [ + SubstrateTypes.EntityKind.DemocracyPreimage, + EntityEventKind.Complete, + ]; + } + + // Tip Events + case SubstrateTypes.EventKind.NewTip: { + return [SubstrateTypes.EntityKind.TipProposal, EntityEventKind.Create]; + } + case SubstrateTypes.EventKind.TipVoted: + case SubstrateTypes.EventKind.TipClosing: { + return [SubstrateTypes.EntityKind.TipProposal, EntityEventKind.Update]; + } + case SubstrateTypes.EventKind.TipClosed: + case SubstrateTypes.EventKind.TipRetracted: + case SubstrateTypes.EventKind.TipSlashed: { + return [ + SubstrateTypes.EntityKind.TipProposal, + EntityEventKind.Complete, + ]; + } + + // Treasury Events + case SubstrateTypes.EventKind.TreasuryProposed: { + return [ + SubstrateTypes.EntityKind.TreasuryProposal, + EntityEventKind.Create, + ]; + } + case SubstrateTypes.EventKind.TreasuryRejected: + case SubstrateTypes.EventKind.TreasuryAwarded: { + return [ + SubstrateTypes.EntityKind.TreasuryProposal, + EntityEventKind.Complete, + ]; + } + + // Bounty Events + case SubstrateTypes.EventKind.TreasuryBountyProposed: { + return [ + SubstrateTypes.EntityKind.TreasuryBounty, + EntityEventKind.Create, + ]; + } + case SubstrateTypes.EventKind.TreasuryBountyAwarded: { + return [ + SubstrateTypes.EntityKind.TreasuryBounty, + EntityEventKind.Update, + ]; + } + case SubstrateTypes.EventKind.TreasuryBountyBecameActive: { + return [ + SubstrateTypes.EntityKind.TreasuryBounty, + EntityEventKind.Update, + ]; + } + case SubstrateTypes.EventKind.TreasuryBountyCanceled: { + return [ + SubstrateTypes.EntityKind.TreasuryBounty, + EntityEventKind.Complete, + ]; + } + case SubstrateTypes.EventKind.TreasuryBountyClaimed: { + return [ + SubstrateTypes.EntityKind.TreasuryBounty, + EntityEventKind.Complete, + ]; + } + case SubstrateTypes.EventKind.TreasuryBountyExtended: { + return [ + SubstrateTypes.EntityKind.TreasuryBounty, + EntityEventKind.Update, + ]; + } + case SubstrateTypes.EventKind.TreasuryBountyRejected: { + return [ + SubstrateTypes.EntityKind.TreasuryBounty, + EntityEventKind.Complete, + ]; + } + + // Collective Events + case SubstrateTypes.EventKind.CollectiveProposed: { + return [ + SubstrateTypes.EntityKind.CollectiveProposal, + EntityEventKind.Create, + ]; + } + case SubstrateTypes.EventKind.CollectiveVoted: { + return [ + SubstrateTypes.EntityKind.CollectiveProposal, + EntityEventKind.Vote, + ]; + } + case SubstrateTypes.EventKind.CollectiveApproved: { + return [ + SubstrateTypes.EntityKind.CollectiveProposal, + EntityEventKind.Update, + ]; + } + case SubstrateTypes.EventKind.CollectiveDisapproved: + case SubstrateTypes.EventKind.CollectiveExecuted: { + return [ + SubstrateTypes.EntityKind.CollectiveProposal, + EntityEventKind.Complete, + ]; + } + + // Signaling Events + case SubstrateTypes.EventKind.SignalingNewProposal: { + return [ + SubstrateTypes.EntityKind.SignalingProposal, + EntityEventKind.Create, + ]; + } + case SubstrateTypes.EventKind.SignalingCommitStarted: + case SubstrateTypes.EventKind.SignalingVotingStarted: { + return [ + SubstrateTypes.EntityKind.SignalingProposal, + EntityEventKind.Update, + ]; + } + case SubstrateTypes.EventKind.SignalingVotingCompleted: { + return [ + SubstrateTypes.EntityKind.SignalingProposal, + EntityEventKind.Complete, + ]; + } + default: { + return null; + } + } + } + return null; +} + +export function isEntityCompleted(entityEvents: CWEvent[]): boolean { + return entityEvents.some(({ network, data: { kind } }) => { + const entityData = eventToEntity(network, kind); + return entityData && entityData[1] === EntityEventKind.Complete; + }); +} diff --git a/packages/chain-events/src/logging.ts b/packages/chain-events/src/logging.ts new file mode 100644 index 00000000000..aeef0e28410 --- /dev/null +++ b/packages/chain-events/src/logging.ts @@ -0,0 +1,44 @@ +import { + LoggerFactoryOptions, + LFService, + LogGroupRule, + LogLevel, + getLogControl, + LogGroupControlSettings, +} from 'typescript-logging'; + +const options = new LoggerFactoryOptions() + .addLogGroupRule(new LogGroupRule(new RegExp('model.+'), LogLevel.Debug)) + .addLogGroupRule(new LogGroupRule(new RegExp('route.+'), LogLevel.Debug)) + .addLogGroupRule(new LogGroupRule(new RegExp('.+'), LogLevel.Info)); + +export const formatFilename = (name: string): string => { + const t = name.split('/'); + return t[t.length - 1]; +}; + +export const addPrefix = (filename: string, prefixes?: string[]): string => { + let finalPrefix = ``; + if (!prefixes || prefixes.length === 0) return formatFilename(filename); + finalPrefix = `${formatFilename(filename)}`; + + for (let i = 0; i < prefixes.length; ++i) { + if (prefixes[i]) finalPrefix = `${finalPrefix}::${prefixes[i]}`; + } + return finalPrefix; +}; + +export const factory = LFService.createNamedLoggerFactory( + 'ChainEvents', + options +); + +const control = getLogControl(); + +// Factories are numbered, use listFactories() to find out +export const factoryControl = control.getLoggerFactoryControl(0); + +// Change the loglevel for all LogGroups for this factory to Debug +// (so all existing/new loggers from this factory will log to Debug) +const logLevel = process.env.NODE_ENV !== 'production' ? 'Debug' : 'Info'; +factoryControl.change({ group: 'all', logLevel } as LogGroupControlSettings); diff --git a/packages/chain-events/src/util.ts b/packages/chain-events/src/util.ts new file mode 100644 index 00000000000..afc007f71de --- /dev/null +++ b/packages/chain-events/src/util.ts @@ -0,0 +1,216 @@ +import { + IDisconnectedRange, + IEventProcessor, + IEventSubscriber, + IStorageFetcher, + SupportedNetwork, + CWEvent, + IEventTitle, + IEventLabel, + IChainEventKind, +} from './interfaces'; +import { + Listener as SubstrateListener, + Title as SubstrateTitle, + Label as SubstrateLabel, +} from './chains/substrate'; +import { + Listener as MolochListener, + Title as MolochTitle, + Label as MolochLabel, +} from './chains/moloch'; +import { + Listener as CompoundListener, + Title as CompoundTitle, + Label as CompoundLabel, +} from './chains/compound'; +import { + Listener as Erc20Listener, + Title as Erc20Title, + Label as Erc20Label, +} from './chains/erc20'; +import { + Listener as Erc721Listener, + Title as Erc721Title, + Label as Erc721Label, +} from './chains/erc721'; +import { + Listener as AaveListener, + Title as AaveTitle, + Label as AaveLabel, +} from './chains/aave'; +import { + Listener as CommonwealthListener, + Title as CommonwealthTitle, + Label as CommonwealthLabel, +} from './chains/commonwealth'; +import { Listener } from './Listener'; +import { addPrefix, factory } from './logging'; + +export function Title( + network: SupportedNetwork, + kind: IChainEventKind +): IEventTitle { + switch (network) { + case SupportedNetwork.Substrate: + return SubstrateTitle(kind); + case SupportedNetwork.Aave: + return AaveTitle(kind); + case SupportedNetwork.Compound: + return CompoundTitle(kind); + case SupportedNetwork.ERC20: + return Erc20Title(kind); + case SupportedNetwork.ERC721: + return Erc721Title(kind); + case SupportedNetwork.Moloch: + return MolochTitle(kind); + case SupportedNetwork.Commonwealth: + return CommonwealthTitle(kind); + default: + throw new Error(`Invalid network: ${network}`); + } +} + +export function Label(chain: string, event: CWEvent): IEventLabel { + switch (event.network) { + case SupportedNetwork.Substrate: + return SubstrateLabel(event.blockNumber, chain, event.data); + case SupportedNetwork.Aave: + return AaveLabel(event.blockNumber, chain, event.data); + case SupportedNetwork.Compound: + return CompoundLabel(event.blockNumber, chain, event.data); + case SupportedNetwork.ERC20: + return Erc20Label(event.blockNumber, chain, event.data); + case SupportedNetwork.ERC721: + return Erc721Label(event.blockNumber, chain, event.data); + case SupportedNetwork.Moloch: + return MolochLabel(event.blockNumber, chain, event.data); + case SupportedNetwork.Commonwealth: + return CommonwealthLabel(event.blockNumber, chain, event.data); + default: + throw new Error(`Invalid network: ${event.network}`); + } +} + +/** + * Creates a listener instance and returns it if no error occurs. This function throws on error. + * @param chain The chain to create a listener for + * @param options The listener options for the specified chain + * @param network the listener network to use + */ +export async function createListener( + chain: string, + network: SupportedNetwork, + options: { + address?: string; + tokenAddresses?: string[]; + tokenNames?: string[]; + MolochContractVersion?: 1 | 2; + verbose?: boolean; + skipCatchup?: boolean; + startBlock?: number; + archival?: boolean; + spec?: Record; + url?: string; + enricherConfig?: any; + discoverReconnectRange?: (c: string) => Promise; + } +): Promise< + Listener< + any, + IStorageFetcher, + IEventProcessor, + IEventSubscriber, + any + > +> { + let listener: Listener< + any, + IStorageFetcher, + IEventProcessor, + IEventSubscriber, + any + >; + const log = factory.getLogger(addPrefix(__filename, [network, chain])); + + if (network === SupportedNetwork.Substrate) { + // start a substrate listener + listener = new SubstrateListener( + chain, + options.url, + options.spec, + !!options.archival, + options.startBlock || 0, + !!options.skipCatchup, + options.enricherConfig, + !!options.verbose, + options.discoverReconnectRange + ); + } else if (network === SupportedNetwork.Moloch) { + listener = new MolochListener( + chain, + options.MolochContractVersion ? options.MolochContractVersion : 2, + options.address, + options.url, + !!options.skipCatchup, + !!options.verbose, + options.discoverReconnectRange + ); + } else if (network === SupportedNetwork.Compound) { + listener = new CompoundListener( + chain, + options.address, + options.url, + !!options.skipCatchup, + !!options.verbose, + options.discoverReconnectRange + ); + } else if (network === SupportedNetwork.ERC20) { + listener = new Erc20Listener( + chain, + options.tokenAddresses || [options.address], + options.url, + Array.isArray(options.tokenNames) ? options.tokenNames : undefined, + options.enricherConfig, + !!options.verbose + ); + } else if (network === SupportedNetwork.ERC721) { + listener = new Erc721Listener( + chain, + options.tokenAddresses || [options.address], + options.url, + Array.isArray(options.tokenNames) ? options.tokenNames : undefined, + !!options.verbose + ); + } else if (network === SupportedNetwork.Aave) { + listener = new AaveListener( + chain, + options.address, + options.url, + !!options.skipCatchup, + !!options.verbose, + options.discoverReconnectRange + ); + } else if (network === SupportedNetwork.Commonwealth) { + listener = new CommonwealthListener( + chain, + options.address, + options.url, + !!options.skipCatchup, + !!options.verbose, + options.discoverReconnectRange + ); + } else { + throw new Error(`Invalid network: ${network}`); + } + + try { + if (!listener) throw new Error('Listener is still null'); + await listener.init(); + } catch (error) { + log.error(`Failed to initialize the listener`); + throw error; + } + + return listener; +} diff --git a/packages/chain-events/test/integration/aave.spec.ts b/packages/chain-events/test/integration/aave.spec.ts new file mode 100644 index 00000000000..8c919aa2132 --- /dev/null +++ b/packages/chain-events/test/integration/aave.spec.ts @@ -0,0 +1,539 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +/* eslint-disable global-require */ +/* eslint-disable no-unused-expressions */ +import { EventEmitter } from 'events'; + +import { BigNumber, providers, utils } from 'ethers'; +import { assert } from 'chai'; + +import { + AaveTokenV2Mock__factory as AaveTokenV2Factory, + AaveTokenV2Mock as AaveTokenV2, + GovernanceStrategy__factory as GovernanceStrategyFactory, + GovernanceStrategy, + Executor__factory as ExecutorFactory, + Executor, + AaveGovernanceV2__factory as AaveGovernanceV2Factory, +} from '../../src/contractTypes'; +import { + Api, + IEventData, + EventKind, + IProposalCreated, + IProposalCanceled, + IVoteEmitted, + ProposalState, + IProposalQueued, + IProposalExecuted, + IDelegateChanged, + IDelegatedPowerChanged, + ITransfer, +} from '../../src/chains/aave/types'; +import { subscribeEvents } from '../../src/chains/aave/subscribeFunc'; +import { + IEventHandler, + CWEvent, + IChainEventData, + SupportedNetwork, +} from '../../src/interfaces'; +import { StorageFetcher } from '../../src/chains/aave/storageFetcher'; + +function getProvider(): providers.Web3Provider { + const web3Provider = require('ganache-cli').provider({ + allowUnlimitedContractSize: true, + gasLimit: 1000000000, + time: new Date(1000), + mnemonic: 'Alice', + // logger: console, + }); + return new providers.Web3Provider(web3Provider); +} + +class AaveEventHandler extends IEventHandler { + constructor(public readonly emitter: EventEmitter) { + super(); + } + + public async handle(event: CWEvent): Promise { + this.emitter.emit(event.data.kind.toString(), event); + return null; + } +} + +function assertEvent( + handler: AaveEventHandler, + event: EventKind, + cb: (evt: CWEvent) => void +) { + return new Promise((resolve, reject) => { + handler.emitter.on(event, (evt: CWEvent) => { + try { + cb(evt); + resolve(); + } catch (e) { + reject(e); + } + }); + }); +} + +interface ISetupData { + api: Api; + executor: Executor; + strategy: GovernanceStrategy; + addresses: string[]; + provider: providers.Web3Provider; + handler: AaveEventHandler; +} + +async function increaseTime( + blocks: number, + provider: providers.Web3Provider +): Promise { + const timeToAdvance = blocks * 15; + console.log(`Mining ${blocks} blocks and adding ${timeToAdvance} seconds!`); + await provider.send('evm_increaseTime', [timeToAdvance]); + for (let i = 0; i < blocks; i++) { + await provider.send('evm_mine', []); + } +} + +async function initToken( + handler: AaveEventHandler, + token: AaveTokenV2, + member: string, + amount: string +): Promise { + await token.mint(member, amount); + await token.delegate(member); + await Promise.all([ + assertEvent(handler, EventKind.Transfer, (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.Transfer, + tokenAddress: token.address, + from: '0x0000000000000000000000000000000000000000', + to: member, + amount, + }); + }), + assertEvent( + handler, + EventKind.DelegateChanged, + (evt: CWEvent) => { + // should emit for both types + assert.deepEqual( + { + tokenAddress: evt.data.tokenAddress, + delegatee: evt.data.delegatee, + delegator: evt.data.delegator, + }, + { + tokenAddress: token.address, + delegatee: member, + delegator: member, + } + ); + } + ), + assertEvent( + handler, + EventKind.DelegatedPowerChanged, + (evt: CWEvent) => { + // should emit for both types + assert.deepEqual( + { + tokenAddress: evt.data.tokenAddress, + who: evt.data.who, + amount: evt.data.amount, + }, + { + tokenAddress: token.address, + who: member, + amount, + } + ); + } + ), + ]); +} + +async function setupSubscription(subscribe = true): Promise { + const provider = getProvider(); + const addresses: string[] = await provider.listAccounts(); + const [member] = addresses; + const signer = provider.getSigner(member); + const TOTAL_SUPPLY = '1000000'; + + // deploy and delegate tokens + const tokenFactory = new AaveTokenV2Factory(signer); + const token1 = await tokenFactory.deploy(); + const token2 = await tokenFactory.deploy(); + + // deploy strategy + const strategyFactory = new GovernanceStrategyFactory(signer); + const strategy = await strategyFactory.deploy(token1.address, token2.address); + + // deploy AaveGovernance without executor, so we can pass as admin to executor constructor + const govFactory = new AaveGovernanceV2Factory(signer); + const governance = await govFactory.deploy( + strategy.address, + 4, // 4 block voting delay + member, + [] + ); + + // deploy Executor + const executorFactory = new ExecutorFactory(signer); + const executor = await executorFactory.deploy( + governance.address, + 60, // 1min delay + 60, // 1min grace period + 15, // 15s minimum delay + 120, // 2min maximum delay + 10, // 10% of supply required to submit + 12, // 12 blocks voting period + 10, // 10% differential required to pass + 20 // 20% quorum + ); + + // authorize executor on governance contract + await governance.authorizeExecutors([executor.address]); + + const api: Api = { + governance, + aaveToken: token1, + stkAaveToken: token2, + }; + + const emitter = new EventEmitter(); + const handler = new AaveEventHandler(emitter); + if (subscribe) { + await subscribeEvents({ + chain: 'aave-local', + api, + handlers: [handler], + // skipCatchup: true, + }); + } + + // initialize tokens and test delegate events + await initToken(handler, token1, member, TOTAL_SUPPLY); + await initToken(handler, token2, member, TOTAL_SUPPLY); + await increaseTime(1, provider); + return { api, executor, strategy, addresses, provider, handler }; +} + +async function createProposal({ + api, + executor, + addresses, + provider, + handler, +}: ISetupData): Promise { + const targets = ['0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B']; + const values = ['0']; + const signatures = ['_setCollateralFactor(address,uint256)']; + const calldatas = [ + '0x000000000000000000000000c11b1268c1a384e55c48c2391d8d480264a3a7f40000000000000000000000000000000000000000000000000853a0d2313c0000', + ]; + const withDelegateCalls = [false]; + const ipfsHash = utils.formatBytes32String('0x123abc'); + const strategy = await api.governance.getGovernanceStrategy(); + const blockNumber = await provider.getBlockNumber(); + const id = await api.governance.getProposalsCount(); + await api.governance.create( + executor.address, + targets, + values, + signatures, + calldatas, + withDelegateCalls, + ipfsHash + ); + await assertEvent( + handler, + EventKind.ProposalCreated, + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.ProposalCreated, + id: +id, + proposer: addresses[0], + executor: executor.address, + targets, + values, + signatures, + calldatas, + startBlock: blockNumber + 1 + 4, // voting delay + endBlock: blockNumber + 1 + 4 + 12, // voting delay + voting duration + strategy, + ipfsHash, + }); + } + ); + const state = await api.governance.getProposalState(id); + assert.equal(state, ProposalState.PENDING); + return +id; +} + +async function createAndCancel(setupData: ISetupData): Promise { + const id = await createProposal(setupData); + await setupData.api.governance.cancel(id); + await assertEvent( + setupData.handler, + EventKind.ProposalCanceled, + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.ProposalCanceled, + id, + }); + } + ); + return id; +} + +async function createAndVote({ + api, + executor, + addresses, + strategy, + provider, + handler, +}: ISetupData): Promise<{ + id: number; + votingBlock: number; + votingPower: BigNumber; +}> { + const id = await createProposal({ + api, + executor, + addresses, + strategy, + provider, + handler, + }); + + // advance time to proposal start + const { startBlock } = await api.governance.getProposalById(id); + const currentBlock = await provider.getBlockNumber(); + const blocksToAdvance = +startBlock - currentBlock + 1; + await increaseTime(blocksToAdvance, provider); + + const votingBlock = await provider.getBlockNumber(); + const state = await api.governance.getProposalState(id); + assert.equal(state, ProposalState.ACTIVE); + + // emit vote + const votingPower = await strategy.getVotingPowerAt( + addresses[0], + votingBlock + ); + await api.governance.submitVote(id, true); + await assertEvent( + handler, + EventKind.VoteEmitted, + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.VoteEmitted, + id, + voter: addresses[0], + support: true, + votingPower: votingPower.toString(), + }); + } + ); + return { id, votingBlock, votingPower }; +} + +async function proposeToCompletion( + setupData: ISetupData +): Promise<{ id: number; votingBlock: number; votingPower: BigNumber }> { + const { id, votingBlock, votingPower } = await createAndVote(setupData); + + // wait for voting to succeed + const { api, provider, executor } = setupData; + const { endBlock } = await api.governance.getProposalById(id); + const currentBlock = await provider.getBlockNumber(); + const blocksToAdvance = +endBlock - currentBlock + 1; + await increaseTime(blocksToAdvance, provider); + + const state = await api.governance.getProposalState(id); + assert.equal(state, ProposalState.SUCCEEDED); + + // queue proposal + const delay = await executor.getDelay(); + await api.governance.queue(id); + const queueBlock = await provider.getBlockNumber(); + const { timestamp } = await provider.getBlock(queueBlock); + const executionTime = timestamp + +delay; + await assertEvent( + setupData.handler, + EventKind.ProposalQueued, + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.ProposalQueued, + id, + executionTime, + }); + } + ); + const queuedState = await api.governance.getProposalState(id); + assert.equal(queuedState, ProposalState.QUEUED); + + // wait for execution + const delayBlocks = Math.ceil(+delay / 15) + 1; + await increaseTime(delayBlocks, provider); + await api.governance.execute(id); + await assertEvent( + setupData.handler, + EventKind.ProposalExecuted, + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.ProposalExecuted, + id, + }); + } + ); + return { id, votingBlock, votingPower }; +} + +describe('Aave Event Integration Tests', () => { + it('should create a proposal', async () => { + const setupData = await setupSubscription(); + await createProposal(setupData); + }); + + it('should cancel a proposal', async () => { + const setupData = await setupSubscription(); + await createAndCancel(setupData); + }); + + it('should vote on a proposal', async () => { + const setupData = await setupSubscription(); + await createAndVote(setupData); + }); + + it('should queue and execute a proposal', async () => { + const setupData = await setupSubscription(); + await proposeToCompletion(setupData); + }); + + it('should fetch proposals from storage', async () => { + const setupData = await setupSubscription(); + const { api, strategy, executor, addresses } = setupData; + + const targets = ['0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B']; + const values = ['0']; + const signatures = ['_setCollateralFactor(address,uint256)']; + const calldatas = [ + '0x000000000000000000000000c11b1268c1a384e55c48c2391d8d480264a3a7f40000000000000000000000000000000000000000000000000853a0d2313c0000', + ]; + const ipfsHash = utils.formatBytes32String('0x123abc'); + + // cancel first proposal + const cancelledId = await createAndCancel(setupData); + const cancelledProposal = await api.governance.getProposalById(cancelledId); + + // complete second proposal + const { + id: completedId, + votingBlock, + votingPower, + } = await proposeToCompletion(setupData); + const completedProposal = await api.governance.getProposalById(completedId); + + // TODO: compute block numbers rather than manually + const eventData: CWEvent[] = [ + { + blockNumber: 12, + excludeAddresses: [addresses[0]], + network: SupportedNetwork.Aave, + data: { + kind: EventKind.ProposalCreated, + id: cancelledId, + proposer: addresses[0], + executor: executor.address, + targets, + values, + signatures, + calldatas, + startBlock: +cancelledProposal.startBlock, + endBlock: +cancelledProposal.endBlock, + strategy: strategy.address, + ipfsHash, + }, + }, + { + blockNumber: 13, + excludeAddresses: [], + network: SupportedNetwork.Aave, + data: { + kind: EventKind.ProposalCanceled, + id: cancelledId, + }, + }, + { + blockNumber: 14, + excludeAddresses: [addresses[0]], + network: SupportedNetwork.Aave, + data: { + kind: EventKind.ProposalCreated, + id: completedId, + proposer: addresses[0], + executor: executor.address, + targets, + values, + signatures, + calldatas, + startBlock: +completedProposal.startBlock, + endBlock: +completedProposal.endBlock, + strategy: strategy.address, + ipfsHash, + }, + }, + { + blockNumber: votingBlock + 1, + excludeAddresses: [addresses[0]], + network: SupportedNetwork.Aave, + data: { + kind: EventKind.VoteEmitted, + id: completedId, + support: true, + voter: addresses[0], + votingPower: votingPower.toString(), + }, + }, + { + blockNumber: 32, + excludeAddresses: [], + network: SupportedNetwork.Aave, + data: { + kind: EventKind.ProposalQueued, + id: completedId, + executionTime: +completedProposal.executionTime, + }, + }, + { + blockNumber: 38, + excludeAddresses: [], + network: SupportedNetwork.Aave, + data: { + kind: EventKind.ProposalExecuted, + id: completedId, + }, + }, + ]; + + // fetch all non-complete from storage (none) + const fetcher = new StorageFetcher(api); + + // fetch all from storage + const allData = await fetcher.fetch(); + assert.deepEqual(allData, eventData); + + // fetch some from storage + const completedData = await fetcher.fetch({ + startBlock: 17, + }); + assert.deepEqual(completedData, eventData.slice(3)); + }); +}); diff --git a/packages/chain-events/test/integration/governorAlpha.spec.ts b/packages/chain-events/test/integration/governorAlpha.spec.ts new file mode 100644 index 00000000000..5448fab478e --- /dev/null +++ b/packages/chain-events/test/integration/governorAlpha.spec.ts @@ -0,0 +1,513 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +/* eslint-disable global-require */ +/* eslint-disable no-unused-expressions */ +import { EventEmitter } from 'events'; + +import { providers, Signer, BigNumberish } from 'ethers'; +import chai, { expect } from 'chai'; + +import { + MPond__factory as MPondFactory, + MPond, + GovernorAlphaMock__factory as GovernorAlphaFactory, + GovernorAlphaMock as GovernorAlpha, + TimelockMock__factory as TimelockFactory, + TimelockMock as Timelock, +} from '../../src/contractTypes'; +import { + Api, + IEventData, + EventKind, + IProposalCreated, + IProposalQueued, + IProposalExecuted, + IVoteCast, + ProposalState, +} from '../../src/chains/compound/types'; +import { subscribeEvents } from '../../src/chains/compound/subscribeFunc'; +import { IEventHandler, CWEvent, IChainEventData } from '../../src/interfaces'; + +const { assert } = chai; + +function getProvider(): providers.Web3Provider { + const web3Provider = require('ganache-cli').provider({ + allowUnlimitedContractSize: true, + gasLimit: 1000000000, + time: new Date(1000), + mnemonic: 'Alice', + // logger: console, + }); + return new providers.Web3Provider(web3Provider); +} + +async function deployMPond( + signer: Signer | providers.JsonRpcSigner, + account: string, + bridge: string +): Promise { + const factory = new MPondFactory(signer); + const comp = await factory.deploy(account, bridge); + return comp; +} + +async function deployGovernorAlpha( + signer: Signer | providers.JsonRpcSigner, + timelock: string, + comp: string, + guardian: string +): Promise { + const factory = new GovernorAlphaFactory(signer); + const governorAlpha = await factory.deploy(timelock, comp, guardian); + return governorAlpha; +} + +async function deployTimelock( + signer: Signer | providers.JsonRpcSigner, + admin: string, + delay: BigNumberish +): Promise { + const factory = new TimelockFactory(signer); + const timelock = await factory.deploy(admin, delay); + return timelock; +} + +class CompoundEventHandler extends IEventHandler { + constructor(public readonly emitter: EventEmitter) { + super(); + } + + public async handle(event: CWEvent): Promise { + this.emitter.emit(event.data.kind.toString(), event); + return null; + } +} + +function assertEvent( + handler: CompoundEventHandler, + event: EventKind, + cb: (evt: CWEvent) => void +) { + return new Promise((resolve, reject) => { + handler.emitter.on(event, (evt: CWEvent) => { + try { + cb(evt); + resolve(); + } catch (e) { + reject(e); + } + }); + }); +} +interface ISetupData { + api: Api; + comp: MPond; + timelock: Timelock; + governorAlpha: GovernorAlpha; + addresses: string[]; + provider: providers.Web3Provider; + handler: CompoundEventHandler; +} + +async function setupSubscription(subscribe = true): Promise { + const provider = getProvider(); + const addresses: string[] = await provider.listAccounts(); + const [member, bridge] = addresses; + const signer = provider.getSigner(member); + + // Deploy contracts. + const comp = await deployMPond(signer, member, bridge); + const timelock = await deployTimelock(signer, member, 2 * 60); // 2 minutes delay + const governorAlpha = await deployGovernorAlpha( + signer, + timelock.address, + comp.address, + member + ); + + // TODO: Adminship seems messed up, can't do queue() calls + // await governorAlpha.__executeSetTimelockPendingAdmin(member, 0); + // console.log('member: ', member); + // console.log('timelock admin address: ', await timelock.admin()); + // console.log('governorAlpha guardian:', await governorAlpha.guardian()); + const api = governorAlpha; + const emitter = new EventEmitter(); + const handler = new CompoundEventHandler(emitter); + if (subscribe) { + await subscribeEvents({ + chain: 'marlin-local', + api, + handlers: [handler], + // skipCatchup: true, + }); + } + return { api, comp, timelock, governorAlpha, addresses, provider, handler }; +} + +async function performDelegation( + handler: CompoundEventHandler, + comp: MPond, + from: string, + to: string, + amount: BigNumberish +): Promise { + await comp.delegate(to, amount); + /* + await Promise.all([ + assertEvent(handler, EventKind.DelegateChanged, (evt) => { + assert.deepEqual(evt.data, { + kind: EventKind.DelegateChanged, + delegator: from, + toDelegate: to, + fromDelegate: '0x0000000000000000000000000000000000000000', + }); + }), + assertEvent( + handler, + EventKind.DelegateVotesChanged, + (evt: CWEvent) => { + const { kind, delegate, previousBalance, newBalance } = evt.data; + assert.deepEqual( + { + kind, + delegate, + previousBalance: previousBalance.toString(), + newBalance: newBalance.toString(), + }, + { + kind: EventKind.DelegateVotesChanged, + delegate: to, + previousBalance: '0', + newBalance: amount.toString(), + } + ); + } + ), + ]); + */ +} + +async function createProposal( + handler: CompoundEventHandler, + gov: GovernorAlpha, + comp: MPond, + from: string +): Promise { + const proposalMinimum = await gov.proposalThreshold(); + const delegateAmount = proposalMinimum.mul(3); + await performDelegation(handler, comp, from, from, delegateAmount); + + const targets = ['0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b']; + const values = ['0']; + const signatures = ['_setCollateralFactor(address,uint256)']; + const calldatas = [ + '0x000000000000000000000000C11B1268C1A384E55C48C2391D8D480264A3A7F40000000000000000000000000000000000000000000000000853A0D2313C0000', + ]; + await gov.propose(targets, values, signatures, calldatas, 'test description'); + await assertEvent( + handler, + EventKind.ProposalCreated, + (evt: CWEvent) => { + const { kind, proposer } = evt.data; + assert.deepEqual( + { + kind, + proposer, + }, + { + kind: EventKind.ProposalCreated, + proposer: from, + } + ); + } + ); +} + +async function proposeAndVote( + handler: CompoundEventHandler, + provider: providers.Web3Provider, + gov: GovernorAlpha, + comp: MPond, + from: string, + voteYes: boolean +) { + await createProposal(handler, gov, comp, from); + + // Wait for proposal to activate + const activeProposals = await gov.latestProposalIds(from); + const { startBlock } = await gov.proposals(activeProposals); + const currentBlock = await provider.getBlockNumber(); + const blockDelta = startBlock.sub(currentBlock).add(1); + const timeDelta = blockDelta.mul(15); + await provider.send('evm_increaseTime', [+timeDelta]); + for (let i = 0; i < +blockDelta; ++i) { + await provider.send('evm_mine', []); + } + + const state = await gov.state(activeProposals); + expect(state).to.be.equal(ProposalState.Active); + + // VoteCast Event + const voteWeight = await comp.getPriorVotes(from, startBlock); + await gov.castVote(activeProposals, voteYes); + await assertEvent(handler, EventKind.VoteCast, (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.VoteCast, + id: activeProposals.toHexString(), + voter: from, + support: +voteYes, + votes: voteWeight.toString(), + reason: undefined, + }); + }); +} + +async function proposeAndWait( + handler: CompoundEventHandler, + provider: providers.Web3Provider, + gov: GovernorAlpha, + comp: MPond, + from: string, + voteYes: boolean +) { + await proposeAndVote(handler, provider, gov, comp, from, voteYes); + const activeProposals = await gov.latestProposalIds(from); + + const votingPeriodInBlocks = +(await gov.votingPeriod()); + await provider.send('evm_increaseTime', [votingPeriodInBlocks * 15]); + for (let i = 0; i < votingPeriodInBlocks; i++) { + await provider.send('evm_mine', []); + } + const state = await gov.state(activeProposals); + if (voteYes) { + expect(state).to.be.equal(ProposalState.Succeeded); + } else { + expect(state).to.be.equal(ProposalState.Defeated); // 3 is 'Defeated' + } +} + +async function proposeAndQueue( + handler: CompoundEventHandler, + provider: providers.Web3Provider, + gov: GovernorAlpha, + comp: MPond, + from: string +) { + await proposeAndWait(handler, provider, gov, comp, from, true); + + const activeProposals = await gov.latestProposalIds(from); + await gov.queue(activeProposals); + await Promise.all([ + assertEvent( + handler, + EventKind.ProposalQueued, + (evt: CWEvent) => { + const { kind, id } = evt.data; + assert.deepEqual( + { + kind, + id, + }, + { + kind: EventKind.ProposalQueued, + id: activeProposals.toHexString(), + } + ); + } + ), + ]); +} + +describe('Governor Alpha Integration Tests', () => { + describe('COMP contract function events', () => { + it('initial address should transfer tokens to an address', async () => { + const { comp, addresses } = await setupSubscription(); + // test volume + const initialBalance = await comp.balanceOf(addresses[0]); + expect(+initialBalance).to.not.be.equal(0); + const newUser = await comp.balanceOf(addresses[2]); + assert.isAtMost(+newUser, 0); + assert.isAtLeast(+initialBalance, 100000); + await comp.transfer(addresses[2], 100); + const newUserNewBalance = await comp.balanceOf(addresses[2]); + assert.isAtLeast(+newUserNewBalance, 100); + /* + await assertEvent( + handler, + EventKind.Transfer, + (evt: CWEvent) => { + const { kind, from, to, amount } = evt.data; + assert.deepEqual( + { + kind, + from, + to, + amount: amount.toString(), + }, + { + kind: EventKind.Transfer, + from: addresses[0], + to: addresses[2], + amount: newUserNewBalance.toString(), + } + ); + } + ); + */ + }); + + it('initial address should delegate to address 2', async () => { + const { comp, addresses, handler } = await setupSubscription(); + await performDelegation(handler, comp, addresses[0], addresses[2], 1000); + }); + + it('initial address should delegate to itself', async () => { + const { comp, addresses, handler } = await setupSubscription(); + await performDelegation(handler, comp, addresses[0], addresses[0], 1000); + }); + }); + + describe('GovernorAlpha contract function events', () => { + it('should create a proposal', async () => { + const { + governorAlpha, + comp, + addresses, + handler, + } = await setupSubscription(); + await createProposal(handler, governorAlpha, comp, addresses[0]); + }); + + it('proposal castvote', async () => { + const { + governorAlpha, + comp, + addresses, + handler, + provider, + } = await setupSubscription(); + await proposeAndVote( + handler, + provider, + governorAlpha, + comp, + addresses[0], + true + ); + }); + + it('should fail once not active', async () => { + const { + governorAlpha, + comp, + addresses, + handler, + provider, + } = await setupSubscription(); + await proposeAndWait( + handler, + provider, + governorAlpha, + comp, + addresses[0], + false + ); + }); + + it('should succeed once not active', async () => { + const { + governorAlpha, + comp, + addresses, + handler, + provider, + } = await setupSubscription(); + await proposeAndWait( + handler, + provider, + governorAlpha, + comp, + addresses[0], + true + ); + }); + + it('should be queued and executed', async () => { + const { + governorAlpha, + comp, + addresses, + handler, + provider, + } = await setupSubscription(); + await proposeAndQueue( + handler, + provider, + governorAlpha, + comp, + addresses[0] + ); + const activeProposals = await governorAlpha.latestProposalIds( + addresses[0] + ); + await governorAlpha.execute(activeProposals); + await Promise.all([ + assertEvent( + handler, + EventKind.ProposalExecuted, + (evt: CWEvent) => { + const { kind, id } = evt.data; + assert.deepEqual( + { + kind, + id, + }, + { + kind: EventKind.ProposalExecuted, + id: activeProposals.toHexString(), + } + ); + } + ), + ]); + }); + + it('should expire in queue', async () => { + const { + governorAlpha, + comp, + timelock, + addresses, + handler, + provider, + } = await setupSubscription(); + await proposeAndQueue( + handler, + provider, + governorAlpha, + comp, + addresses[0] + ); + + // advance beyond grace period so it expires despite successful votes + const activeProposals = await governorAlpha.latestProposalIds( + addresses[0] + ); + const gracePeriod = await timelock.GRACE_PERIOD(); + const proposal = await governorAlpha.proposals(activeProposals); + const expirationTime = +gracePeriod.add(proposal.eta); + const currentBlock = await provider.getBlockNumber(); + const { timestamp } = await provider.getBlock(currentBlock); + const timeUntilExpiration = expirationTime - timestamp; + const timeToAdvance = timeUntilExpiration + 15; + const blocksToAdvance = Math.ceil(timeToAdvance / 15); + await provider.send('evm_increaseTime', [timeToAdvance]); + for (let i = 0; i < blocksToAdvance; i++) { + await provider.send('evm_mine', []); + } + + // ensure state is set to expired + const state = await governorAlpha.state(activeProposals); + expect(state).to.be.equal(ProposalState.Expired); + }); + }); +}); diff --git a/packages/chain-events/test/integration/governorBravo.spec.ts b/packages/chain-events/test/integration/governorBravo.spec.ts new file mode 100644 index 00000000000..980dbf7bec1 --- /dev/null +++ b/packages/chain-events/test/integration/governorBravo.spec.ts @@ -0,0 +1,801 @@ +/* eslint-disable func-names */ +import '@nomiclabs/hardhat-ethers'; +import { EventEmitter } from 'events'; + +import chai, { expect } from 'chai'; +import { ethers } from 'hardhat'; +import { BigNumber } from 'ethers'; +import type { Signer, providers, BigNumberish } from 'ethers'; + +import { + GovernorBravoImmutable, + GovernorBravoImmutable__factory as GovernorBravoImmutableFactory, + MPond, + MPond__factory as MPondFactory, + TimelockMock as Timelock, + TimelockMock__factory as TimelockFactory, +} from '../../src/contractTypes'; +import { + Api, + BravoSupport, + EventKind, + IEventData, + IProposalCanceled, + IProposalCreated, + IProposalExecuted, + IProposalQueued, + IVoteCast, + ProposalState, +} from '../../src/chains/compound/types'; +import { + createApi, + StorageFetcher, + subscribeEvents, +} from '../../src/chains/compound'; +import { + CWEvent, + IChainEventData, + IEventHandler, + SupportedNetwork, +} from '../../src'; + +const { assert } = chai; + +async function deployMPond( + signer: Signer | providers.JsonRpcSigner, + account: string, + bridge: string +): Promise { + const factory = new MPondFactory(signer); + const comp = await factory.deploy(account, bridge); + return comp; +} + +async function deployTimelock( + signer: Signer | providers.JsonRpcSigner, + admin: string, + delay: BigNumberish +): Promise { + const factory = new TimelockFactory(signer); + return factory.deploy(admin, delay); +} + +class CompoundEventHandler extends IEventHandler { + constructor(public readonly emitter: EventEmitter) { + super(); + } + + public async handle(event: CWEvent): Promise { + this.emitter.emit(event.data.kind.toString(), event); + return null; + } +} + +function assertEvent( + handler: CompoundEventHandler, + event: EventKind, + cb: (evt: CWEvent) => void +) { + return new Promise((resolve, reject) => { + handler.emitter.on(event, (evt: CWEvent) => { + try { + cb(evt); + resolve(); + } catch (e) { + reject(e); + } + }); + }); +} + +interface ISetupData { + api: Api; + comp: MPond; + timelock: Timelock; + GovernorBravo: GovernorBravoImmutable; + addresses: string[]; + provider: providers.JsonRpcProvider; + handler: CompoundEventHandler; +} + +async function setupSubscription(): Promise { + // eslint-disable-next-line prefer-destructuring + const provider = ethers.provider; + const addresses: string[] = await provider.listAccounts(); + const [member, bridge] = addresses; + const signer = provider.getSigner(member); + + // deploy timelock + const timelock = await deployTimelock(signer, member, 2 * 60); // 2 minutes delay + + // deploy comp + const comp = await deployMPond(signer, member, bridge); + + // deploy delegate + const factory = new GovernorBravoImmutableFactory(signer); + const bravo = await factory.deploy( + timelock.address, + comp.address, + member, + 10, + 1, + 1 + ); + + // Call our custom function to set initial proposal id. + // This is necessary for our integration tests. + await bravo.setInitialProposalId(); + + // re-init governance contract once delpoyed to replicate typical init process + const api = await createApi(provider, bravo.address); + + const emitter = new EventEmitter(); + const handler = new CompoundEventHandler(emitter); + + await subscribeEvents({ + chain: 'marlin-local', + api, + handlers: [handler], + // skipCatchup: true, + }); + + return { + api, + comp, + timelock, + GovernorBravo: bravo, + addresses, + provider, + handler, + }; +} + +async function performDelegation( + comp: MPond, + from: string, + to: string, + amount: BigNumberish +): Promise { + await comp.delegate(to, amount, { from }); +} + +async function createProposal( + handler: CompoundEventHandler, + gov: GovernorBravoImmutable, + comp: MPond, + from: string +): Promise { + const proposalMinimum = await gov.proposalThreshold(); + const delegateAmount = proposalMinimum.mul(3); + await performDelegation(comp, from, from, delegateAmount); + + const targets = ['0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b']; + const values = [BigNumber.from(0)]; + const signatures = ['_setCollateralFactor(address,uint256)']; + const calldatas = [ + '0x000000000000000000000000C11B1268C1A384E55C48C2391D8D480264A3A7F40000000000000000000000000000000000000000000000000853A0D2313C0000', + ]; + const description = 'test description'; + + // Make the proposal. + await gov.propose(targets, values, signatures, calldatas, description, { + from, + }); + + await assertEvent( + handler, + EventKind.ProposalCreated, + (evt: CWEvent) => { + const { kind, proposer } = evt.data; + assert.deepEqual( + { + kind, + proposer, + }, + { + kind: EventKind.ProposalCreated, + proposer: from, + } + ); + } + ); +} + +// Helper function to artificially increase time according to proposal +async function increaseTime( + provider: providers.JsonRpcProvider, + gov: GovernorBravoImmutable, + from: string +) { + // Wait for proposal to activate (by mining blocks?) + const activeProposals = await gov.latestProposalIds(from); + const { startBlock } = await gov.proposals(activeProposals); + const currentBlock = await provider.getBlockNumber(); + const blockDelta = startBlock.sub(currentBlock).add(1); + const timeDelta = blockDelta.mul(15); + await provider.send('evm_increaseTime', [+timeDelta]); + for (let i = 0; i < +blockDelta; ++i) { + await provider.send('evm_mine', []); + } +} + +// Helper function that creates and then waits for a proposal to be active. +async function createActiveProposal( + handler: CompoundEventHandler, + governorBravo: GovernorBravoImmutable, + comp: MPond, + from: string, + provider: providers.JsonRpcProvider +) { + // Create proposal and wait for it to activate + await createProposal(handler, governorBravo, comp, from); + await increaseTime(provider, governorBravo, from); + + // Get the state of the proposal and make sure it is active + const activeProposals = await governorBravo.latestProposalIds(from); + const state = await governorBravo.state(activeProposals); + expect(state).to.be.equal(ProposalState.Active); + + return activeProposals; +} + +describe('Governor Bravo Event Integration Tests', () => { + describe('COMP contract function events', () => { + it('initial address should transfer tokens to an address', async () => { + const { comp, addresses } = await setupSubscription(); + // test volume + const initialBalance = await comp.balanceOf(addresses[0]); + expect(+initialBalance).to.not.be.equal(0); + const newUser = await comp.balanceOf(addresses[2]); + assert.isAtMost(+newUser, 0); + assert.isAtLeast(+initialBalance, 100000); + await comp.transfer(addresses[2], 100); + const newUserNewBalance = await comp.balanceOf(addresses[2]); + assert.isAtLeast(+newUserNewBalance, 100); + }); + + it('initial address should delegate to address 2', async () => { + const { comp, addresses } = await setupSubscription(); + await performDelegation(comp, addresses[0], addresses[2], 1000); + }); + + it('initial address should delegate to itself', async () => { + const { comp, addresses } = await setupSubscription(); + await performDelegation(comp, addresses[0], addresses[0], 1000); + }); + }); + + describe('GovernorBravo contract function events', () => { + it('should create a proposal', async () => { + const { + GovernorBravo, + comp, + addresses, + handler, + } = await setupSubscription(); + await createProposal(handler, GovernorBravo, comp, addresses[0]); + }); + + it('proposal castvote against with reason', async () => { + const { + GovernorBravo, + comp, + addresses, + handler, + provider, + } = await setupSubscription(); + + const from = addresses[0]; + + const activeProposals = await createActiveProposal( + handler, + GovernorBravo, + comp, + from, + provider + ); + + // VoteCast Event + await GovernorBravo.castVoteWithReason( + activeProposals, + BravoSupport.Against, + 'i dont like it' + ); + + const { startBlock } = await GovernorBravo.proposals(activeProposals); + const voteWeight = await comp.getPriorVotes(from, startBlock); + + await assertEvent( + handler, + EventKind.VoteCast, + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.VoteCast, + id: activeProposals.toHexString(), + voter: from, + support: BravoSupport.Against, + votes: voteWeight.toString(), + reason: 'i dont like it', + }); + } + ); + }); + + it('proposal castvote for', async () => { + const { + GovernorBravo, + comp, + addresses, + handler, + provider, + } = await setupSubscription(); + + const from = addresses[0]; + + const activeProposals = await createActiveProposal( + handler, + GovernorBravo, + comp, + from, + provider + ); + + // VoteCast Event + await GovernorBravo.castVote(activeProposals, BravoSupport.For); + + const { startBlock } = await GovernorBravo.proposals(activeProposals); + const voteWeight = await comp.getPriorVotes(from, startBlock); + + await assertEvent( + handler, + EventKind.VoteCast, + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.VoteCast, + id: activeProposals.toHexString(), + voter: from, + support: BravoSupport.For, + votes: voteWeight.toString(), + reason: '', + }); + } + ); + }); + + it('proposal cancel', async () => { + const { + GovernorBravo, + comp, + addresses, + handler, + provider, + } = await setupSubscription(); + + const from = addresses[0]; + + const activeProposals = await createActiveProposal( + handler, + GovernorBravo, + comp, + from, + provider + ); + + // Cancel Event + await GovernorBravo.cancel(activeProposals); + + await assertEvent( + handler, + EventKind.ProposalCanceled, + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.ProposalCanceled, + id: activeProposals.toHexString(), + }); + } + ); + }); + + it('proposal castvote abstain', async () => { + const { + GovernorBravo, + comp, + addresses, + handler, + provider, + } = await setupSubscription(); + + const from = addresses[0]; + + const activeProposals = await createActiveProposal( + handler, + GovernorBravo, + comp, + from, + provider + ); + + // VoteCast Event + await GovernorBravo.castVote(activeProposals, BravoSupport.Abstain); + + const { startBlock } = await GovernorBravo.proposals(activeProposals); + const voteWeight = await comp.getPriorVotes(from, startBlock); + + await assertEvent( + handler, + EventKind.VoteCast, + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.VoteCast, + id: activeProposals.toHexString(), + voter: from, + support: BravoSupport.Abstain, + votes: voteWeight.toString(), + reason: '', + }); + } + ); + }); + + it('proposal should succeed once voting period has expired', async () => { + const { + GovernorBravo, + comp, + addresses, + handler, + provider, + } = await setupSubscription(); + + const from = addresses[0]; + + let activeProposals = await createActiveProposal( + handler, + GovernorBravo, + comp, + from, + provider + ); + + // Cast vote for + await GovernorBravo.castVote(activeProposals, BravoSupport.For); + + // Increment time + const votingPeriodInBlocks = +(await GovernorBravo.votingPeriod()); + await provider.send('evm_increaseTime', [votingPeriodInBlocks * 15]); + for (let i = 0; i < votingPeriodInBlocks; i++) { + await provider.send('evm_mine', []); + } + + // We have voted yes, so proposal should succeed + activeProposals = await GovernorBravo.latestProposalIds(from); + const state = await GovernorBravo.state(activeProposals); + expect(state).to.be.equal(ProposalState.Succeeded); + }); + + it('proposal should be defeated once voting period has expired', async () => { + const { + GovernorBravo, + comp, + addresses, + handler, + provider, + } = await setupSubscription(); + + const from = addresses[0]; + + let activeProposals = await createActiveProposal( + handler, + GovernorBravo, + comp, + from, + provider + ); + + // Cast against vote + await GovernorBravo.castVote(activeProposals, BravoSupport.Against); + + // Increment time + const votingPeriodInBlocks = +(await GovernorBravo.votingPeriod()); + await provider.send('evm_increaseTime', [votingPeriodInBlocks * 15]); + for (let i = 0; i < votingPeriodInBlocks; i++) { + await provider.send('evm_mine', []); + } + + // We have voted no, so proposal should fail + activeProposals = await GovernorBravo.latestProposalIds(from); + const state = await GovernorBravo.state(activeProposals); + expect(state).to.be.equal(ProposalState.Defeated); + }); + + it('should be queued and executed', async function () { + this.timeout(0); + const { + GovernorBravo, + comp, + addresses, + handler, + provider, + } = await setupSubscription(); + + const from = addresses[0]; + + let activeProposals = await createActiveProposal( + handler, + GovernorBravo, + comp, + from, + provider + ); + + // VoteCast Event + const { startBlock } = await GovernorBravo.proposals(activeProposals); + const voteWeight = await comp.getPriorVotes(from, startBlock); + await GovernorBravo.castVote(activeProposals, BravoSupport.For); + await assertEvent( + handler, + EventKind.VoteCast, + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.VoteCast, + id: activeProposals.toHexString(), + voter: from, + support: BravoSupport.For, + votes: voteWeight.toString(), + reason: '', + }); + } + ); + + // Increase time until end of voting period + const votingPeriodInBlocks = +(await GovernorBravo.votingPeriod()); + await provider.send('evm_increaseTime', [votingPeriodInBlocks * 15]); + for (let i = 0; i < votingPeriodInBlocks; i++) { + await provider.send('evm_mine', []); + } + + activeProposals = await GovernorBravo.latestProposalIds(from); + const state = await GovernorBravo.state(activeProposals); + expect(state).to.be.equal(ProposalState.Succeeded); + + activeProposals = await GovernorBravo.latestProposalIds(from); + await GovernorBravo.queue(activeProposals); + await Promise.all([ + assertEvent( + handler, + EventKind.ProposalQueued, + (evt: CWEvent) => { + const { kind, id } = evt.data; + assert.deepEqual( + { + kind, + id, + }, + { + kind: EventKind.ProposalQueued, + id: activeProposals.toHexString(), + } + ); + } + ), + ]); + + await GovernorBravo.execute(activeProposals); + await Promise.all([ + assertEvent( + handler, + EventKind.ProposalExecuted, + (evt: CWEvent) => { + const { kind, id } = evt.data; + assert.deepEqual( + { + kind, + id, + }, + { + kind: EventKind.ProposalExecuted, + id: activeProposals.toHexString(), + } + ); + } + ), + ]); + }); + + it('should expire in queue', async function () { + this.timeout(0); + const { + GovernorBravo, + comp, + timelock, + addresses, + handler, + provider, + } = await setupSubscription(); + + const from = addresses[0]; + + let activeProposals = await createActiveProposal( + handler, + GovernorBravo, + comp, + from, + provider + ); + + // VoteCast Event + const { startBlock } = await GovernorBravo.proposals(activeProposals); + const voteWeight = await comp.getPriorVotes(from, startBlock); + await GovernorBravo.castVote(activeProposals, BravoSupport.For); + await assertEvent( + handler, + EventKind.VoteCast, + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.VoteCast, + id: activeProposals.toHexString(), + voter: from, + support: BravoSupport.For, + votes: voteWeight.toString(), + reason: '', + }); + } + ); + + // Increase time until end of voting period + const votingPeriodInBlocks = +(await GovernorBravo.votingPeriod()); + await provider.send('evm_increaseTime', [votingPeriodInBlocks * 15]); + for (let i = 0; i < votingPeriodInBlocks; i++) { + await provider.send('evm_mine', []); + } + + activeProposals = await GovernorBravo.latestProposalIds(from); + let state = await GovernorBravo.state(activeProposals); + expect(state).to.be.equal(ProposalState.Succeeded); + + activeProposals = await GovernorBravo.latestProposalIds(from); + await GovernorBravo.queue(activeProposals); + await Promise.all([ + assertEvent( + handler, + EventKind.ProposalQueued, + (evt: CWEvent) => { + const { kind, id } = evt.data; + assert.deepEqual( + { + kind, + id, + }, + { + kind: EventKind.ProposalQueued, + id: activeProposals.toHexString(), + } + ); + } + ), + ]); + + // advance beyond grace period so it expires despite successful votes + activeProposals = await GovernorBravo.latestProposalIds(addresses[0]); + const gracePeriod = await timelock.GRACE_PERIOD(); + const proposal = await GovernorBravo.proposals(activeProposals); + const expirationTime = +gracePeriod.add(proposal.eta); + const currentBlock = await provider.getBlockNumber(); + const { timestamp } = await provider.getBlock(currentBlock); + const timeUntilExpiration = expirationTime - timestamp; + const timeToAdvance = timeUntilExpiration + 15; + const blocksToAdvance = Math.ceil(timeToAdvance / 15); + await provider.send('evm_increaseTime', [timeToAdvance]); + for (let i = 0; i < blocksToAdvance; i++) { + await provider.send('evm_mine', []); + } + + // ensure state is set to expired + state = await GovernorBravo.state(activeProposals); + expect(state).to.be.equal(ProposalState.Expired); + }); + + it('should fetch proposals from storage', async function () { + this.timeout(0); + const { + GovernorBravo, + comp, + addresses, + handler, + provider, + api, + } = await setupSubscription(); + + const from = addresses[0]; + const beginBlock = await provider.getBlockNumber(); + + let activeProposals = await createActiveProposal( + handler, + GovernorBravo, + comp, + from, + provider + ); + + await GovernorBravo.castVote(activeProposals, BravoSupport.For); + + // Increase time until end of voting period + const votingPeriodInBlocks = +(await GovernorBravo.votingPeriod()); + await provider.send('evm_increaseTime', [votingPeriodInBlocks * 15]); + for (let i = 0; i < votingPeriodInBlocks; i++) { + await provider.send('evm_mine', []); + } + + activeProposals = await GovernorBravo.latestProposalIds(from); + const state = await GovernorBravo.state(activeProposals); + expect(state).to.be.equal(ProposalState.Succeeded); + + activeProposals = await GovernorBravo.latestProposalIds(from); + await GovernorBravo.queue(activeProposals); + const p = await GovernorBravo.proposals(activeProposals); + const eta = +p.eta; + await GovernorBravo.execute(activeProposals); + + // TODO: compute block numbers rather than manually + const eventData: CWEvent[] = [ + { + blockNumber: beginBlock + 2, + data: { + calldatas: [ + '0x000000000000000000000000c11b1268c1a384e55c48c2391d8d480264a3a7f40000000000000000000000000000000000000000000000000853a0d2313c0000', + ], + description: 'test description', + endBlock: beginBlock + 13, + id: '0x02', + kind: EventKind.ProposalCreated, + proposer: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', + signatures: ['_setCollateralFactor(address,uint256)'], + startBlock: beginBlock + 3, + targets: ['0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B'], + values: ['0'], + }, + excludeAddresses: ['0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'], + network: SupportedNetwork.Compound, + }, + { + blockNumber: beginBlock + 5, + data: { + id: '0x02', + kind: EventKind.VoteCast, + reason: '', + support: 1, + voter: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266', + votes: '3', + }, + excludeAddresses: ['0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'], + network: SupportedNetwork.Compound, + }, + { + blockNumber: beginBlock + 16, + data: { + id: '0x02', + kind: EventKind.ProposalQueued, + eta, + }, + excludeAddresses: [], + network: SupportedNetwork.Compound, + }, + { + blockNumber: beginBlock + 17, + data: { + id: '0x02', + kind: EventKind.ProposalExecuted, + }, + excludeAddresses: [], + network: SupportedNetwork.Compound, + }, + ]; + + // fetch all non-complete from storage (none) + const fetcher = new StorageFetcher(api); + + // fetch all from storage + const allData = await fetcher.fetch(); + assert.deepEqual(allData, eventData); + }); + }); +}); diff --git a/packages/chain-events/test/integration/moloch.spec.ts b/packages/chain-events/test/integration/moloch.spec.ts new file mode 100644 index 00000000000..38696b1d19e --- /dev/null +++ b/packages/chain-events/test/integration/moloch.spec.ts @@ -0,0 +1,522 @@ +/* eslint-disable @typescript-eslint/no-var-requires */ +/* eslint-disable global-require */ +import { EventEmitter } from 'events'; + +import { providers } from 'ethers'; +import chai from 'chai'; + +import { + Moloch1__factory as Moloch1Factory, + Moloch1, + Token__factory as TokenFactory, + Token, +} from '../../src/contractTypes'; +import { + Api, + IEventData, + EventKind, + ISubmitProposal, + IProcessProposal, + IAbort, +} from '../../src/chains/moloch/types'; +import { subscribeEvents } from '../../src/chains/moloch/subscribeFunc'; +import { + IEventHandler, + CWEvent, + IDisconnectedRange, + IChainEventData, +} from '../../src/interfaces'; + +const { assert } = chai; + +function getProvider(): providers.Web3Provider { + const web3Provider = require('ganache-cli').provider({ + allowUnlimitedContractSize: true, + gasLimit: 1000000000, + time: new Date(1000), + // logger: console, + }); + return new providers.Web3Provider(web3Provider); +} + +async function deployToken(signer): Promise { + const factory = new TokenFactory(signer); + const token = await factory.deploy(100); + return token; +} + +async function deployMoloch1(signer, summoner, tokenAddress): Promise { + const factory = new Moloch1Factory(signer); + const moloch1 = await factory.deploy( + summoner, + tokenAddress, + 2, // _periodDuration: 2 second + 2, // _votingPeriodLength: 4 seconds + 2, // _gracePeriodLength: 4 seconds + 2, // _abortWindow: 2 seconds + 5, // _proposalDeposit + 100, // _diluationBound + 5 // _processingReward + ); + return moloch1; +} + +class MolochEventHandler extends IEventHandler { + constructor(public readonly emitter: EventEmitter) { + super(); + } + + public async handle(event: CWEvent): Promise { + this.emitter.emit(event.data.kind.toString(), event); + this.emitter.emit('*', event); + return null; + } +} + +interface ISetupData { + api: Api; + token: Token; + addresses: string[]; + provider: providers.Web3Provider; + handler: MolochEventHandler; +} + +async function setupSubscription(subscribe = true): Promise { + const provider = getProvider(); + const addresses: string[] = await provider.listAccounts(); + const [member] = addresses; + const signer = provider.getSigner(member); + const token = await deployToken(signer); + const api: Api = await deployMoloch1(signer, member, token.address); + const emitter = new EventEmitter(); + const handler = new MolochEventHandler(emitter); + if (subscribe) { + await subscribeEvents({ + chain: 'test', + api, + contractVersion: 1, + handlers: [handler], + skipCatchup: true, + }); + } + return { api, token, addresses, provider, handler }; +} + +async function submitProposal( + provider: providers.Web3Provider, + api: Api, + token: Token, + member: string, + applicant: string, + mineBlocks = false +): Promise { + if (mineBlocks) provider.send('evm_increaseTime', [2]); + await token.transfer(applicant, 10); + if (mineBlocks) provider.send('evm_increaseTime', [2]); + await token.approve(api.address, 5); + + const appSigner = provider.getSigner(applicant); + const appToken = TokenFactory.connect(token.address, appSigner); + if (mineBlocks) provider.send('evm_increaseTime', [2]); + await appToken.deployed(); + if (mineBlocks) provider.send('evm_increaseTime', [2]); + await appToken.approve(api.address, 5); + + const summonerBalance = await token.balanceOf(member); + const applicantBalance = await token.balanceOf(applicant); + const summonerAllowance = await token.allowance(member, api.address); + const applicantAllowance = await token.allowance(applicant, api.address); + assert.isAtLeast(+summonerBalance, 5); + assert.isAtLeast(+applicantBalance, 5); + assert.isAtLeast(+summonerAllowance, 5); + assert.isAtLeast(+applicantAllowance, 5); + + if (mineBlocks) provider.send('evm_increaseTime', [2]); + await (api as Moloch1).submitProposal(applicant, 5, 5, 'hello'); +} + +describe('Moloch Event Integration Tests', () => { + it('should summon moloch1', async () => { + const { addresses, handler } = await setupSubscription(); + await new Promise((resolve) => { + handler.emitter.on( + EventKind.SummonComplete.toString(), + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.SummonComplete, + summoner: addresses[0], + shares: '1', + }); + resolve(); + } + ); + }); + }); + + it('should create moloch1 proposal', async () => { + const { + addresses, + handler, + api, + token, + provider, + } = await setupSubscription(); + const [member, applicant] = addresses; + const summonTime = await api.summoningTime(); + await submitProposal(provider, api, token, member, applicant); + await new Promise((resolve) => { + handler.emitter.on( + EventKind.SubmitProposal.toString(), + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.SubmitProposal, + proposalIndex: 0, + member, + delegateKey: member, + applicant, + tokenTribute: '5', + sharesRequested: '5', + details: 'hello', + startTime: +summonTime + 2, + }); + resolve(); + } + ); + }); + }); + + it('should create moloch1 vote', async () => { + const { + addresses, + handler, + api, + token, + provider, + } = await setupSubscription(); + const [member, applicant] = addresses; + await submitProposal(provider, api, token, member, applicant); + + // wait 2 seconds to enter voting period + provider.send('evm_increaseTime', [2]); + await api.submitVote(0, 2); + await new Promise((resolve) => { + handler.emitter.on( + EventKind.SubmitVote.toString(), + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.SubmitVote, + proposalIndex: 0, + member, + delegateKey: member, + vote: 2, + shares: '1', + highestIndexYesVote: 0, + }); + resolve(); + } + ); + }); + }); + + it('should process moloch1 proposal', async () => { + const { + addresses, + handler, + api, + token, + provider, + } = await setupSubscription(); + const [member, applicant] = addresses; + await submitProposal(provider, api, token, member, applicant); + + // wait 2 seconds to enter voting period + provider.send('evm_increaseTime', [2]); + await api.submitVote(0, 1); + + // wait another 10 seconds to finish voting/grace periods + provider.send('evm_increaseTime', [10]); + + const proposalPreprocess = await (api as Moloch1).proposalQueue(0); + assert.equal(proposalPreprocess.processed, false); + assert.equal(proposalPreprocess.didPass, false); + + await api.processProposal(0); + await new Promise((resolve) => { + handler.emitter.on( + EventKind.ProcessProposal.toString(), + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.ProcessProposal, + proposalIndex: 0, + member, + applicant, + tokenTribute: '5', + sharesRequested: '5', + didPass: true, + yesVotes: '1', + noVotes: '0', + }); + resolve(); + } + ); + }); + + // verify contract storage + const proposal = await (api as Moloch1).proposalQueue(0); + assert.equal(proposal.processed, true); + assert.equal(proposal.didPass, true); + assert.equal(+proposal.yesVotes, 1); + assert.equal(+proposal.noVotes, 0); + + const applicantMember = await api.members(applicant); + assert.equal(applicantMember.exists, true); + assert.equal(+applicantMember.shares, 5); + assert.equal(+applicantMember.highestIndexYesVote, 0); + assert.equal(applicantMember.delegateKey, applicant); + }); + + it('should abort moloch1 proposal', async () => { + const { + addresses, + handler, + api, + token, + provider, + } = await setupSubscription(); + const [member, applicant] = addresses; + await submitProposal(provider, api, token, member, applicant); + + // wait 2 seconds to enter abort window + provider.send('evm_increaseTime', [2]); + + // get applicant provider to abort with + const appSigner = provider.getSigner(applicant); + const appMoloch = Moloch1Factory.connect(api.address, appSigner); + await appMoloch.deployed(); + await appMoloch.abort(0); + + await new Promise((resolve) => { + handler.emitter.on( + EventKind.Abort.toString(), + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.Abort, + proposalIndex: 0, + applicant, + }); + resolve(); + } + ); + }); + + // verify contract storage + const proposal = await (api as Moloch1).proposalQueue(0); + assert.equal(proposal.aborted, true); + }); + + it('should ragequit moloch1 member', async () => { + const { + addresses, + handler, + api, + token, + provider, + } = await setupSubscription(); + const [member, applicant] = addresses; + await submitProposal(provider, api, token, member, applicant); + + // wait 2 seconds to enter voting period + provider.send('evm_increaseTime', [2]); + await api.submitVote(0, 1); + + // wait another 10 seconds to finish voting/grace periods + provider.send('evm_increaseTime', [10]); + await api.processProposal(0); + + // now that member is processed, have them ragequit + const appSigner = provider.getSigner(applicant); + const appMoloch = Moloch1Factory.connect(api.address, appSigner); + await appMoloch.deployed(); + await appMoloch.ragequit(5); + await new Promise((resolve) => { + handler.emitter.on( + EventKind.Ragequit.toString(), + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.Ragequit, + member: applicant, + sharesToBurn: '5', + }); + resolve(); + } + ); + }); + + const applicantMemberData = await api.members(applicant); + assert.equal(applicantMemberData.exists, true); + assert.equal(+applicantMemberData.shares, 0); + }); + + it('should update moloch1 delegate key', async () => { + const { addresses, handler, api } = await setupSubscription(); + const [member, newDelegateKey] = addresses; + + await api.updateDelegateKey(addresses[1]); + await new Promise((resolve) => { + handler.emitter.on( + EventKind.UpdateDelegateKey.toString(), + (evt: CWEvent) => { + assert.deepEqual(evt.data, { + kind: EventKind.UpdateDelegateKey, + member, + newDelegateKey, + }); + resolve(); + } + ); + }); + }); + + it('should migrate past proposal started/processed/aborted events', async () => { + const { + addresses, + handler, + api, + token, + provider, + } = await setupSubscription(); + const [member, applicant1, applicant2] = addresses; + const summonTime = +(await api.summoningTime()); + const periodDuration = +(await api.periodDuration()); + + // proposal 0: processed + await submitProposal(provider, api, token, member, applicant1, true); + provider.send('evm_increaseTime', [2]); + await api.submitVote(0, 1); + provider.send('evm_increaseTime', [10]); + await api.processProposal(0); + + // proposal 1: aborted + await submitProposal(provider, api, token, member, applicant2, true); + provider.send('evm_increaseTime', [2]); + const app2Signer = provider.getSigner(applicant2); + const app2Moloch = Moloch1Factory.connect(api.address, app2Signer); + await app2Moloch.deployed(); + await app2Moloch.abort(1); + + // proposal 2: started by prior applicant, voted on, not completed + provider.send('evm_increaseTime', [2]); + await token.transfer(applicant1, 20); // from summoner: you're gonna need it! + const app1Signer = provider.getSigner(applicant1); + const app1Token = TokenFactory.connect(token.address, app1Signer); + await app1Token.deployed(); + const app1Moloch = Moloch1Factory.connect(api.address, app1Signer); + await app1Moloch.deployed(); + await submitProposal( + provider, + app1Moloch, + app1Token, + applicant1, + applicant2, + true + ); + provider.send('evm_increaseTime', [2]); + await app1Moloch.submitVote(2, 2); + provider.send('evm_increaseTime', [1]); + await api.submitVote(2, 1); + provider.send('evm_increaseTime', [3]); + + // perform migration + const events: CWEvent[] = []; + handler.emitter.on('*', (evt: CWEvent) => events.push(evt)); + const discoverReconnectRange = async (): Promise => ({ + startBlock: 0, + }); + const subscription = await subscribeEvents({ + chain: 'test', + api, + contractVersion: 1, + handlers: [handler], + skipCatchup: false, + discoverReconnectRange, + }); + subscription.unsubscribe(); + + // validate events + const proposalStartTimes = [ + (await (api as Moloch1).proposalQueue(0)).startingPeriod, + (await (api as Moloch1).proposalQueue(1)).startingPeriod, + (await (api as Moloch1).proposalQueue(2)).startingPeriod, + ].map((period) => +period * periodDuration + summonTime); + assert.sameDeepMembers( + events + .map((e) => e.data) + .filter( + (e) => (e as ISubmitProposal | IProcessProposal).proposalIndex === 0 + ), + [ + { + kind: EventKind.SubmitProposal, + proposalIndex: 0, + member, + applicant: applicant1, + tokenTribute: '5', + sharesRequested: '5', + details: 'hello', + startTime: proposalStartTimes[0], + }, + { + kind: EventKind.ProcessProposal, + proposalIndex: 0, + member, + applicant: applicant1, + tokenTribute: '5', + sharesRequested: '5', + didPass: true, + yesVotes: '1', + noVotes: '0', + }, + ] + ); + + assert.sameDeepMembers( + events + .map((e) => e.data) + .filter((e) => (e as ISubmitProposal | IAbort).proposalIndex === 1), + [ + { + kind: EventKind.SubmitProposal, + proposalIndex: 1, + member, + applicant: applicant2, + tokenTribute: '0', + sharesRequested: '5', + details: 'hello', + startTime: proposalStartTimes[1], + }, + { + kind: EventKind.Abort, + proposalIndex: 1, + applicant: applicant2, + }, + ] + ); + assert.sameDeepMembers( + events + .map((e) => e.data) + .filter((e) => (e as ISubmitProposal).proposalIndex === 2), + [ + { + kind: EventKind.SubmitProposal, + proposalIndex: 2, + member: applicant1, + applicant: applicant2, + tokenTribute: '5', + sharesRequested: '5', + details: 'hello', + startTime: proposalStartTimes[2], + }, + ] + ); + }); +}); diff --git a/packages/chain-events/test/integration/ozGovernor.spec.ts b/packages/chain-events/test/integration/ozGovernor.spec.ts new file mode 100644 index 00000000000..5162585492b --- /dev/null +++ b/packages/chain-events/test/integration/ozGovernor.spec.ts @@ -0,0 +1,504 @@ +/* eslint-disable func-names */ +import '@nomiclabs/hardhat-ethers'; +import { EventEmitter } from 'events'; + +import chai, { expect } from 'chai'; +import { ethers } from 'hardhat'; +import { BigNumber, BigNumberish, utils } from 'ethers'; +import type { Signer, providers } from 'ethers'; + +import { + GovernorMock, + GovernorMock__factory as GovernorMockFactory, + ERC20VotesMock, + ERC20VotesMock__factory as ERC20VotesMockFactory, + TimelockController, + TimelockController__factory as TimelockControllerFactory, +} from '../../src/contractTypes'; +import { + BravoSupport, + EventKind, + IEventData, + IProposalCanceled, + IProposalCreated, + IProposalExecuted, + IProposalQueued, + IVoteCast, + ProposalState, +} from '../../src/chains/compound/types'; +import { subscribeEvents } from '../../src/chains/compound'; +import { CWEvent, IChainEventData, IEventHandler } from '../../src'; + +const { assert } = chai; + +async function deployErc20VotesMock( + signer: Signer | providers.JsonRpcSigner, + account: string, + amount: number +): Promise { + const factory = new ERC20VotesMockFactory(signer); + const t = await factory.deploy('Test Token', 'TEST'); + await t.mint(account, amount); + return t; +} + +async function deployTimelock( + signer: Signer | providers.JsonRpcSigner, + minDelay: BigNumberish, + proposers: string[], + executors: string[] +): Promise { + const factory = new TimelockControllerFactory(signer); + return factory.deploy(minDelay, proposers, executors); +} + +class CompoundEventHandler extends IEventHandler { + constructor(public readonly emitter: EventEmitter) { + super(); + } + + public async handle(event: CWEvent): Promise { + this.emitter.emit(event.data.kind.toString(), event); + return null; + } +} + +function assertEvent( + handler: CompoundEventHandler, + event: EventKind +): Promise> { + return new Promise>((resolve) => { + handler.emitter.on(event, (evt: CWEvent) => resolve(evt)); + }); +} + +interface ISetupData { + api: GovernorMock; + token: ERC20VotesMock; + addresses: string[]; + provider: providers.JsonRpcProvider; + handler: CompoundEventHandler; +} + +async function setupSubscription(): Promise { + // eslint-disable-next-line prefer-destructuring + const provider = ethers.provider; + const addresses: string[] = await provider.listAccounts(); + const [member] = addresses; + const signer = provider.getSigner(member); + + // deploy voting token and mint 100 tokens + const token = await deployErc20VotesMock(signer, member, 100); + + // deploy timelock + const timelock = await deployTimelock(signer, 2 * 60, [member], [member]); // 2 min minutes delay + + // deploy governor + const factory = new GovernorMockFactory(signer); + const governor = await factory.deploy( + 'Test Governor', + token.address, + 2, // 2 blocks delay until vote starts + 16, // vote goes for 16 blocks + timelock.address, + 5, // 5% of token supply must vote to pass = 5 tokens, + 0 // 0 votes required for a voter to become a proposer + ); + + // ensure governor can make calls on timelock by granting roles + const PROPOSER_ROLE = await timelock.PROPOSER_ROLE(); + const EXECUTOR_ROLE = await timelock.EXECUTOR_ROLE(); + await timelock.grantRole(PROPOSER_ROLE, governor.address); + await timelock.grantRole(EXECUTOR_ROLE, governor.address); + + const handler = new CompoundEventHandler(new EventEmitter()); + + await subscribeEvents({ + chain: 'marlin-local', + api: governor as any, + handlers: [handler], + // skipCatchup: true, + }); + + return { + api: governor, + token, + addresses, + provider, + handler, + }; +} + +async function performDelegation( + comp: ERC20VotesMock, + from: string, + to: string +): Promise { + await comp.delegate(to, { from }); +} + +async function createProposal( + handler: CompoundEventHandler, + gov: GovernorMock, + comp: ERC20VotesMock, + from: string +): Promise> { + await performDelegation(comp, from, from); + + const targets = ['0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b']; + const values = [BigNumber.from(0)]; + const calldatas = ['0x853A0D2313C000']; + const description = 'test description'; + + // Make the proposal. + await gov.propose(targets, values, calldatas, description, { + from, + }); + + const evt: CWEvent = await assertEvent( + handler, + EventKind.ProposalCreated + ); + const { kind, proposer } = evt.data; + assert.deepEqual( + { + kind, + proposer, + }, + { + kind: EventKind.ProposalCreated, + proposer: from, + } + ); + return evt; +} + +// Helper function to artificially increase time according to proposal +async function increaseTime( + provider: providers.JsonRpcProvider, + nBlocks: number +) { + const timeDelta = nBlocks * 15; + await provider.send('evm_increaseTime', [+timeDelta]); + for (let i = 0; i < nBlocks; ++i) { + await provider.send('evm_mine', []); + } +} + +// Helper function that creates and then waits for a proposal to be active. +async function createActiveProposal( + handler: CompoundEventHandler, + api: GovernorMock, + token: ERC20VotesMock, + from: string, + provider: providers.JsonRpcProvider +): Promise> { + // Create proposal and wait for it to activate + const p = await createProposal(handler, api, token, from); + await increaseTime(provider, 3); + + // Get the state of the proposal and make sure it is active + const state = await api.state(p.data.id); + expect(state).to.be.equal(ProposalState.Active); + + return p; +} + +describe('OpenZeppelin Governance Event Integration Tests', () => { + describe('OpenZeppelin Governance contract function events', () => { + it('should create a proposal', async () => { + const { api, token, addresses, handler } = await setupSubscription(); + const p = await createProposal(handler, api, token, addresses[0]); + const idHex = BigNumber.from(p.data.id).toHexString(); + + // ensure hash comes out okay + const descriptionHash = utils.keccak256( + utils.toUtf8Bytes(p.data.description) + ); + const coder = new utils.AbiCoder(); + const data = coder.encode( + ['address[]', 'uint256[]', 'bytes[]', 'bytes32'], + [p.data.targets, p.data.values, p.data.calldatas, descriptionHash] + ); + const hashedData = utils.keccak256(data); + const hashedProposal = ( + await api.hashProposal( + p.data.targets, + p.data.values, + p.data.calldatas, + descriptionHash + ) + ).toHexString(); + + // compare contract-computed results with stored id + assert.deepEqual(hashedProposal.toLowerCase(), idHex.toLowerCase()); + + // compare stored id with locally computed results + assert.deepEqual(idHex.toLowerCase(), hashedData.toLowerCase()); + }); + + it('proposal castvote against with reason', async () => { + const { + api, + token, + addresses, + handler, + provider, + } = await setupSubscription(); + const from = addresses[0]; + const p = await createActiveProposal(handler, api, token, from, provider); + + // VoteCast Event + await api.castVoteWithReason( + p.data.id, + BravoSupport.Against, + 'i dont like it' + ); + + const evt: CWEvent = await assertEvent( + handler, + EventKind.VoteCast + ); + + const voteWeight = await api.getVotes(from, p.data.startBlock); + assert.deepEqual(evt.data, { + kind: EventKind.VoteCast, + id: p.data.id, + voter: from, + support: BravoSupport.Against, + votes: voteWeight.toString(), + reason: 'i dont like it', + }); + }); + + it('proposal castvote for', async () => { + const { + api, + token, + addresses, + handler, + provider, + } = await setupSubscription(); + const from = addresses[0]; + const p = await createActiveProposal(handler, api, token, from, provider); + + // VoteCast Event + await api.castVote(p.data.id, BravoSupport.For, { from }); + + const evt: CWEvent = await assertEvent( + handler, + EventKind.VoteCast + ); + + const voteWeight = await api.getVotes(from, p.data.startBlock); + assert.deepEqual(evt.data, { + kind: EventKind.VoteCast, + id: p.data.id, + voter: from, + support: BravoSupport.For, + votes: voteWeight.toString(), + reason: '', + }); + }); + + it('proposal cancel', async () => { + const { + api, + token, + addresses, + handler, + provider, + } = await setupSubscription(); + const from = addresses[0]; + const p = await createActiveProposal(handler, api, token, from, provider); + + // Cancel Event + const descriptionHash = utils.keccak256( + utils.toUtf8Bytes(p.data.description) + ); + await api.cancel( + p.data.targets, + p.data.values, + p.data.calldatas, + descriptionHash + ); + + const evt: CWEvent = await assertEvent( + handler, + EventKind.ProposalCanceled + ); + assert.deepEqual(evt.data, { + kind: EventKind.ProposalCanceled, + id: p.data.id, + }); + }); + + it('proposal castvote abstain', async () => { + const { + api, + token, + addresses, + handler, + provider, + } = await setupSubscription(); + const from = addresses[0]; + const p = await createActiveProposal(handler, api, token, from, provider); + + // VoteCast Event + await api.castVote(p.data.id, BravoSupport.Abstain); + + const evt: CWEvent = await assertEvent( + handler, + EventKind.VoteCast + ); + + const voteWeight = await api.getVotes(from, p.data.startBlock); + assert.deepEqual(evt.data, { + kind: EventKind.VoteCast, + id: p.data.id, + voter: from, + support: BravoSupport.Abstain, + votes: voteWeight.toString(), + reason: '', + }); + }); + + it('proposal should succeed once voting period has expired', async () => { + const { + api, + token, + addresses, + handler, + provider, + } = await setupSubscription(); + const from = addresses[0]; + const p = await createActiveProposal(handler, api, token, from, provider); + + // VoteCast Event + await api.castVote(p.data.id, BravoSupport.For, { from }); + + // Increment time + const votingPeriodInBlocks = +(await api.votingPeriod()); + await provider.send('evm_increaseTime', [votingPeriodInBlocks * 15]); + for (let i = 0; i < votingPeriodInBlocks; i++) { + await provider.send('evm_mine', []); + } + + // We have voted yes, so proposal should succeed + const state = await api.state(p.data.id); + expect(state).to.be.equal(ProposalState.Succeeded); + }); + + it('proposal should be defeated once voting period has expired', async () => { + const { + api, + token, + addresses, + handler, + provider, + } = await setupSubscription(); + const from = addresses[0]; + const p = await createActiveProposal(handler, api, token, from, provider); + + // VoteCast Event + await api.castVote(p.data.id, BravoSupport.Against, { from }); + + // Increment time + const votingPeriodInBlocks = +(await api.votingPeriod()); + await provider.send('evm_increaseTime', [votingPeriodInBlocks * 15]); + for (let i = 0; i < votingPeriodInBlocks; i++) { + await provider.send('evm_mine', []); + } + + // We have voted yes, so proposal should succeed + const state = await api.state(p.data.id); + expect(state).to.be.equal(ProposalState.Defeated); + }); + + it('should be queued and executed', async function () { + const { + api, + token, + addresses, + handler, + provider, + } = await setupSubscription(); + const from = addresses[0]; + const p = await createActiveProposal(handler, api, token, from, provider); + + // VoteCast Event + await api.castVote(p.data.id, BravoSupport.For, { from }); + + // Increment time + const votingPeriodInBlocks = +(await api.votingPeriod()); + await provider.send('evm_increaseTime', [votingPeriodInBlocks * 15]); + for (let i = 0; i < votingPeriodInBlocks; i++) { + await provider.send('evm_mine', []); + } + + // We have voted yes, so proposal should succeed + let state = await api.state(p.data.id); + expect(state).to.be.equal(ProposalState.Succeeded); + + // queue the proposal + const descriptionHash = utils.keccak256( + utils.toUtf8Bytes(p.data.description) + ); + await api.queue( + p.data.targets, + p.data.values, + p.data.calldatas, + descriptionHash + ); + const qEvt: CWEvent = await assertEvent( + handler, + EventKind.ProposalQueued + ); + assert.deepEqual( + { + kind: qEvt.data.kind, + id: qEvt.data.id, + }, + { + kind: EventKind.ProposalQueued, + id: p.data.id, + } + ); + + state = await api.state(p.data.id); + expect(state).to.be.equal(ProposalState.Queued); + + // wait 2min + const timeToAdvance = 120; + await provider.send('evm_increaseTime', [timeToAdvance]); + for (let i = 0; i < Math.ceil(timeToAdvance / 15); i++) { + await provider.send('evm_mine', []); + } + + // perform execute + await api.execute( + p.data.targets, + p.data.values, + p.data.calldatas, + descriptionHash + ); + + const evt: CWEvent = await assertEvent( + handler, + EventKind.ProposalExecuted + ); + + const { kind, id } = evt.data; + assert.deepEqual( + { + kind, + id, + }, + { + kind: EventKind.ProposalExecuted, + id: p.data.id, + } + ); + }); + }); +}); diff --git a/packages/chain-events/test/unit/aave/enricher.spec.ts b/packages/chain-events/test/unit/aave/enricher.spec.ts new file mode 100644 index 00000000000..9698cdea832 --- /dev/null +++ b/packages/chain-events/test/unit/aave/enricher.spec.ts @@ -0,0 +1,275 @@ +import chai from 'chai'; +import { utils } from 'ethers'; + +import { + EventKind, + RawEvent, + Api, + DelegationType, +} from '../../../src/chains/aave/types'; +import { SupportedNetwork } from '../../../src'; +import { Enrich } from '../../../src/chains/aave/filters/enricher'; + +const { assert } = chai; + +const constructEvent = (data, address?: string): RawEvent => { + return { + args: data, + address, + } as RawEvent; +}; + +const blockNumber = 10000; +const api: Api = ({} as unknown) as Api; + +describe('Aave Event Enricher Filter Tests', () => { + // ProposalCreated + it('should enrich ProposalCreated event', async () => { + const kind = EventKind.ProposalCreated; + const targets = ['0x3d9819210A31b4961b30EF54bE2aeD79B9c9Cd3B']; + const values = ['0']; + const signatures = ['_setCollateralFactor(address,uint256)']; + const calldatas = [ + '0x000000000000000000000000c11b1268c1a384e55c48c2391d8d480264a3a7f40000000000000000000000000000000000000000000000000853a0d2313c0000', + ]; + const ipfsHash = utils.formatBytes32String('0x123abc'); + const event = constructEvent({ + id: 1, + creator: 'sender', + executor: 'executor', + targets, + 4: values, + signatures, + calldatas, + startBlock: blockNumber, + endBlock: blockNumber + 172, + strategy: 'strategy', + ipfsHash, + }); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['sender'], + network: SupportedNetwork.Aave, + data: { + kind, + id: 1, + proposer: 'sender', + executor: 'executor', + targets, + values, + signatures, + calldatas, + startBlock: blockNumber, + endBlock: blockNumber + 172, + strategy: 'strategy', + ipfsHash, + }, + }); + }); + + // ProposalCanceled + it('should enrich ProposalCanceled event', async () => { + const kind = EventKind.ProposalCanceled; + const event = constructEvent({ + id: 1, + }); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Aave, + data: { + kind, + id: 1, + }, + }); + }); + + // ProposalExecuted + it('should enrich ProposalExecuted event', async () => { + const kind = EventKind.ProposalExecuted; + const event = constructEvent({ + id: 1, + }); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Aave, + data: { + kind, + id: 1, + }, + }); + }); + + // ProposalQueued + it('should enrich ProposalQueued event', async () => { + const kind = EventKind.ProposalQueued; + const executionTime = 123; + const event = constructEvent({ + id: 1, + executionTime, + }); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Aave, + data: { + kind, + id: 1, + executionTime, + }, + }); + }); + + // VoteEmitted + it('should enrich VoteEmitted event', async () => { + const kind = EventKind.VoteEmitted; + const voter = 'i voted!'; + const id = 123; + const support = false; + const votingPower = '525600'; + const event = constructEvent({ + id, + voter, + support, + votingPower, + }); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [voter], + network: SupportedNetwork.Aave, + data: { + kind, + id, + voter, + support, + votingPower, + }, + }); + }); + + // DelegateChanged + it('should enrich DelegateChanged event', async () => { + const kind = EventKind.DelegateChanged; + const delegator = 'me'; + const delegatee = 'them'; + const type = DelegationType.VOTING_POWER; + const tokenAddress = 'tokenaddress'; + const event = constructEvent( + { + delegator, + delegatee, + delegationType: type, + }, + tokenAddress + ); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [delegator], + network: SupportedNetwork.Aave, + data: { + kind, + tokenAddress, + delegator, + delegatee, + type, + }, + }); + }); + + // DelegatedPowerChanged + it('should enrich DelegatedPowerChanged event', async () => { + const kind = EventKind.DelegatedPowerChanged; + const who = 'me'; + const amount = '123'; + const type = DelegationType.VOTING_POWER; + const tokenAddress = 'tokenaddress'; + const event = constructEvent( + { + user: who, + amount, + delegationType: type, + }, + tokenAddress + ); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [who], + network: SupportedNetwork.Aave, + data: { + kind, + tokenAddress, + who, + amount, + type, + }, + }); + }); + + // Transfer + it('should enrich Transfer event', async () => { + const kind = EventKind.Transfer; + const from = 'me'; + const to = 'them'; + const amount = '234'; + const tokenAddress = 'tokenaddress'; + const event = constructEvent( + { + from, + to, + value: amount, + }, + tokenAddress + ); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [from], + network: SupportedNetwork.Aave, + data: { + kind, + tokenAddress, + from, + to, + amount, + }, + }); + }); + + // Approval + it('should enrich approval event', async () => { + const kind = EventKind.Approval; + const owner = 'fromAddress'; + const spender = 'toAddress'; + const amount = '123'; + const tokenAddress = 'tokenaddress'; + const event = constructEvent( + { + owner, + spender, + value: amount, + }, + tokenAddress + ); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [owner], + network: SupportedNetwork.Aave, + data: { + kind, + tokenAddress, + owner, + spender, + amount, + }, + }); + }); +}); diff --git a/packages/chain-events/test/unit/aave/listener.spec.ts b/packages/chain-events/test/unit/aave/listener.spec.ts new file mode 100644 index 00000000000..dbd356ec010 --- /dev/null +++ b/packages/chain-events/test/unit/aave/listener.spec.ts @@ -0,0 +1,114 @@ +import * as events from 'events'; + +import * as chai from 'chai'; +import dotenv from 'dotenv'; + +import { + Processor, + StorageFetcher, + Subscriber, + Listener, +} from '../../../src/chains/aave'; +import { networkUrls, contracts } from '../../../scripts/listenerUtils'; +import { TestHandler } from '../../util'; + +dotenv.config(); + +const { assert } = chai; + +describe.skip('Aave listener class tests', () => { + let listener; + const handlerEmitter = new events.EventEmitter(); + + it('should create an Aave listener', () => { + listener = new Listener('aave', contracts.aave, null, true, false); + assert.equal(listener.chain, 'aave'); + assert.deepEqual(listener.options, { + url: networkUrls.aave, + skipCatchup: true, + govContractAddress: contracts.aave, + }); + assert.equal(listener.subscribed, false); + assert.equal(listener._verbose, false); + }); + + it('should initialize the Aave listener', async () => { + listener = new Listener('aave', contracts.aave, null, true, false); + await listener.init(); + assert(listener._subscriber instanceof Subscriber); + assert(listener.storageFetcher instanceof StorageFetcher); + assert(listener._processor instanceof Processor); + }); + + it('should add a handler', async () => { + listener.eventHandlers.TestHandler = { + handler: new TestHandler(listener._verbose, handlerEmitter), + excludedEvents: [], + }; + + assert(listener.eventHandlers.TestHandler.handler instanceof TestHandler); + }); + + it('should subscribe the listener to the specified chain', async () => { + await listener.subscribe(); + assert.equal(listener.subscribed, true); + }); + + it('should verify that the handler handled an event successfully', (done) => { + let counter = 0; + // after 10 seconds with no event received use storage fetcher to verify api/connection + const timeoutHandler = setTimeout(() => { + // handlerEmitter.removeAllListeners(); + const startBlock = 9786650; + + listener.storageFetcher.fetch({ startBlock }).then((es) => { + if (es.length > 0) done(); + else assert.fail('No event received and storage handler failed'); + }); + }, 10000); + + const verifyHandler = () => { + assert(listener.eventHandlers.TestHandler.handler.counter >= 1); + ++counter; + if (counter === 1) { + clearTimeout(timeoutHandler); + done(); + } + }; + handlerEmitter.on('eventHandled', verifyHandler); + }).timeout(50000); + + xit('should update the contract address'); + + xit('should verify that the handler handled an event successfully after changing contract address', (done) => { + listener.eventHandlers.TestHandler.handler.counter = 0; + let counter = 0; + const verifyHandler = () => { + assert(listener.eventHandlers.TestHandler.handler.counter >= 1); + ++counter; + if (counter === 1) done(); + }; + handlerEmitter.on('eventHandled', verifyHandler); + }).timeout(20000); + + xit('should verify that the handler handled an event successfully after changing urls', () => { + assert( + listener.eventHandlers.TestHandler.handler.counter >= 1, + 'Handler was not triggered/used' + ); + listener.eventHandlers.TestHandler.handler.counter = 0; + }); + + it('should unsubscribe from the chain', async () => { + listener.unsubscribe(); + assert.equal(listener.subscribed, false); + }); + + it('should return the updated options', async () => { + assert.deepEqual(listener.options, { + url: networkUrls.aave, + skipCatchup: true, + govContractAddress: contracts.aave, + }); + }); +}); diff --git a/packages/chain-events/test/unit/aave/processor.spec.ts b/packages/chain-events/test/unit/aave/processor.spec.ts new file mode 100644 index 00000000000..89241cea313 --- /dev/null +++ b/packages/chain-events/test/unit/aave/processor.spec.ts @@ -0,0 +1,56 @@ +import chai from 'chai'; + +import { SupportedNetwork } from '../../../src'; +import { Processor } from '../../../src/chains/aave/processor'; +import { Api, RawEvent, EventKind } from '../../../src/chains/aave/types'; + +const { assert } = chai; + +const toHex = (n: number | string) => ({ _hex: `0x${n.toString(16)}` }); +const blockNumber = 10000; + +const constructEvent = (data): RawEvent => { + return { + args: data, + } as RawEvent; +}; + +describe('Aave Event Processor Tests', () => { + it('should process a raw event into a CWEvent', async () => { + const processor = new Processor(({} as unknown) as Api); + const kind = EventKind.ProposalQueued; + const id = 5; + const executionTime = 10; + const event = constructEvent({ id, executionTime }); + + event.blockNumber = blockNumber; + event.event = 'ProposalQueued'; + + const result = await processor.process(event); + assert.deepEqual(result, [ + { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Aave, + data: { + kind, + id, + executionTime, + }, + }, + ]); + }); + + it('should gracefully fail to process an event with invalid type', async () => { + const processor = new Processor({} as Api); + const event = ({ + event: 'NothingHappened', + blockNumber, + args: { + proposalIndex: toHex(1), + }, + } as unknown) as RawEvent; + const result = await processor.process(event); + assert.isEmpty(result); + }); +}); diff --git a/packages/chain-events/test/unit/aave/storageFetcher.spec.ts b/packages/chain-events/test/unit/aave/storageFetcher.spec.ts new file mode 100644 index 00000000000..912bfa873d6 --- /dev/null +++ b/packages/chain-events/test/unit/aave/storageFetcher.spec.ts @@ -0,0 +1,162 @@ +import chai from 'chai'; +import { BigNumber } from 'ethers'; + +import { SupportedNetwork } from '../../../src'; +import { StorageFetcher } from '../../../src/chains/aave/storageFetcher'; +import { + EventKind, + Proposal, + ProposalState, + RawEvent, +} from '../../../src/chains/aave/types'; +import { AaveGovernanceV2 } from '../../../src/contractTypes'; + +const { assert } = chai; + +const constructEvent = (blockNumber: number, data): RawEvent => { + return { + args: data, + blockNumber, + } as RawEvent; +}; + +const makeApi = (proposals: Proposal[]) => { + const governance = ({ + provider: { + getBlockNumber: async () => 200, + getBlock: async () => ({ number: 200 }), + }, + getProposalsCount: async () => proposals.length, + getProposalById: async (n: number) => proposals[n], + getProposalState: async () => ProposalState.CANCELED, + // TODO: test vote queries + queryFilter: async (filter) => { + // TODO: support all filters + if (filter === 'ProposalCreated') { + const events = proposals.map((p) => { + return constructEvent(+p.startBlock, { + id: p.id, + creator: p.creator, + executor: p.executor, + targets: p.targets, + signatures: p.signatures, + calldatas: p.calldatas, + startBlock: p.startBlock, + endBlock: p.endBlock, + strategy: p.strategy, + ipfsHash: p.ipfsHash, + 4: p[4], + }); + }); + return events; + } + if (filter === 'ProposalCanceled') { + const events = proposals + .map((p) => { + if (p.canceled) { + return constructEvent(100, { + id: p.id, + }); + } + return null; + }) + .filter((p) => !!p); + return events; + } + return []; + }, + filters: { + VoteEmitted: () => 'VoteEmitted', + ProposalCreated: () => 'ProposalCreated', + ProposalCanceled: () => 'ProposalCanceled', + ProposalQueued: () => 'ProposalQueued', + ProposalExecuted: () => 'ProposalExecuted', + }, + } as unknown) as AaveGovernanceV2; + return { governance }; +}; + +describe('Aave Storage Fetcher Tests', () => { + it('should run gracefully with nothing in storage', async () => { + const api = makeApi([]); + const fetcher = new StorageFetcher(api); + const fetched = await fetcher.fetch(); + assert.deepEqual(fetched, []); + }); + it('should handle a creation event from the contract', async () => { + const p = { + id: BigNumber.from(1), + creator: 'creator', + executor: 'executor', + targets: ['target'], + values: undefined, + signatures: ['signature'], + calldatas: ['calldata'], + withDelegatecalls: [true], + startBlock: BigNumber.from(5), + endBlock: BigNumber.from(100), + executionTime: BigNumber.from(0), + forVotes: BigNumber.from(1000), + againstVotes: BigNumber.from(2000), + canceled: true, + executed: false, + strategy: 'strategy', + ipfsHash: 'hash', + }; + const proposals: Proposal[] = [ + { + 0: p.id, + 1: p.creator, + 2: p.executor, + 3: p.targets, + 4: [BigNumber.from(10)], + 5: p.signatures, + 6: p.calldatas, + 7: p.withDelegatecalls, + 8: p.startBlock, + 9: p.endBlock, + 10: p.executionTime, + 11: p.forVotes, + 12: p.againstVotes, + 13: p.executed, + 14: p.canceled, + 15: p.strategy, + 16: p.ipfsHash, + ...p, + } as Proposal, + ]; + const api = makeApi(proposals); + const fetcher = new StorageFetcher(api); + const fetched = await fetcher.fetch(); + assert.sameDeepMembers(fetched, [ + { + blockNumber: 5, + excludeAddresses: ['creator'], + network: SupportedNetwork.Aave, + data: { + kind: EventKind.ProposalCreated, + id: 1, + proposer: 'creator', + executor: 'executor', + startBlock: 5, + endBlock: 100, + signatures: ['signature'], + calldatas: ['calldata'], + values: ['10'], + targets: ['target'], + strategy: 'strategy', + ipfsHash: 'hash', + }, + }, + { + blockNumber: 100, + excludeAddresses: [], + network: SupportedNetwork.Aave, + data: { + kind: EventKind.ProposalCanceled, + id: 1, + }, + }, + ]); + }); +}); diff --git a/packages/chain-events/test/unit/aave/subscriber.spec.ts b/packages/chain-events/test/unit/aave/subscriber.spec.ts new file mode 100644 index 00000000000..fc385bf9457 --- /dev/null +++ b/packages/chain-events/test/unit/aave/subscriber.spec.ts @@ -0,0 +1,53 @@ +import { EventEmitter } from 'events'; + +import chai from 'chai'; + +import { Subscriber } from '../../../src/chains/aave/subscriber'; +import { Api, RawEvent } from '../../../src/chains/aave/types'; + +const { assert } = chai; + +const constructEvent = (data): RawEvent => { + return { + args: data, + } as RawEvent; +}; + +describe('Aave Event Subscriber Tests', () => { + it('should callback with event data', async (done) => { + const aaveApi = { governance: new EventEmitter() }; + const subscriber = new Subscriber((aaveApi as unknown) as Api, 'aave-test'); + const id = 5; + const executionTime = 100; + const event = constructEvent({ id, executionTime }); + event.event = 'ProposalQueued'; + event.blockNumber = 10; + const cb = (receivedEvent: RawEvent) => { + assert.deepEqual(event, receivedEvent); + }; + subscriber.subscribe(cb).then(() => { + aaveApi.governance.emit('*', event); + }); + done(); + }); + + it('should no-op on unnecessary unsubscribe', (done) => { + const aaveApi = { governance: new EventEmitter() }; + const subscriber = new Subscriber((aaveApi as unknown) as Api, 'aave-test'); + subscriber.unsubscribe(); + done(); + }); + + it('should unsubscribe successfully', (done) => { + const aaveApi = { governance: new EventEmitter() }; + const subscriber = new Subscriber((aaveApi as unknown) as Api, 'aave-test'); + const cb = () => { + assert.fail('should not reach callback'); + }; + subscriber.subscribe(cb).then(() => { + subscriber.unsubscribe(); + assert.deepEqual(aaveApi.governance.listeners('*'), []); + done(); + }); + }); +}); diff --git a/packages/chain-events/test/unit/compound/enricher.spec.ts b/packages/chain-events/test/unit/compound/enricher.spec.ts new file mode 100644 index 00000000000..9b3f319c139 --- /dev/null +++ b/packages/chain-events/test/unit/compound/enricher.spec.ts @@ -0,0 +1,282 @@ +import chai from 'chai'; +import { utils, BigNumber } from 'ethers'; + +import { SupportedNetwork } from '../../../src'; +import { EventKind, RawEvent, Api } from '../../../src/chains/compound/types'; +import { Enrich } from '../../../src/chains/compound/filters/enricher'; + +const { assert } = chai; + +const constructEvent = (data, rawData?): RawEvent => { + return { + args: data, + data: rawData, + } as RawEvent; +}; + +const blockNumber = 10000; +const api: Api = ({} as unknown) as Api; + +describe('Compound Event Enricher Filter Tests', () => { + // Comp Events + // Approval + /* + it('should enrich approval event', async () => { + const kind = EventKind.Approval; + const owner = 'fromAddress'; + const spender = 'toAddress'; + const amount = '123'; + const event = constructEvent({ + owner, + spender, + amount, + }); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [owner], + data: { + kind, + owner, + spender, + amount, + }, + }); + }); + + // DelegateChanged + it('should enrich delegateChanged event', async () => { + const kind = EventKind.DelegateChanged; + const fromDelegate = 'previousAddress'; + const toDelegate = 'toAddress'; + const delegator = 'fromAddress'; + const event = constructEvent({ + delegator, + toDelegate, + fromDelegate, + }); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [delegator], + data: { + kind, + delegator, + toDelegate, + fromDelegate, + }, + }); + }); + // DelegateVotesChanged + it('should enrich DelegateVotesChanged event', async () => { + const kind = EventKind.DelegateVotesChanged; + const delegate = 'me'; + const previousBalance = '123'; + const newBalance = '234'; + // const delegate = 'him', + const event = constructEvent({ + delegate, + previousBalance, + newBalance, + }); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [delegate], + data: { + kind, + delegate, + previousBalance, + newBalance, + }, + }); + }); + + // Transfer + it('should enrich Transfer event', async () => { + const kind = EventKind.Transfer; + const from = 'me'; + const to = 'them'; + const amount = '234'; + // const delegate = 'him', + const event = constructEvent({ + from, + to, + amount, + }); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [from], + data: { + kind, + from, + to, + amount, + }, + }); + }); + */ + + // GovernorAlpha Events + // ProposalCreated + it('should enrich ProposalCreated event', async () => { + const kind = EventKind.ProposalCreated; + const address = '0x6E0d01A76C3Cf4288372a29124A26D4353EE51BE'; + const callData = utils.toUtf8Bytes('calldata'); + const rawData = utils.defaultAbiCoder.encode( + [ + 'uint', + 'address', + 'address[]', + 'uint[]', + 'string[]', + 'bytes[]', + 'uint', + 'uint', + 'bytes', + ], + [ + 1, + address, + [address], + [3], + ['hello3'], + [callData], + blockNumber, + blockNumber + 172, + utils.toUtf8Bytes('test description'), + ] + ); + const event = constructEvent( + [ + BigNumber.from(1), + address, + [address], + [3], + ['hello3'], + [callData], + blockNumber, + blockNumber + 172, + utils.toUtf8Bytes('test description'), + ], + rawData + ); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [address], + network: SupportedNetwork.Compound, + data: { + kind, + id: '0x01', + proposer: address, + targets: [address], + values: ['3'], + signatures: ['hello3'], + calldatas: [utils.hexlify(callData)], + startBlock: blockNumber, + endBlock: blockNumber + 172, // votingPeriod() + description: 'test description', + }, + }); + }); + + // ProposalCanceled + it('should enrich ProposalCanceled event', async () => { + const kind = EventKind.ProposalCanceled; + const event = constructEvent([BigNumber.from(1)]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Compound, + data: { + kind, + id: '0x01', + }, + }); + }); + + // ProposalExecuted + it('should enrich ProposalExecuted event', async () => { + const kind = EventKind.ProposalExecuted; + const event = constructEvent([BigNumber.from(1)]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Compound, + data: { + kind, + id: '0x01', + }, + }); + }); + + // ProposalQueued + it('should enrich ProposalQueued event', async () => { + const kind = EventKind.ProposalQueued; + const eta = 123; + const event = constructEvent([BigNumber.from(1), eta]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Compound, + data: { + kind, + id: '0x01', + eta, + }, + }); + }); + + // VoteCast + it('should enrich GovAlpha VoteCast event', async () => { + const kind = EventKind.VoteCast; + const voter = 'i voted!'; + const id = BigNumber.from(123); + const support = false; + const votes = '525600'; + const event = constructEvent([voter, id, support, votes]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [voter], + network: SupportedNetwork.Compound, + data: { + kind, + id: id.toHexString(), + voter, + support: 0, + votes, + reason: undefined, + }, + }); + }); + + it('should enrich GovBravo VoteCast event', async () => { + const kind = EventKind.VoteCast; + const voter = 'i voted!'; + const id = BigNumber.from(123); + const support = 2; + const votes = '525600'; + const reason = 'for what?'; + const event = constructEvent([voter, id, support, votes, reason]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: [voter], + network: SupportedNetwork.Compound, + data: { + kind, + id: id.toHexString(), + voter, + support, + votes, + reason, + }, + }); + }); +}); diff --git a/packages/chain-events/test/unit/compound/listener.spec.ts b/packages/chain-events/test/unit/compound/listener.spec.ts new file mode 100644 index 00000000000..f190a4356f9 --- /dev/null +++ b/packages/chain-events/test/unit/compound/listener.spec.ts @@ -0,0 +1,113 @@ +import * as events from 'events'; + +import * as chai from 'chai'; +import dotenv from 'dotenv'; + +import { + Processor, + StorageFetcher, + Subscriber, + Listener, +} from '../../../src/chains/compound'; +import { networkUrls, contracts } from '../../../scripts/listenerUtils'; +import { TestHandler } from '../../util'; + +dotenv.config(); + +const { assert } = chai; + +describe.skip('Compound listener class tests', () => { + let listener; + const handlerEmitter = new events.EventEmitter(); + + it('should create a Compound listener', () => { + listener = new Listener('marlin', contracts.marlin, null, true, false); + assert.equal(listener.chain, 'marlin'); + assert.deepEqual(listener.options, { + url: networkUrls.marlin, + skipCatchup: true, + contractAddress: contracts.marlin, + }); + assert.equal(listener.subscribed, false); + assert.equal(listener._verbose, false); + }); + + it('should initialize the Compound listener', async () => { + await listener.init(); + assert(listener._subscriber instanceof Subscriber); + assert(listener.storageFetcher instanceof StorageFetcher); + assert(listener._processor instanceof Processor); + }); + + it('should add a handler', async () => { + listener.eventHandlers.TestHandler = { + handler: new TestHandler(listener._verbose, handlerEmitter), + excludedEvents: [], + }; + + assert(listener.eventHandlers.TestHandler.handler instanceof TestHandler); + }); + + it('should subscribe the listener to the specified chain', async () => { + await listener.subscribe(); + assert.equal(listener.subscribed, true); + }); + + it('should verify that the handler handled an event successfully', (done) => { + let counter = 0; + // after 10 seconds with no event received use storage fetcher to verify api/connection + const timeoutHandler = setTimeout(() => { + // handlerEmitter.removeAllListeners(); + const startBlock = 9786650; + + listener.storageFetcher.fetch({ startBlock }).then((es) => { + if (es.length > 0) done(); + else assert.fail('No event received and storage handler failed'); + }); + }, 10000); + + const verifyHandler = () => { + assert(listener.eventHandlers.TestHandler.handler.counter >= 1); + ++counter; + if (counter === 1) { + clearTimeout(timeoutHandler); + done(); + } + }; + handlerEmitter.on('eventHandled', verifyHandler); + }).timeout(50000); + + xit('should update the contract address'); + + xit('should verify that the handler handled an event successfully after changing contract address', (done) => { + listener.eventHandlers.TestHandler.handler.counter = 0; + let counter = 0; + const verifyHandler = () => { + assert(listener.eventHandlers.TestHandler.handler.counter >= 1); + ++counter; + if (counter === 1) done(); + }; + handlerEmitter.on('eventHandled', verifyHandler); + }).timeout(20000); + + xit('should verify that the handler handled an event successfully after changing urls', () => { + assert( + listener.eventHandlers.TestHandler.handler.counter >= 1, + 'Handler was not triggered/used' + ); + listener.eventHandlers.TestHandler.handler.counter = 0; + }); + + it('should unsubscribe from the chain', async () => { + listener.unsubscribe(); + assert.equal(listener.subscribed, false); + }); + + it('should return the updated options', async () => { + assert.deepEqual(listener.options, { + url: networkUrls.marlin, + skipCatchup: true, + contractAddress: contracts.marlin, + }); + }); +}); diff --git a/packages/chain-events/test/unit/compound/processor.spec.ts b/packages/chain-events/test/unit/compound/processor.spec.ts new file mode 100644 index 00000000000..cb7ae94024c --- /dev/null +++ b/packages/chain-events/test/unit/compound/processor.spec.ts @@ -0,0 +1,57 @@ +import chai from 'chai'; +import { BigNumber } from 'ethers'; + +import { SupportedNetwork } from '../../../src'; +import { Processor } from '../../../src/chains/compound/processor'; +import { Api, RawEvent, EventKind } from '../../../src/chains/compound/types'; + +const { assert } = chai; + +const toHex = (n: number | string) => ({ _hex: `0x${n.toString(16)}` }); +const blockNumber = 10000; + +const constructEvent = (data): RawEvent => { + return { + args: data, + } as RawEvent; +}; + +describe('Compound Event Processor Tests', () => { + it('should process a raw event into a CWEvent', async () => { + const processor = new Processor(({} as unknown) as Api); + const kind = EventKind.ProposalQueued; + const id = BigNumber.from(5); + const eta = 10; + const event = constructEvent([id, eta]); + + event.blockNumber = blockNumber; + event.event = 'ProposalQueued'; + + const result = await processor.process(event); + assert.deepEqual(result, [ + { + blockNumber, + excludeAddresses: [], + network: SupportedNetwork.Compound, + data: { + kind, + id: '0x05', + eta, + }, + }, + ]); + }); + + it('should gracefully fail to process an event with invalid type', async () => { + const processor = new Processor({} as Api); + const event = ({ + event: 'NothingHappened', + blockNumber, + args: { + proposalIndex: toHex(1), + }, + } as unknown) as RawEvent; + const result = await processor.process(event); + assert.isEmpty(result); + }); +}); diff --git a/packages/chain-events/test/unit/compound/storageFetcher.spec.ts b/packages/chain-events/test/unit/compound/storageFetcher.spec.ts new file mode 100644 index 00000000000..f5f6c181e4d --- /dev/null +++ b/packages/chain-events/test/unit/compound/storageFetcher.spec.ts @@ -0,0 +1,136 @@ +import chai from 'chai'; +import { BigNumber, utils } from 'ethers'; + +import { SupportedNetwork } from '../../../src'; +import { StorageFetcher } from '../../../src/chains/compound/storageFetcher'; +import { + EventKind, + ProposalState, + RawEvent, +} from '../../../src/chains/compound/types'; +import { GovernorAlpha } from '../../../src/contractTypes'; + +const { assert } = chai; + +const constructEvent = (blockNumber: number, data, rawData?): RawEvent => { + return { + args: data, + data: rawData, + blockNumber, + } as RawEvent; +}; + +const makeApi = (proposals, isBravo = false) => { + const governorAlpha = ({ + interface: { + functions: { + 'guardian()': !isBravo, + }, + }, + votingDelay: async () => '2', + votingPeriod: async () => '2', + proposalCount: async () => proposals.length, + proposals: async (n: number) => proposals[n - 1], + provider: { + getBlock: async (n: number) => ({ timestamp: n * 1000 }), + getBlockNumber: async () => 200, + }, + state: async () => { + return ProposalState.Active; + }, + queryFilter: async (filter) => { + // TODO: support all filters + if (filter === 'ProposalCreated') { + const events = proposals.map((p) => { + const rawData = utils.defaultAbiCoder.encode( + [ + 'uint', + 'address', + 'address[]', + 'uint[]', + 'string[]', + 'bytes[]', + 'uint', + 'uint', + 'bytes', + ], + p + ); + return constructEvent( + +p[6], + { + id: p[0], + proposer: p[1], + targets: p[2], + 3: p[3], + signatures: p[4], + calldatas: p[5], + startBlock: p[6], + endBlock: p[7], + description: p[8], + }, + rawData + ); + }); + return events; + } + return []; + }, + filters: { + VoteCast: () => 'VoteCast', + ProposalCreated: () => 'ProposalCreated', + ProposalCanceled: () => 'ProposalCanceled', + ProposalQueued: () => 'ProposalQueued', + ProposalExecuted: () => 'ProposalExecuted', + }, + } as unknown) as GovernorAlpha; + return governorAlpha; +}; + +describe('Compound Storage Fetcher Tests', () => { + it('should run gracefully with nothing in storage', async () => { + const api = makeApi([]); + const fetcher = new StorageFetcher(api); + const fetched = await fetcher.fetch(); + assert.deepEqual(fetched, []); + }); + it('should handle a creation event from the contract', async () => { + const address = '0x6E0d01A76C3Cf4288372a29124A26D4353EE51BE'; + const callData = utils.toUtf8Bytes('calldata'); + const proposals = [ + [ + BigNumber.from(1), + address, + [address], + [BigNumber.from(3)], + ['hello3'], + [callData], + BigNumber.from(200), + BigNumber.from(3 * 172), + utils.toUtf8Bytes('test description'), + ], + ]; + const api = makeApi(proposals); + const fetcher = new StorageFetcher(api); + const fetched = await fetcher.fetch(); + assert.deepEqual(fetched, [ + { + blockNumber: 200, + excludeAddresses: [address], + network: SupportedNetwork.Compound, + data: { + id: '0x01', + kind: EventKind.ProposalCreated, + proposer: address, + targets: [address], + values: ['3'], + signatures: ['hello3'], + calldatas: [utils.hexlify(callData)], + startBlock: 200, + endBlock: 3 * 172, // votingPeriod() + description: 'test description', + }, + }, + ]); + }); +}); diff --git a/packages/chain-events/test/unit/compound/subscriber.spec.ts b/packages/chain-events/test/unit/compound/subscriber.spec.ts new file mode 100644 index 00000000000..c8c3c315df7 --- /dev/null +++ b/packages/chain-events/test/unit/compound/subscriber.spec.ts @@ -0,0 +1,62 @@ +import { EventEmitter } from 'events'; + +import chai from 'chai'; + +import { Subscriber } from '../../../src/chains/compound/subscriber'; +import { Api, RawEvent } from '../../../src/chains/compound/types'; + +const { assert } = chai; + +const constructEvent = (data): RawEvent => { + return { + args: data, + } as RawEvent; +}; + +describe('Compound Event Subscriber Tests', () => { + it('should callback with event data', async (done) => { + const compoundApi = new EventEmitter(); + const subscriber = new Subscriber( + (compoundApi as unknown) as Api, + 'compound-test' + ); + const id = 5; + const executionTime = 100; + const event = constructEvent({ id, executionTime }); + event.event = 'ProposalQueued'; + event.blockNumber = 10; + const cb = (receivedEvent: RawEvent) => { + assert.deepEqual(event, receivedEvent); + }; + subscriber.subscribe(cb).then(() => { + compoundApi.emit('*', event); + }); + done(); + }); + + it('should no-op on unnecessary unsubscribe', (done) => { + const compoundApi = new EventEmitter(); + const subscriber = new Subscriber( + (compoundApi as unknown) as Api, + 'compound-test' + ); + subscriber.unsubscribe(); + done(); + }); + + it('should unsubscribe successfully', (done) => { + const compoundApi = new EventEmitter(); + const subscriber = new Subscriber( + (compoundApi as unknown) as Api, + 'compound-test' + ); + const cb = () => { + assert.fail('should not reach callback'); + }; + subscriber.subscribe(cb).then(() => { + subscriber.unsubscribe(); + assert.deepEqual(compoundApi.listeners('*'), []); + done(); + }); + }); +}); diff --git a/packages/chain-events/test/unit/erc20/listener.spec.ts b/packages/chain-events/test/unit/erc20/listener.spec.ts new file mode 100644 index 00000000000..ebed2203aae --- /dev/null +++ b/packages/chain-events/test/unit/erc20/listener.spec.ts @@ -0,0 +1,109 @@ +import * as events from 'events'; + +import * as chai from 'chai'; +import dotenv from 'dotenv'; + +import { Processor, Subscriber, Listener } from '../../../src/chains/erc20'; +import { networkUrls } from '../../../scripts/listenerUtils'; +import { TestHandler } from '../../util'; + +dotenv.config(); + +const { assert } = chai; +const tokenAddresses = [ + '0xdac17f958d2ee523a2206206994597c13d831ec7', + '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', +]; +const tokenNames = ['USDT', 'USDC']; + +describe.skip('Erc20 listener class tests', () => { + let listener; + const handlerEmitter = new events.EventEmitter(); + + it('should create an Erc20 listener', () => { + listener = new Listener( + 'erc20', + tokenAddresses, + networkUrls.erc20, + tokenNames, + {} + ); + assert.equal(listener.chain, 'erc20'); + assert.deepEqual(listener.options, { + url: networkUrls.erc20, + tokenAddresses, + tokenNames, + }); + assert.equal(listener.subscribed, false); + assert.equal(listener._verbose, false); + }); + + it('should initialize the Erc20 listener', async () => { + await listener.init(); + assert(listener._subscriber instanceof Subscriber); + assert(listener._processor instanceof Processor); + }); + + it('should add a handler', async () => { + listener.eventHandlers.TestHandler = { + handler: new TestHandler(listener._verbose, handlerEmitter), + excludedEvents: [], + }; + + assert(listener.eventHandlers.TestHandler.handler instanceof TestHandler); + }); + + it('should subscribe the listener to the specified erc20 tokens', async () => { + await listener.subscribe(); + assert.equal(listener.subscribed, true); + }); + + it('should verify that the handler handled an event successfully', (done) => { + let counter = 0; + const verifyHandler = () => { + assert(listener.eventHandlers.TestHandler.handler.counter >= 1); + ++counter; + if (counter === 1) { + done(); + } + }; + handlerEmitter.on('eventHandled', verifyHandler); + }).timeout(50000); + + xit('should update a contract address'); + + xit('should verify that the handler handled an event successfully after changing contract address', (done) => { + listener.eventHandlers.TestHandler.handler.counter = 0; + let counter = 0; + const verifyHandler = () => { + assert(listener.eventHandlers.TestHandler.handler.counter >= 1); + ++counter; + if (counter === 1) done(); + }; + handlerEmitter.on('eventHandled', verifyHandler); + }).timeout(20000); + + xit('should update the url the listener should connect to', async () => + undefined); + + xit('should verify that the handler handled an event successfully after changing urls', () => { + assert( + listener.eventHandlers.TestHandler.handler.counter >= 1, + 'Handler was not triggered/used' + ); + listener.eventHandlers.TestHandler.handler.counter = 0; + }); + + it('should unsubscribe from the chain', async () => { + listener.unsubscribe(); + assert.equal(listener.subscribed, false); + }); + + it('should return the updated options', async () => { + assert.deepEqual(listener.options, { + url: networkUrls.erc20, + tokenAddresses, + tokenNames, + }); + }); +}); diff --git a/packages/chain-events/test/unit/erc721/labeler.spec.ts b/packages/chain-events/test/unit/erc721/labeler.spec.ts new file mode 100644 index 00000000000..39b610ae358 --- /dev/null +++ b/packages/chain-events/test/unit/erc721/labeler.spec.ts @@ -0,0 +1,20 @@ +import * as chai from 'chai'; + +import { Label, Types } from '../../../src/chains/erc721'; + +const { assert } = chai; + +describe('Erc721 labeler class tests', () => { + it('should label a zero address approval event', async () => { + const eventData: Types.IApproval = { + kind: Types.EventKind.Approval, + owner: 'owner', + approved: '0x0000000000000000000000000000000000000000', + tokenId: 'token id', + contractAddress: 'contract address', + }; + const labeledResult = Label(10, 'chain id', eventData); + assert.equal(labeledResult.heading, 'Approval'); + assert.isString(labeledResult.label); + }); +}); diff --git a/packages/chain-events/test/unit/moloch/enricher.spec.ts b/packages/chain-events/test/unit/moloch/enricher.spec.ts new file mode 100644 index 00000000000..a1a6de3a25e --- /dev/null +++ b/packages/chain-events/test/unit/moloch/enricher.spec.ts @@ -0,0 +1,194 @@ +import chai from 'chai'; + +import { SupportedNetwork } from '../../../src'; +import { EventKind, RawEvent, Api } from '../../../src/chains/moloch/types'; +import { Enrich } from '../../../src/chains/moloch/filters/enricher'; + +const { assert } = chai; + +const constructEvent = (data): RawEvent => { + return { + args: data, + } as RawEvent; +}; + +const blockNumber = 10000; +const api: Api = ({ + proposalQueue: async () => ({ + startingPeriod: '1', + details: 'hello', + yesVotes: '5', + noVotes: '4', + }), + periodDuration: async () => '2', + summoningTime: async () => '0', + members: async (addr: string) => ({ + delegateKey: addr, + shares: '10', + exists: true, + highestIndexYesVote: 1, + }), +} as unknown) as Api; + +const toHex = (n: number | string) => ({ _hex: `0x${n.toString(16)}` }); + +describe('Moloch Event Enricher Filter Tests', () => { + it('should enrich submit proposal event', async () => { + const kind = EventKind.SubmitProposal; + const event = constructEvent({ + proposalIndex: toHex(1), + delegateKey: 'delegate', + memberAddress: 'member', + applicant: 'applicant', + tokenTribute: toHex(5), + sharesRequested: toHex(6), + }); + const result = await Enrich(1, api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['member'], + network: SupportedNetwork.Moloch, + data: { + kind, + proposalIndex: 1, + delegateKey: 'delegate', + member: 'member', + applicant: 'applicant', + tokenTribute: '5', + sharesRequested: '6', + details: 'hello', + startTime: 2, + }, + }); + }); + + it('should enrich submit vote event', async () => { + const kind = EventKind.SubmitVote; + const event = constructEvent({ + proposalIndex: toHex(1), + delegateKey: 'delegate', + memberAddress: 'member', + uintVote: 1, + }); + const result = await Enrich(1, api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['member'], + network: SupportedNetwork.Moloch, + data: { + kind, + proposalIndex: 1, + delegateKey: 'delegate', + member: 'member', + vote: 1, + shares: '10', + highestIndexYesVote: 1, + }, + }); + }); + + it('should enrich process proposal event', async () => { + const kind = EventKind.ProcessProposal; + const event = constructEvent({ + proposalIndex: toHex(1), + applicant: 'applicant', + memberAddress: 'member', + tokenTribute: toHex(5), + sharesRequested: toHex(6), + didPass: true, + yesVotes: toHex(5), + noVotes: toHex(4), + }); + const result = await Enrich(1, api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Moloch, + data: { + kind, + proposalIndex: 1, + member: 'member', + applicant: 'applicant', + tokenTribute: '5', + sharesRequested: '6', + didPass: true, + yesVotes: '5', + noVotes: '4', + }, + }); + }); + + it('should enrich ragequit event', async () => { + const kind = EventKind.Ragequit; + const event = constructEvent({ + memberAddress: 'member', + sharesToBurn: toHex(10), + }); + const result = await Enrich(1, api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['member'], + network: SupportedNetwork.Moloch, + data: { + kind, + member: 'member', + sharesToBurn: '10', + }, + }); + }); + + it('should enrich abort event', async () => { + const kind = EventKind.Abort; + const event = constructEvent({ + proposalIndex: toHex(1), + applicantAddress: 'applicant', + }); + const result = await Enrich(1, api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['applicant'], + network: SupportedNetwork.Moloch, + data: { + kind, + proposalIndex: 1, + applicant: 'applicant', + }, + }); + }); + + it('should enrich update delegate key event', async () => { + const kind = EventKind.UpdateDelegateKey; + const event = constructEvent({ + memberAddress: 'member', + newDelegateKey: 'new-delegate', + }); + const result = await Enrich(1, api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + includeAddresses: ['new-delegate'], + network: SupportedNetwork.Moloch, + data: { + kind, + member: 'member', + newDelegateKey: 'new-delegate', + }, + }); + }); + + it('should enrich summon complete event', async () => { + const kind = EventKind.SummonComplete; + const event = constructEvent({ + summoner: 'summoner', + shares: toHex(5), + }); + const result = await Enrich(1, api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Moloch, + data: { + kind, + summoner: 'summoner', + shares: '5', + }, + }); + }); +}); diff --git a/packages/chain-events/test/unit/moloch/listener.spec.ts b/packages/chain-events/test/unit/moloch/listener.spec.ts new file mode 100644 index 00000000000..c5b89c52115 --- /dev/null +++ b/packages/chain-events/test/unit/moloch/listener.spec.ts @@ -0,0 +1,117 @@ +import * as events from 'events'; + +import * as chai from 'chai'; +import dotenv from 'dotenv'; + +import { + Processor, + StorageFetcher, + Subscriber, + Listener, +} from '../../../src/chains/moloch'; +import { networkUrls, contracts } from '../../../scripts/listenerUtils'; +import { TestHandler } from '../../util'; + +dotenv.config(); + +const { assert } = chai; + +describe.skip('Moloch listener class tests', () => { + let listener; + const handlerEmitter = new events.EventEmitter(); + + it('should create the moloch listener', () => { + listener = new Listener('moloch'); + assert.equal(listener.chain, 'moloch'); + assert.deepEqual(listener.options, { + url: networkUrls.moloch, + skipCatchup: false, + contractAddress: contracts.moloch, + contractVersion: 1, + }); + assert.equal(listener.subscribed, false); + assert.equal(listener._verbose, false); + }); + + it('should initialize the substrate listener class', async () => { + await listener.init(); + assert(listener._subscriber instanceof Subscriber); + assert(listener.storageFetcher instanceof StorageFetcher); + assert(listener._processor instanceof Processor); + }); + + it('should add a handler', async () => { + listener.eventHandlers.TestHandler = { + handler: new TestHandler(listener._verbose, handlerEmitter), + excludedEvents: [], + }; + + assert(listener.eventHandlers.TestHandler.handler instanceof TestHandler); + }); + + it('should subscribe the listener to the specified chain', async () => { + await listener.subscribe(); + assert.equal(listener.subscribed, true); + }); + + it('should verify that the handler handled an event successfully', (done) => { + let counter = 0; + // after 10 seconds with no event received use storage fetcher to verify api/connection + const timeoutHandler = setTimeout(() => { + // handlerEmitter.removeAllListeners(); + const startBlock = 9786650; + + listener.storageFetcher.fetch({ startBlock }).then((es) => { + if (es.length > 0) done(); + else assert.fail('No event received and storage handler failed'); + }); + }, 10000); + + const verifyHandler = () => { + assert(listener.eventHandlers.TestHandler.handler.counter >= 1); + ++counter; + if (counter === 1) { + clearTimeout(timeoutHandler); + done(); + } + }; + handlerEmitter.on('eventHandled', verifyHandler); + }).timeout(50000); + + xit('should update the contract address'); + + xit('should update the contract version'); + + xit('should verify that the handler handled an event successfully after changing contract versions', (done) => { + listener.eventHandlers.TestHandler.handler.counter = 0; + let counter = 0; + const verifyHandler = () => { + assert(listener.eventHandlers.TestHandler.handler.counter >= 1); + ++counter; + if (counter === 1) done(); + }; + handlerEmitter.on('eventHandled', verifyHandler); + }).timeout(20000); + + xit('should verify that the handler handled an event successfully after changing urls', () => { + assert( + listener.eventHandlers.TestHandler.handler.counter >= 1, + 'Handler was not triggered/used' + ); + listener.eventHandlers.TestHandler.handler.counter = 0; + }); + + it('should unsubscribe from the chain', async () => { + listener.unsubscribe(); + assert.equal(listener.subscribed, false); + }); + + it('should return the updated options', async () => { + assert.deepEqual(listener.options, { + url: networkUrls.moloch, + skipCatchup: false, + contractAddress: contracts.moloch, + contractVersion: 1, + }); + }); +}); diff --git a/packages/chain-events/test/unit/moloch/processor.spec.ts b/packages/chain-events/test/unit/moloch/processor.spec.ts new file mode 100644 index 00000000000..9a0175946dd --- /dev/null +++ b/packages/chain-events/test/unit/moloch/processor.spec.ts @@ -0,0 +1,110 @@ +import chai from 'chai'; + +import { SupportedNetwork } from '../../../src'; +import { Processor } from '../../../src/chains/moloch/processor'; +import { Api, RawEvent, EventKind } from '../../../src/chains/moloch/types'; + +const { assert } = chai; + +const toHex = (n: number | string) => ({ _hex: `0x${n.toString(16)}` }); + +describe('Moloch Event Processor Tests', () => { + it('should process a raw event into a CWEvent', async () => { + const processor = new Processor( + ({ + proposalQueue: async () => ({ + startingPeriod: '1', + details: 'hello', + yesVotes: '10', + noVotes: '5', + }), + } as unknown) as Api, + 1 + ); + const event = ({ + event: 'ProcessProposal', + blockNumber: 10, + args: { + proposalIndex: toHex(1), + memberAddress: 'member', + applicant: 'applicant', + tokenTribute: toHex(5), + sharesRequested: toHex(6), + didPass: true, + yesVotes: toHex(10), + noVotes: toHex(5), + }, + } as unknown) as RawEvent; + const result = await processor.process(event); + assert.deepEqual(result, [ + { + blockNumber: 10, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.ProcessProposal, + proposalIndex: 1, + member: 'member', + applicant: 'applicant', + tokenTribute: '5', + sharesRequested: '6', + didPass: true, + yesVotes: '10', + noVotes: '5', + }, + }, + ]); + }); + + it('should gracefully fail to process an event with invalid type', async () => { + const processor = new Processor({} as Api, 1); + const event = ({ + event: 'NothingHappened', + blockNumber: 10, + args: { + proposalIndex: toHex(1), + }, + } as unknown) as RawEvent; + const result = await processor.process(event); + assert.isEmpty(result); + }); + + it('should gracefully fail to process an event with invalid data', async () => { + const processor = new Processor({} as Api, 1); + const event = ({ + event: 'SubmitProposal', + blockNumber: 10, + args: { + proposalIndex: toHex(1), + }, + } as unknown) as RawEvent; + const result = await processor.process(event); + assert.isEmpty(result); + }); + + it('should gracefully fail to process an event with invalid api call', async () => { + const processor = new Processor( + ({ + provider: { + getBlock: () => { + throw new Error('fail!'); + }, + }, + } as unknown) as Api, + 1 + ); + const event = ({ + event: 'SubmitProposal', + blockNumber: 10, + args: { + proposalIndex: toHex(1), + memberAddress: 'member', + delegateKey: 'member', + applicant: 'applicant', + tokenTribute: toHex(5), + sharesRequested: toHex(6), + }, + } as unknown) as RawEvent; + const result = await processor.process(event); + assert.isEmpty(result); + }); +}); diff --git a/packages/chain-events/test/unit/moloch/storageFetcher.spec.ts b/packages/chain-events/test/unit/moloch/storageFetcher.spec.ts new file mode 100644 index 00000000000..041320685b2 --- /dev/null +++ b/packages/chain-events/test/unit/moloch/storageFetcher.spec.ts @@ -0,0 +1,516 @@ +import chai from 'chai'; + +import { SupportedNetwork } from '../../../src'; +import { StorageFetcher } from '../../../src/chains/moloch/storageFetcher'; +import { + ProposalV1, + EventKind, + ISubmitProposal, + IProcessProposal, +} from '../../../src/chains/moloch/types'; +import { Moloch1 } from '../../../src/contractTypes'; + +const { assert } = chai; + +const makeApi = (proposals: ProposalV1[]) => { + return ({ + periodDuration: async () => '1', + summoningTime: async () => '2', + votingPeriodLength: async () => '3', + gracePeriodLength: async () => '2', + abortWindow: async () => '2', + getProposalQueueLength: async () => proposals.length, + proposalQueue: async (n: number) => proposals[n], + provider: { + getBlock: async (n: number) => ({ timestamp: n * 1000 }), + getBlockNumber: async () => 200, + }, + } as unknown) as Moloch1; +}; + +const makeDater = (minAvailableBlock = 0) => { + return { + getDate: (timestamp) => { + if (!timestamp) throw new Error('no timestamp given'); + if (timestamp / 1000 < minAvailableBlock) return undefined; + return { + date: `${timestamp / 1000}`, + block: timestamp / 1000, + }; + }, + }; +}; + +describe('Moloch Storage Fetcher Tests', () => { + it('should run gracefully with nothing in storage', async () => { + const api = makeApi([]); + const fetcher = new StorageFetcher(api, 1, makeDater()); + const fetched = await fetcher.fetch(); + assert.deepEqual(fetched, []); + }); + + it('should fetch an active moloch1 proposal from storage', async () => { + const proposals: ProposalV1[] = [ + ({ + proposer: 'proposer', + applicant: 'applicant', + sharesRequested: '2', + startingPeriod: '1', + yesVotes: '2', + noVotes: '3', + processed: false, + didPass: false, + aborted: false, + tokenTribute: '4', + details: 'test', + maxTotalSharesAtYesVote: '2', + } as unknown) as ProposalV1, + ]; + const api = makeApi(proposals); + const fetcher = new StorageFetcher(api, 1, makeDater()); + const fetched = await fetcher.fetch(); + assert.deepEqual(fetched, [ + { + blockNumber: 3, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.SubmitProposal, + proposalIndex: 0, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + details: 'test', + startTime: 3, + }, + }, + ]); + }); + + it('should fetch an aborted moloch1 proposal from storage', async () => { + const proposals: ProposalV1[] = [ + ({ + proposer: 'proposer', + applicant: 'applicant', + sharesRequested: '2', + startingPeriod: '1', + yesVotes: '2', + noVotes: '3', + processed: false, + didPass: false, + aborted: true, + tokenTribute: '4', + details: 'test', + maxTotalSharesAtYesVote: '2', + } as unknown) as ProposalV1, + ]; + const api = makeApi(proposals); + const fetcher = new StorageFetcher(api, 1, makeDater()); + const fetched = await fetcher.fetch(); + assert.deepEqual(fetched, [ + { + blockNumber: 3, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.SubmitProposal, + proposalIndex: 0, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + details: 'test', + startTime: 3, + }, + }, + { + blockNumber: 5, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.Abort, + proposalIndex: 0, + applicant: 'applicant', + }, + }, + ]); + }); + + // TODO: write test where we are still in abort window to verify block # synthesis + + it('should fetch a processed moloch1 proposal from storage', async () => { + const proposals: ProposalV1[] = [ + ({ + proposer: 'proposer', + applicant: 'applicant', + sharesRequested: '2', + startingPeriod: '1', + yesVotes: '2', + noVotes: '3', + processed: true, + didPass: true, + aborted: false, + tokenTribute: '4', + details: 'test', + maxTotalSharesAtYesVote: '2', + } as unknown) as ProposalV1, + ]; + const api = makeApi(proposals); + const fetcher = new StorageFetcher(api, 1, makeDater()); + const fetched = await fetcher.fetch(); + assert.deepEqual(fetched, [ + { + blockNumber: 3, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.SubmitProposal, + proposalIndex: 0, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + details: 'test', + startTime: 3, + }, + }, + { + blockNumber: 8, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.ProcessProposal, + proposalIndex: 0, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + didPass: true, + yesVotes: '2', + noVotes: '3', + }, + }, + ]); + }); + + it('should accept a range parameter with/without endBlock', async () => { + const proposals: ProposalV1[] = [ + ({ + proposer: 'proposer', + applicant: 'applicant', + sharesRequested: '2', + startingPeriod: '1', + yesVotes: '2', + noVotes: '3', + processed: true, + didPass: false, + aborted: false, + tokenTribute: '4', + details: 'test', + maxTotalSharesAtYesVote: '2', + } as unknown) as ProposalV1, + ({ + proposer: 'proposer', + applicant: 'applicant', + sharesRequested: '2', + startingPeriod: '10', + yesVotes: '2', + noVotes: '3', + processed: true, + didPass: false, + aborted: false, + tokenTribute: '4', + details: 'test', + maxTotalSharesAtYesVote: '2', + } as unknown) as ProposalV1, + ({ + proposer: 'proposer', + applicant: 'applicant', + sharesRequested: '2', + startingPeriod: '100', + yesVotes: '2', + noVotes: '3', + processed: false, + didPass: false, + aborted: false, + tokenTribute: '4', + details: 'test', + maxTotalSharesAtYesVote: '2', + } as unknown) as ProposalV1, + ]; + const api = makeApi(proposals); + const fetcher = new StorageFetcher(api, 1, makeDater()); + const range = { startBlock: 9 }; + const fetched = await fetcher.fetch(range); + assert.sameDeepMembers( + fetched.filter((p) => (p.data as ISubmitProposal).proposalIndex === 0), + [] + ); + assert.sameDeepMembers( + fetched.filter( + (p) => + (p.data as ISubmitProposal | IProcessProposal).proposalIndex === 1 + ), + [ + { + blockNumber: 12, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.SubmitProposal, + proposalIndex: 1, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + details: 'test', + startTime: 12, + }, + }, + { + blockNumber: 17, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.ProcessProposal, + proposalIndex: 1, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + didPass: false, + yesVotes: '2', + noVotes: '3', + }, + }, + ] + ); + assert.sameDeepMembers( + fetched.filter((p) => (p.data as ISubmitProposal).proposalIndex === 2), + [ + { + blockNumber: 102, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.SubmitProposal, + proposalIndex: 2, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + details: 'test', + startTime: 102, + }, + }, + ] + ); + + const rangeWithEnd = { startBlock: 9, endBlock: 20 }; + const fetchedWithEnd = await fetcher.fetch(rangeWithEnd); + assert.sameDeepMembers(fetchedWithEnd, [ + { + blockNumber: 12, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.SubmitProposal, + proposalIndex: 1, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + details: 'test', + startTime: 12, + }, + }, + { + blockNumber: 17, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.ProcessProposal, + proposalIndex: 1, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + didPass: false, + yesVotes: '2', + noVotes: '3', + }, + }, + ]); + }); + + it('should terminate fetch on completed due to argument', async () => { + const proposals: ProposalV1[] = [ + ({ + proposer: 'proposer', + applicant: 'applicant', + sharesRequested: '2', + startingPeriod: '1', + yesVotes: '2', + noVotes: '3', + processed: true, + didPass: false, + aborted: false, + tokenTribute: '4', + details: 'test', + maxTotalSharesAtYesVote: '2', + } as unknown) as ProposalV1, + ({ + proposer: 'proposer', + applicant: 'applicant', + sharesRequested: '2', + startingPeriod: '10', + yesVotes: '2', + noVotes: '3', + processed: true, + didPass: false, + aborted: false, + tokenTribute: '4', + details: 'test', + maxTotalSharesAtYesVote: '2', + } as unknown) as ProposalV1, + ]; + + const api = makeApi(proposals); + const fetcher = new StorageFetcher(api, 1, makeDater()); + + // should only fetch the first/most recent completed proposal + const fetched = await fetcher.fetch(null, false); + assert.sameDeepMembers(fetched, [ + { + blockNumber: 12, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.SubmitProposal, + proposalIndex: 1, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + details: 'test', + startTime: 12, + }, + }, + { + blockNumber: 17, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.ProcessProposal, + proposalIndex: 1, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + didPass: false, + yesVotes: '2', + noVotes: '3', + }, + }, + ]); + + // should fetch both completed proposals + const fetchedAll = await fetcher.fetch(null, true); + assert.sameDeepMembers( + fetchedAll.filter( + (p) => + (p.data as ISubmitProposal | IProcessProposal).proposalIndex === 0 + ), + [ + { + blockNumber: 3, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.SubmitProposal, + proposalIndex: 0, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + details: 'test', + startTime: 3, + }, + }, + { + blockNumber: 8, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.ProcessProposal, + proposalIndex: 0, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + didPass: false, + yesVotes: '2', + noVotes: '3', + }, + }, + ] + ); + assert.sameDeepMembers( + fetchedAll.filter( + (p) => + (p.data as ISubmitProposal | IProcessProposal).proposalIndex === 1 + ), + [ + { + blockNumber: 12, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.SubmitProposal, + proposalIndex: 1, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + details: 'test', + startTime: 12, + }, + }, + { + blockNumber: 17, + network: SupportedNetwork.Moloch, + data: { + kind: EventKind.ProcessProposal, + proposalIndex: 1, + member: 'proposer', + applicant: 'applicant', + tokenTribute: '4', + sharesRequested: '2', + didPass: false, + yesVotes: '2', + noVotes: '3', + }, + }, + ] + ); + }); + + it('should throw error on proposal error', (done) => { + const api = makeApi([ + { + startingPeriod: '1', + // eslint-disable-next-line @typescript-eslint/no-explicit-any + } as any, + ]); + const fetcher = new StorageFetcher(api, 1, makeDater()); + fetcher + .fetch() + .then(() => { + done('should throw on proposal error'); + }) + .catch(() => { + done(); + }); + }); + + it('should throw error on api error', (done) => { + const api = ({} as unknown) as Moloch1; + const fetcher = new StorageFetcher(api, 1, makeDater()); + fetcher + .fetch() + .then(() => { + done('should throw on api error'); + }) + .catch(() => { + done(); + }); + }); + + // TODO: dater fail tests +}); diff --git a/packages/chain-events/test/unit/moloch/subscriber.spec.ts b/packages/chain-events/test/unit/moloch/subscriber.spec.ts new file mode 100644 index 00000000000..1925686869a --- /dev/null +++ b/packages/chain-events/test/unit/moloch/subscriber.spec.ts @@ -0,0 +1,65 @@ +import { EventEmitter } from 'events'; + +import chai from 'chai'; + +import { Subscriber } from '../../../src/chains/moloch/subscriber'; +import { Api, RawEvent } from '../../../src/chains/moloch/types'; + +const { assert } = chai; + +const toHex = (n: number | string) => ({ _hex: `0x${n.toString(16)}` }); + +describe('Moloch Event Subscriber Tests', () => { + it('should callback with event data', (done) => { + const molochApi = new EventEmitter(); + const subscriber = new Subscriber( + (molochApi as unknown) as Api, + 'moloch-test' + ); + const event = ({ + event: 'SubmitProposal', + blockNumber: 10, + args: { + proposalIndex: toHex(1), + delegateKey: 'delegate', + memberAddress: 'member', + applicant: 'applicant', + tokenTribute: toHex(5), + sharesRequested: toHex(6), + }, + } as unknown) as RawEvent; + const cb = (receivedEvent: RawEvent) => { + assert.deepEqual(event, receivedEvent); + done(); + }; + subscriber.subscribe(cb).then(() => { + molochApi.emit('*', event); + }); + }); + + it('should no-op on unnecessary unsubscribe', (done) => { + const molochApi = new EventEmitter(); + const subscriber = new Subscriber( + (molochApi as unknown) as Api, + 'moloch-test' + ); + subscriber.unsubscribe(); + done(); + }); + + it('should unsubscribe successfully', (done) => { + const molochApi = new EventEmitter(); + const subscriber = new Subscriber( + (molochApi as unknown) as Api, + 'moloch-test' + ); + const cb = () => { + assert.fail('should not reach callback'); + }; + subscriber.subscribe(cb).then(() => { + subscriber.unsubscribe(); + assert.deepEqual(molochApi.listeners('*'), []); + done(); + }); + }); +}); diff --git a/packages/chain-events/test/unit/substrate/enricher.spec.ts b/packages/chain-events/test/unit/substrate/enricher.spec.ts new file mode 100644 index 00000000000..e97cbcfe18b --- /dev/null +++ b/packages/chain-events/test/unit/substrate/enricher.spec.ts @@ -0,0 +1,1754 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import chai from 'chai'; +import BN from 'bn.js'; +import { + AccountId, + PropIndex, + Hash, + ReferendumInfoTo239, + ReferendumInfo, + Proposal, + TreasuryProposal, + Votes, + Event, + Extrinsic, + Registration, + RegistrarInfo, + Bounty, + RewardPoint, + OpenTip, +} from '@polkadot/types/interfaces'; +import { + DeriveDispatch, + DeriveProposalImage, + DeriveBounties, +} from '@polkadot/api-derive/types'; +import { Vec, bool, Data, TypeRegistry, Option, Bytes } from '@polkadot/types'; +import { Codec, ITuple, TypeDef } from '@polkadot/types/types'; +import { stringToHex } from '@polkadot/util'; +import { + OffenceDetails, + ReportIdOf, +} from '@polkadot/types/interfaces/offences'; + +import { SupportedNetwork } from '../../../src'; +import { Enrich } from '../../../src/chains/substrate/filters/enricher'; +import { + EventKind, + IdentityJudgement, +} from '../../../src/chains/substrate/types'; + +import { + constructFakeApi, + constructOption, + constructIdentityJudgement, + constructAccountVote, +} from './testUtil'; + +const { assert } = chai; +const offenceDetails = [ + constructOption(({ + offender: ['charlie', { total: 0, own: 0, others: 0 }], + reporters: ['alice', 'dave'], + } as unknown) as Option), +]; +const blockNumber = 10; +const api = constructFakeApi({ + totalIssuance: async () => new BN(1_000_000), + electionRounds: async () => '10', + electionMembers: async () => [['dave'], ['charlie'], ['eve']], + activeEra: async () => '5', + getBlockHash: async () => { + return 'hash'; + }, + validators: async () => { + return { + validators: [ + 'EXkCSUQ6Z1hKvGWMNkUDKrTMVHRduQHWc8G6vgo4NccUmhU', + 'FnWdLnFhRuphztWJJLoNV4zc18dBsjpaAMboPLhLdL7zZp3', + 'EZ7uBY7ZLohavWAugjTSUVVSABLfad77S6RQf4pDe3cV9q4', + 'GweeXog8vdnDhjiBCLVvbE4NA4CPTFS3pdFFAFwgZzpUzKu', + 'DbuPiksDXhFFEWgjsEghUypTJjQKyULiNESYji3Gaose2NV', + 'Gt6HqWBhdu4Sy1u8ASTbS1qf2Ac5gwdegwr8tWN8saMxPt5', + 'JKmFAAo9QbR9w3cfSYxk7zdpNEXaN1XbX4NcMU1okAdpwYx', + ], + nextElected: [ + 'EXkCSUQ6Z1hKvGWMNkUDKrTMVHRduQHWc8G6vgo4NccUmhU', + 'FnWdLnFhRuphztWJJLoNV4zc18dBsjpaAMboPLhLdL7zZp3', + 'EZ7uBY7ZLohavWAugjTSUVVSABLfad77S6RQf4pDe3cV9q4', + 'GweeXog8vdnDhjiBCLVvbE4NA4CPTFS3pdFFAFwgZzpUzKu', + 'DbuPiksDXhFFEWgjsEghUypTJjQKyULiNESYji3Gaose2NV', + 'Gt6HqWBhdu4Sy1u8ASTbS1qf2Ac5gwdegwr8tWN8saMxPt5', + 'JKmFAAo9QbR9w3cfSYxk7zdpNEXaN1XbX4NcMU1okAdpwYx', + ], + }; + }, + 'validators.at': async () => { + return [ + 'EXkCSUQ6Z1hKvGWMNkUDKrTMVHRduQHWc8G6vgo4NccUmhU', + 'FnWdLnFhRuphztWJJLoNV4zc18dBsjpaAMboPLhLdL7zZp3', + 'EZ7uBY7ZLohavWAugjTSUVVSABLfad77S6RQf4pDe3cV9q4', + 'GweeXog8vdnDhjiBCLVvbE4NA4CPTFS3pdFFAFwgZzpUzKu', + 'DbuPiksDXhFFEWgjsEghUypTJjQKyULiNESYji3Gaose2NV', + 'Gt6HqWBhdu4Sy1u8ASTbS1qf2Ac5gwdegwr8tWN8saMxPt5', + 'JKmFAAo9QbR9w3cfSYxk7zdpNEXaN1XbX4NcMU1okAdpwYx', + ]; + }, + 'validators.keysAt': async () => { + return [ + { + args: ['EXkCSUQ6Z1hKvGWMNkUDKrTMVHRduQHWc8G6vgo4NccUmhU'], + }, + { + args: ['EZ7uBY7ZLohavWAugjTSUVVSABLfad77S6RQf4pDe3cV9q4'], + }, + ]; + }, + electedInfo: async () => { + return { + info: [ + { + accountId: 'GweeXog8vdnDhjiBCLVvbE4NA4CPTFS3pdFFAFwgZzpUzKu', + controllerId: 'JKmFAAo9QbR9w3cfSYxk7zdpNEXaN1XbX4NcMU1okAdpwYx', + rewardDestination: 'Staked', + validatorPrefs: { + commission: 100000000, + }, + }, + { + accountId: 'HOUXog8vdnDhjiBCLVvbE4NA4CPTFS3pdFFAFwgZzpUzKu', + controllerId: 'IPEFAAo9QbR9w3cfSYxk7zdpNEXaN1XbX4NcMU1okAdpwYx', + rewardDestination: 'Staked', + validatorPrefs: { + commission: 10000000, + }, + }, + ], + }; + }, + nextKeys: async () => { + return [ + 'iViUBJg1zFkVqEcNs5AHEmwDxK8LTBgx8LzZpGDrucKsMS3', + 'krYNTkaCusVm4zeq89kkUFSqz7gsna8gzBTAbJzqcm2yDMW', + 'iEd4cXXQizYFjE6bCPiXWkvt7KZ7gGTL9AdKfTdd6VDcKvS', + 'jERvY3Km1t31oJQa1rZZEpGr186KK2ZrNqJFeRTWxXEtnow', + ]; + }, + currentPoints: async () => { + return { + total: 92600, + individual: { + GweeXog8vdnDhjiBCLVvbE4NA4CPTFS3pdFFAFwgZzpUzKu: '140', + HOUXog8vdnDhjiBCLVvbE4NA4CPTFS3pdFFAFwgZzpUzKu: '20', + }, + }; + }, + stakers: async (accountId) => { + // %%% + const validators = { + EXkCSUQ6Z1hKvGWMNkUDKrTMVHRduQHWc8G6vgo4NccUmhU: { + others: [ + { + value: '0x0000000000000005a405328cbfd77c63', + who: 'mmhaivFqq2gPP6nMpbVoMtxz1H85FVTfn879X5kforz32CL', + }, + { + value: '0x000000000000001e9e67108749f21184', + who: 'iUgUgeVx9WJBea7h8Mm1KGXxurf4UqQfjGVggJ9LfbsMHGy', + }, + { + value: '0x000000000000000d6d6ad68a401e50e9', + who: 'oGmCzvaoZgxV5eMbgVnu6KQACC9snRKttAp3V3obHH7Dc9r', + }, + { + value: '0x000000000000000014d14b817a75054c', + who: 'ks9is3t3uLnSHByPV6idmGVh74aeeABv9VS7g1hSYQBjZFt', + }, + { + value: '0x0000000000000096c96fada32bab79ca', + who: 'nGTjLceLvggC9rZw8mJ3AXSE19o7i7zsLEJkCz3TLNjXfAb', + }, + { + value: '0x0000000000000001ae015c352661f300', + who: 'mxZrFA4exCbd3gX77fMYT88L5S2buvcnne4CrQmjT5b3yDs', + }, + ], + own: '0x0000000000000000002386f262982729', + total: '0x0000000000181394a59fde1e31dea1c4', + }, + FnWdLnFhRuphztWJJLoNV4zc18dBsjpaAMboPLhLdL7zZp3: { + others: [ + { + value: '0x0000000000000005a405328cbfd77c63', + who: 'mmhaivFqq2gPP6nMpbVoMtxz1H85FVTfn879X5kforz32CL', + }, + { + value: '0x000000000000001e9e67108749f21184', + who: 'iUgUgeVx9WJBea7h8Mm1KGXxurf4UqQfjGVggJ9LfbsMHGy', + }, + { + value: '0x000000000000000d6d6ad68a401e50e9', + who: 'oGmCzvaoZgxV5eMbgVnu6KQACC9snRKttAp3V3obHH7Dc9r', + }, + { + value: '0x000000000000000014d14b817a75054c', + who: 'ks9is3t3uLnSHByPV6idmGVh74aeeABv9VS7g1hSYQBjZFt', + }, + { + value: '0x0000000000000096c96fada32bab79ca', + who: 'nGTjLceLvggC9rZw8mJ3AXSE19o7i7zsLEJkCz3TLNjXfAb', + }, + { + value: '0x0000000000000001ae015c352661f300', + who: 'mxZrFA4exCbd3gX77fMYT88L5S2buvcnne4CrQmjT5b3yDs', + }, + ], + own: '0x0000000000000000002386f262982729', + total: '0x0000000000181394a59fde1e31dea1c4', + }, + EZ7uBY7ZLohavWAugjTSUVVSABLfad77S6RQf4pDe3cV9q4: { + others: [ + { + value: '0x0000000000000005a405328cbfd77c63', + who: 'mmhaivFqq2gPP6nMpbVoMtxz1H85FVTfn879X5kforz32CL', + }, + { + value: '0x000000000000001e9e67108749f21184', + who: 'iUgUgeVx9WJBea7h8Mm1KGXxurf4UqQfjGVggJ9LfbsMHGy', + }, + { + value: '0x000000000000000d6d6ad68a401e50e9', + who: 'oGmCzvaoZgxV5eMbgVnu6KQACC9snRKttAp3V3obHH7Dc9r', + }, + { + value: '0x000000000000000014d14b817a75054c', + who: 'ks9is3t3uLnSHByPV6idmGVh74aeeABv9VS7g1hSYQBjZFt', + }, + { + value: '0x0000000000000096c96fada32bab79ca', + who: 'nGTjLceLvggC9rZw8mJ3AXSE19o7i7zsLEJkCz3TLNjXfAb', + }, + { + value: '0x0000000000000001ae015c352661f300', + who: 'mxZrFA4exCbd3gX77fMYT88L5S2buvcnne4CrQmjT5b3yDs', + }, + ], + own: '0x0000000000000000002386f262982729', + total: '0x0000000000181394a59fde1e31dea1c4', + }, + GweeXog8vdnDhjiBCLVvbE4NA4CPTFS3pdFFAFwgZzpUzKu: { + others: [ + { + value: '0x0000000000000005a405328cbfd77c63', + who: 'mmhaivFqq2gPP6nMpbVoMtxz1H85FVTfn879X5kforz32CL', + }, + { + value: '0x000000000000001e9e67108749f21184', + who: 'iUgUgeVx9WJBea7h8Mm1KGXxurf4UqQfjGVggJ9LfbsMHGy', + }, + { + value: '0x000000000000000d6d6ad68a401e50e9', + who: 'oGmCzvaoZgxV5eMbgVnu6KQACC9snRKttAp3V3obHH7Dc9r', + }, + { + value: '0x000000000000000014d14b817a75054c', + who: 'ks9is3t3uLnSHByPV6idmGVh74aeeABv9VS7g1hSYQBjZFt', + }, + { + value: '0x0000000000000096c96fada32bab79ca', + who: 'nGTjLceLvggC9rZw8mJ3AXSE19o7i7zsLEJkCz3TLNjXfAb', + }, + { + value: '0x0000000000000001ae015c352661f300', + who: 'mxZrFA4exCbd3gX77fMYT88L5S2buvcnne4CrQmjT5b3yDs', + }, + ], + own: '0x0000000000000000002386f262982729', + total: '0x0000000000181394a59fde1e31dea1c4', + }, + DbuPiksDXhFFEWgjsEghUypTJjQKyULiNESYji3Gaose2NV: { + others: [ + { + value: '0x0000000000000005a405328cbfd77c63', + who: 'mmhaivFqq2gPP6nMpbVoMtxz1H85FVTfn879X5kforz32CL', + }, + { + value: '0x000000000000001e9e67108749f21184', + who: 'iUgUgeVx9WJBea7h8Mm1KGXxurf4UqQfjGVggJ9LfbsMHGy', + }, + { + value: '0x000000000000000d6d6ad68a401e50e9', + who: 'oGmCzvaoZgxV5eMbgVnu6KQACC9snRKttAp3V3obHH7Dc9r', + }, + { + value: '0x000000000000000014d14b817a75054c', + who: 'ks9is3t3uLnSHByPV6idmGVh74aeeABv9VS7g1hSYQBjZFt', + }, + { + value: '0x0000000000000096c96fada32bab79ca', + who: 'nGTjLceLvggC9rZw8mJ3AXSE19o7i7zsLEJkCz3TLNjXfAb', + }, + { + value: '0x0000000000000001ae015c352661f300', + who: 'mxZrFA4exCbd3gX77fMYT88L5S2buvcnne4CrQmjT5b3yDs', + }, + ], + own: '0x0000000000000000002386f262982729', + total: '0x0000000000181394a59fde1e31dea1c4', + }, + Gt6HqWBhdu4Sy1u8ASTbS1qf2Ac5gwdegwr8tWN8saMxPt5: { + others: [ + { + value: '0x0000000000000005a405328cbfd77c63', + who: 'mmhaivFqq2gPP6nMpbVoMtxz1H85FVTfn879X5kforz32CL', + }, + { + value: '0x000000000000001e9e67108749f21184', + who: 'iUgUgeVx9WJBea7h8Mm1KGXxurf4UqQfjGVggJ9LfbsMHGy', + }, + { + value: '0x000000000000000d6d6ad68a401e50e9', + who: 'oGmCzvaoZgxV5eMbgVnu6KQACC9snRKttAp3V3obHH7Dc9r', + }, + { + value: '0x000000000000000014d14b817a75054c', + who: 'ks9is3t3uLnSHByPV6idmGVh74aeeABv9VS7g1hSYQBjZFt', + }, + { + value: '0x0000000000000096c96fada32bab79ca', + who: 'nGTjLceLvggC9rZw8mJ3AXSE19o7i7zsLEJkCz3TLNjXfAb', + }, + { + value: '0x0000000000000001ae015c352661f300', + who: 'mxZrFA4exCbd3gX77fMYT88L5S2buvcnne4CrQmjT5b3yDs', + }, + ], + own: '0x0000000000000000002386f262982729', + total: '0x0000000000181394a59fde1e31dea1c4', + }, + JKmFAAo9QbR9w3cfSYxk7zdpNEXaN1XbX4NcMU1okAdpwYx: { + others: [ + { + value: '0x0000000000000005a405328cbfd77c63', + who: 'mmhaivFqq2gPP6nMpbVoMtxz1H85FVTfn879X5kforz32CL', + }, + { + value: '0x000000000000001e9e67108749f21184', + who: 'iUgUgeVx9WJBea7h8Mm1KGXxurf4UqQfjGVggJ9LfbsMHGy', + }, + { + value: '0x000000000000000d6d6ad68a401e50e9', + who: 'oGmCzvaoZgxV5eMbgVnu6KQACC9snRKttAp3V3obHH7Dc9r', + }, + { + value: '0x000000000000000014d14b817a75054c', + who: 'ks9is3t3uLnSHByPV6idmGVh74aeeABv9VS7g1hSYQBjZFt', + }, + { + value: '0x0000000000000096c96fada32bab79ca', + who: 'nGTjLceLvggC9rZw8mJ3AXSE19o7i7zsLEJkCz3TLNjXfAb', + }, + { + value: '0x0000000000000001ae015c352661f300', + who: 'mxZrFA4exCbd3gX77fMYT88L5S2buvcnne4CrQmjT5b3yDs', + }, + ], + own: '0x0000000000000000002386f262982729', + total: '0x0000000000181394a59fde1e31dea1c4', + }, + }; + return validators[accountId]; + }, + 'stakers.keysAt': async () => { + const validators = [ + { + args: ['', 'mmhaivFqq2gPP6nMpbVoMtxz1H85FVTfn879X5kforz32CL'], + }, + { + args: ['', 'iUgUgeVx9WJBea7h8Mm1KGXxurf4UqQfjGVggJ9LfbsMHGy'], + }, + ]; + return validators; + }, + 'stakers.at': async () => { + return { + others: [ + { + value: '0x0000000000000005a405328cbfd77c63', + who: 'mmhaivFqq2gPP6nMpbVoMtxz1H85FVTfn879X5kforz32CL', + }, + { + value: '0x000000000000001e9e67108749f21184', + who: 'iUgUgeVx9WJBea7h8Mm1KGXxurf4UqQfjGVggJ9LfbsMHGy', + }, + { + value: '0x000000000000000d6d6ad68a401e50e9', + who: 'oGmCzvaoZgxV5eMbgVnu6KQACC9snRKttAp3V3obHH7Dc9r', + }, + { + value: '0x000000000000000014d14b817a75054c', + who: 'ks9is3t3uLnSHByPV6idmGVh74aeeABv9VS7g1hSYQBjZFt', + }, + { + value: '0x0000000000000096c96fada32bab79ca', + who: 'nGTjLceLvggC9rZw8mJ3AXSE19o7i7zsLEJkCz3TLNjXfAb', + }, + { + value: '0x0000000000000001ae015c352661f300', + who: 'mxZrFA4exCbd3gX77fMYT88L5S2buvcnne4CrQmjT5b3yDs', + }, + ], + own: '0x0000000000000000002386f262982729', + total: '0x0000000000181394a59fde1e31dea1c4', + }; + }, + 'currentEraPointsEarned.at': async () => { + const eraPoints = { + total: 10, + individual: [5, 5], + }; + return eraPoints; + }, + 'erasRewardPoints.at': async () => { + const total = 10; + const registry = new TypeRegistry(); + const validators = [ + 'GweeXog8vdnDhjiBCLVvbE4NA4CPTFS3pdFFAFwgZzpUzKu', + 'mmhaivFqq2gPP6nMpbVoMtxz1H85FVTfn879X5kforz32CL', + ]; + const individual = [5, 5]; + + const eraPoints = registry.createType('EraRewardPoints', { + individual: new Map( + individual + .map((points) => registry.createType('RewardPoint', points)) + .map((points, index): [AccountId, RewardPoint] => [ + (validators[index] as unknown) as AccountId, + points, + ]) + ), + total, + }); + return eraPoints; + }, + 'payee.at': async () => 'staked', + currentEra: async () => + constructOption((new BN(12) as unknown) as BN & Codec), + 'currentEra.at': async () => + constructOption((new BN(12) as unknown) as BN & Codec), + 'currentIndex.at': async () => new BN(12), + concurrentReportsIndex: async () => (['0x00'] as unknown) as Vec, + 'reports.multi': async () => + (offenceDetails as unknown) as Option[], + bonded: async (stash) => + stash !== 'alice-stash' + ? constructOption() + : constructOption(('alice' as unknown) as AccountId), + 'bonded.at': async (hash, stash) => + stash !== 'alice-stash' + ? constructOption() + : constructOption(('alice' as unknown) as AccountId), + publicProps: async () => + ([ + [1, 'hash1', 'charlie'], + [2, 'hash2', 'dave'], + ] as unknown) as Vec>, + referendumInfoOf: async (idx) => + +idx === 1 + ? constructOption(({ + end: 20, + proposalHash: 'hash', + threshold: 'Supermajorityapproval', + delay: 10, + } as unknown) as ReferendumInfoTo239) + : +idx === 2 + ? constructOption(({ + isOngoing: true, + isFinished: false, + asOngoing: { + end: 20, + proposalHash: 'hash', + threshold: 'Supermajorityapproval', + delay: 10, + tally: { + ayes: 100, + nays: 200, + turnout: 300, + }, + }, + asFinished: null, + } as unknown) as ReferendumInfo) + : constructOption(), + dispatchQueue: async () => + ([ + { index: 1, imageHash: 'hash1', at: 20 }, + { index: 2, imageHash: 'hash2', at: 30 }, + ] as unknown) as DeriveDispatch[], + treasuryProposals: async (idx) => + +idx !== 1 + ? constructOption() + : constructOption(({ + proposer: 'alice', + value: 1000, + beneficiary: 'bob', + bond: 2000, + } as unknown) as TreasuryProposal), + bounties: async () => + ([ + { + bounty: ({ + proposer: 'alice', + value: 50, + fee: 10, + curatorDeposit: 10, + bond: 10, + status: { + isActive: false, + isPendingPayout: false, + isProposed: true, + }, + } as unknown) as Bounty, + description: 'hello', + index: 0, + proposals: [], + }, + { + bounty: ({ + proposer: 'alice', + value: 50, + fee: 10, + curatorDeposit: 10, + bond: 10, + status: { + isActive: true, + isPendingPayout: false, + asActive: { + curator: 'bob', + updateDue: '999', + }, + }, + } as unknown) as Bounty, + description: 'hello', + index: 2, + proposals: [], + }, + { + bounty: ({ + proposer: 'alice', + value: 50, + fee: 10, + curatorDeposit: 10, + bond: 10, + status: { + isActive: false, + isPendingPayout: true, + asPendingPayout: { + curator: 'bob', + unlockAt: '9999', + beneficiary: 'dave', + }, + }, + } as unknown) as Bounty, + description: 'hello', + index: 3, + proposals: [], + }, + ] as unknown) as DeriveBounties, + voting: async (hash) => + hash.toString() !== 'hash' + ? constructOption() + : constructOption(({ + index: 1, + threshold: 3, + ayes: ['alice', 'bob'], + nays: ['charlie', 'dave'], + end: 100, + } as unknown) as Votes), + signalingProposalOf: async (hash) => + hash.toString() !== 'hash' + ? constructOption() + : constructOption({ + index: 1, + author: 'alice', + stage: 'Voting', + transition_time: 20, + title: 'title', + contents: 'contents', + vote_id: 101, + } as any), + voteRecords: async (voteId) => + +voteId !== 101 + ? constructOption() + : constructOption({ + data: { + tally_type: 'onePerson', + vote_type: 'binary', + }, + outcomes: [1, 2], + } as any), + preimage: async (hash) => + hash.toString() !== 'hash' + ? undefined + : (({ + at: 30, + balance: 1000, + proposal: { + section: 'section', + method: 'method', + args: ['arg1', 'arg2'], + }, + proposer: 'alice', + } as unknown) as DeriveProposalImage), + collectiveProposalOf: async (hash) => + hash.toString() !== 'hash' + ? constructOption() + : constructOption(({ + section: 'section', + method: 'method', + args: ['arg1', 'arg2'], + } as unknown) as Proposal), + identityOf: async (addr) => + constructOption(({ + info: { + display: new Data(new TypeRegistry(), { + Raw: stringToHex(`${addr}-display-name`), + }), + }, + judgements: [ + [0, constructIdentityJudgement(IdentityJudgement.KnownGood)], + [1, constructIdentityJudgement(IdentityJudgement.Erroneous)], + ], + } as unknown) as Registration), + registrars: async () => [ + constructOption(({ account: 'charlie' } as unknown) as RegistrarInfo), + constructOption(({ account: 'dave' } as unknown) as RegistrarInfo), + ], + tips: async () => + constructOption(({ + reason: 'reasonHash', + who: 'alice', + finder: 'bob', + deposit: '1000', + closes: constructOption('123' as any), + findersFee: { + valueOf: () => true, + }, + } as unknown) as Option), + tipReasons: async () => + constructOption((stringToHex('hello world!') as unknown) as Bytes), +}); + +class FakeEventData extends Array { + public readonly typeDef: TypeDef[]; + + constructor(typeDef: string[], ...values) { + super(...values); + this.typeDef = typeDef.map((type) => ({ type })) as TypeDef[]; + } +} + +const constructEvent = ( + data: any[], + section = '', + typeDef: string[] = [] +): Event => { + return { + data: new FakeEventData(typeDef, ...data), + section, + } as Event; +}; + +const constructExtrinsic = (signer: string, args: any[] = []): Extrinsic => { + return ({ + signer, + args, + data: new Uint8Array(), + } as unknown) as Extrinsic; +}; + +const constructBool = (b: boolean): bool => { + return { isTrue: b === true, isFalse: b === false, isEmpty: false } as bool; +}; + +/* eslint-disable: dot-notation */ +describe('Edgeware Event Enricher Filter Tests', () => { + it('should enrich balance-transfer event to everyone without config', async () => { + const kind = EventKind.BalanceTransfer; + const event = constructEvent(['alice', 'bob', new BN('1001')], 'balances', [ + 'AccountId', + 'AccountId', + 'Balance', + ]); + + // publicly emit all transfers + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice', 'bob'], + network: SupportedNetwork.Substrate, + data: { + kind, + sender: 'alice', + dest: 'bob', + value: '1001', + }, + }); + }); + it('should enrich balance-transfer event with threshold 0 to everyone', async () => { + const kind = EventKind.BalanceTransfer; + const event = constructEvent(['alice', 'bob', new BN('10')], 'balances', [ + 'AccountId', + 'AccountId', + 'Balance', + ]); + + // publicly emit all transfers + const result = await Enrich(api, blockNumber, kind, event, { + balanceTransferThresholdPermill: 0, + }); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice', 'bob'], + network: SupportedNetwork.Substrate, + data: { + kind, + sender: 'alice', + dest: 'bob', + value: '10', + }, + }); + }); + it('should enrich large balance-transfer event to everyone with config', async () => { + const kind = EventKind.BalanceTransfer; + const event = constructEvent(['alice', 'bob', new BN('1001')], 'balances', [ + 'AccountId', + 'AccountId', + 'Balance', + ]); + + // only publicly emit transfers > 1_000 + const result = await Enrich(api, blockNumber, kind, event, { + balanceTransferThresholdPermill: 1_000, + }); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice', 'bob'], + network: SupportedNetwork.Substrate, + data: { + kind, + sender: 'alice', + dest: 'bob', + value: '1001', + }, + }); + }); + it('should not enrich small balance-transfer event to anyone with config', async () => { + const kind = EventKind.BalanceTransfer; + const event = constructEvent(['alice', 'bob', new BN('999')], 'balances', [ + 'AccountId', + 'AccountId', + 'Balance', + ]); + + // only publicly emit transfers > 1_000 + const result = await Enrich(api, blockNumber, kind, event, { + balanceTransferThresholdPermill: 1_000, + }); + assert.deepEqual(result, null); + }); + it('should enrich new-session event', async () => { + // TODO + }); + /** staking events */ + it('should enrich edgeware/old reward event', async () => { + const kind = EventKind.Reward; + const event = constructEvent([10000, 5], 'staking', ['Balance', 'Balance']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + amount: '10000', + }, + }); + }); + it('should enrich new reward event', async () => { + const kind = EventKind.Reward; + const event = constructEvent(['Alice', 10000], 'staking', [ + 'AccountId', + 'Balance', + ]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + includeAddresses: ['Alice'], + network: SupportedNetwork.Substrate, + data: { + kind, + validator: 'Alice', + amount: '10000', + }, + }); + }); + it('should enrich slash event', async () => { + const kind = EventKind.Slash; + const event = constructEvent(['Alice', 10000]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + includeAddresses: ['Alice'], + network: SupportedNetwork.Substrate, + data: { + kind, + validator: 'Alice', + amount: '10000', + }, + }); + }); + it('should enrich bonded event', async () => { + const kind = EventKind.Bonded; + const event = constructEvent(['alice-stash', 10000]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + includeAddresses: ['alice-stash'], + network: SupportedNetwork.Substrate, + data: { + kind, + stash: 'alice-stash', + amount: '10000', + controller: 'alice', + }, + }); + }); + it('should enrich unbonded event', async () => { + const kind = EventKind.Unbonded; + const event = constructEvent(['alice-stash', 10000]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + includeAddresses: ['alice-stash'], + network: SupportedNetwork.Substrate, + data: { + kind, + stash: 'alice-stash', + amount: '10000', + controller: 'alice', + }, + }); + }); + it('should enrich staking-election event', async () => { + const kind = EventKind.StakingElection; + const event = constructEvent([]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + era: 5, + validators: [ + 'EXkCSUQ6Z1hKvGWMNkUDKrTMVHRduQHWc8G6vgo4NccUmhU', + 'FnWdLnFhRuphztWJJLoNV4zc18dBsjpaAMboPLhLdL7zZp3', + 'EZ7uBY7ZLohavWAugjTSUVVSABLfad77S6RQf4pDe3cV9q4', + 'GweeXog8vdnDhjiBCLVvbE4NA4CPTFS3pdFFAFwgZzpUzKu', + 'DbuPiksDXhFFEWgjsEghUypTJjQKyULiNESYji3Gaose2NV', + 'Gt6HqWBhdu4Sy1u8ASTbS1qf2Ac5gwdegwr8tWN8saMxPt5', + 'JKmFAAo9QbR9w3cfSYxk7zdpNEXaN1XbX4NcMU1okAdpwYx', + ], + }, + }); + }); + + /** democracy events */ + it('should enrich vote-delegated event', async () => { + const kind = EventKind.VoteDelegated; + const event = constructEvent(['delegator', 'target']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + includeAddresses: ['target'], + network: SupportedNetwork.Substrate, + data: { + kind, + who: 'delegator', + target: 'target', + }, + }); + }); + it('should enrich democracy-proposed event', async () => { + const kind = EventKind.DemocracyProposed; + const event = constructEvent(['1', 1000]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['charlie'], + network: SupportedNetwork.Substrate, + data: { + kind, + proposalIndex: 1, + proposalHash: 'hash1', + deposit: '1000', + proposer: 'charlie', + }, + }); + }); + it('should enrich democracy-seconded event', async () => { + const kind = EventKind.DemocracySeconded; + const extrinsic = constructExtrinsic('alice', ['1']); + const result = await Enrich(api, blockNumber, kind, extrinsic); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice'], + network: SupportedNetwork.Substrate, + data: { + kind, + proposalIndex: 1, + who: 'alice', + }, + }); + }); + it('should enrich democracy-tabled event', async () => { + const kind = EventKind.DemocracyTabled; + const event = constructEvent(['1', 1000]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalIndex: 1, + }, + }); + }); + it('should enrich old edgeware democracy-started event', async () => { + const kind = EventKind.DemocracyStarted; + const event = constructEvent(['1', 'Supermajorityapproval']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + referendumIndex: 1, + proposalHash: 'hash', + voteThreshold: 'Supermajorityapproval', + endBlock: 20, + }, + }); + }); + it('should enrich new kusama democracy-started event', async () => { + const kind = EventKind.DemocracyStarted; + const event = constructEvent(['2', 'Supermajorityapproval']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + referendumIndex: 2, + proposalHash: 'hash', + voteThreshold: 'Supermajorityapproval', + endBlock: 20, + }, + }); + }); + it('should enrich new democracy-voted event', async () => { + const kind = EventKind.DemocracyVoted; + const extrinsic = constructExtrinsic('alice', [ + '1', + constructAccountVote(true, 3, '100000'), + ]); + const result = await Enrich(api, blockNumber, kind, extrinsic); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice'], + network: SupportedNetwork.Substrate, + data: { + kind, + referendumIndex: 1, + who: 'alice', + balance: '100000', + isAye: true, + conviction: 3, + }, + }); + }); + it('should not enrich democracy-voted event with split vote', (done) => { + const kind = EventKind.DemocracyVoted; + const extrinsic = constructExtrinsic('alice', [ + '1', + constructAccountVote(true, 3, '100000', true), + ]); + Enrich(api, blockNumber, kind, extrinsic) + .then(() => done(new Error('should not permit split vote'))) + .catch(() => done()); + }); + it('should enrich democracy-passed event', async () => { + const kind = EventKind.DemocracyPassed; + const event = constructEvent(['1']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + referendumIndex: 1, + dispatchBlock: 20, + }, + }); + }); + it('should enrich democracy-not-passed event', async () => { + const kind = EventKind.DemocracyNotPassed; + const event = constructEvent(['1']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + referendumIndex: 1, + }, + }); + }); + it('should enrich democracy-cancelled event', async () => { + const kind = EventKind.DemocracyCancelled; + const event = constructEvent(['1']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + referendumIndex: 1, + }, + }); + }); + it('should enrich democracy-executed event', async () => { + const kind = EventKind.DemocracyExecuted; + const event = constructEvent(['1', constructBool(false)]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + referendumIndex: 1, + executionOk: false, + }, + }); + }); + + /** preimage events */ + it('should enrich preimage-noted event', async () => { + const kind = EventKind.PreimageNoted; + const event = constructEvent(['hash', 'alice', 100]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice'], + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'hash', + noter: 'alice', + preimage: { + method: 'method', + section: 'section', + args: ['arg1', 'arg2'], + }, + }, + }); + }); + it('should enrich preimage-used event', async () => { + const kind = EventKind.PreimageUsed; + const event = constructEvent(['hash', 'alice', 100]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'hash', + noter: 'alice', + }, + }); + }); + it('should enrich preimage-invalid event', async () => { + const kind = EventKind.PreimageInvalid; + const event = constructEvent(['hash', '1']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'hash', + referendumIndex: 1, + }, + }); + }); + it('should enrich preimage-missing event', async () => { + const kind = EventKind.PreimageMissing; + const event = constructEvent(['hash', '1']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'hash', + referendumIndex: 1, + }, + }); + }); + it('should enrich preimage-reaped event', async () => { + const kind = EventKind.PreimageReaped; + const event = constructEvent(['hash', 'alice', 100, 'bob']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['bob'], + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'hash', + noter: 'alice', + reaper: 'bob', + }, + }); + }); + + /** tip events */ + it('should enrich new-tip event', async () => { + const kind = EventKind.NewTip; + const event = constructEvent(['tip-hash']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'tip-hash', + reason: 'hello world!', + who: 'alice', + finder: 'bob', + deposit: '1000', + findersFee: true, + }, + }); + }); + it('should enrich tip-voted event', async () => { + const kind = EventKind.TipVoted; + const extrinsic = constructExtrinsic('bob', ['tip-hash', '100']); + const result = await Enrich(api, blockNumber, kind, extrinsic); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'tip-hash', + who: 'bob', + value: '100', + }, + }); + }); + it('should enrich tip-closing event', async () => { + const kind = EventKind.TipClosing; + const event = constructEvent(['tip-hash']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'tip-hash', + closing: 123, + }, + }); + }); + it('should enrich tip-closed event', async () => { + const kind = EventKind.TipClosed; + const event = constructEvent(['tip-hash', 'charlie', '123']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'tip-hash', + who: 'charlie', + payout: '123', + }, + }); + }); + it('should enrich tip-retracted event', async () => { + const kind = EventKind.TipRetracted; + const event = constructEvent(['tip-hash']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'tip-hash', + }, + }); + }); + it('should enrich tip-slashed event', async () => { + const kind = EventKind.TipSlashed; + const event = constructEvent(['tip-hash', 'dave', '111']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'tip-hash', + finder: 'dave', + deposit: '111', + }, + }); + }); + + /** treasury events */ + it('should enrich treasury-proposed event', async () => { + const kind = EventKind.TreasuryProposed; + const event = constructEvent(['1']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice'], + network: SupportedNetwork.Substrate, + data: { + kind, + proposalIndex: 1, + proposer: 'alice', + value: '1000', + beneficiary: 'bob', + bond: '2000', + }, + }); + }); + it('should enrich treasury-awarded event', async () => { + const kind = EventKind.TreasuryAwarded; + const event = constructEvent(['1', 1000, 'bob']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalIndex: 1, + value: '1000', + beneficiary: 'bob', + }, + }); + }); + it('should enrich treasury-rejected event', async () => { + const kind = EventKind.TreasuryRejected; + const event = constructEvent(['1', 100]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalIndex: 1, + }, + }); + }); + + /** bounty events */ + it('should enrich bounty-proposed event', async () => { + const kind = EventKind.TreasuryBountyProposed; + const event = constructEvent(['0', 100]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + bountyIndex: 0, + bond: '10', + curatorDeposit: '10', + fee: '10', + proposer: 'alice', + value: '50', + description: 'hello', + }, + }); + }); + + it('should enrich bounty-awarded event', async () => { + const kind = EventKind.TreasuryBountyAwarded; + const event = constructEvent(['3', 100]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + bountyIndex: 3, + beneficiary: '100', + curator: 'bob', + unlockAt: 9999, + }, + }); + }); + + it('should enrich bounty-rejected event', async () => { + const kind = EventKind.TreasuryBountyRejected; + const event = constructEvent(['1', 100]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + bountyIndex: 1, + bond: '100', + }, + }); + }); + + it('should enrich bounty-became-active event', async () => { + const kind = EventKind.TreasuryBountyBecameActive; + const event = constructEvent(['2']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + bountyIndex: 2, + curator: 'bob', + updateDue: 999, + }, + }); + }); + + it('should enrich bounty-claimed event', async () => { + const kind = EventKind.TreasuryBountyClaimed; + const beneficiary = 'alice'; + const event = constructEvent(['1', 100, beneficiary]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + bountyIndex: 1, + beneficiary, + payout: '100', + }, + }); + }); + + it('should enrich bounty-canceled event', async () => { + const kind = EventKind.TreasuryBountyCanceled; + const event = constructEvent(['1']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + bountyIndex: 1, + }, + }); + }); + + it('should enrich bounty-extended event', async () => { + const kind = EventKind.TreasuryBountyExtended; + const event = constructExtrinsic('alice', ['1', stringToHex('remark')]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + bountyIndex: 1, + remark: 'remark', + }, + }); + }); + + /** elections events */ + it('should enrich election-new-term event', async () => { + const kind = EventKind.ElectionNewTerm; + const event = constructEvent([ + [ + ['alice', 10], + ['bob', 20], + ], + ]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + round: 10, + newMembers: ['alice', 'bob'], + allMembers: ['dave', 'charlie', 'eve'], + }, + }); + }); + it('should enrich election-empty-term event', async () => { + const kind = EventKind.ElectionEmptyTerm; + const event = constructEvent([]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + round: 10, + members: ['dave', 'charlie', 'eve'], + }, + }); + }); + it('should enrich election-candidacy-submitted event', async () => { + const kind = EventKind.ElectionCandidacySubmitted; + const extrinsic = constructExtrinsic('alice'); + const result = await Enrich(api, blockNumber, kind, extrinsic); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice'], + network: SupportedNetwork.Substrate, + data: { + kind, + round: 10, + candidate: 'alice', + }, + }); + }); + it('should enrich election-member-kicked event', async () => { + const kind = EventKind.ElectionMemberKicked; + const event = constructEvent(['alice']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + who: 'alice', + }, + }); + }); + it('should enrich election-member-renounced event', async () => { + const kind = EventKind.ElectionMemberRenounced; + const event = constructEvent(['alice']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + who: 'alice', + }, + }); + }); + + /** collective events */ + it('should enrich collective-proposed event', async () => { + const kind = EventKind.CollectiveProposed; + const event = constructEvent(['alice', '1', 'hash', '3'], 'council'); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice'], + network: SupportedNetwork.Substrate, + data: { + kind, + collectiveName: 'council', + proposer: 'alice', + proposalIndex: 1, + proposalHash: 'hash', + threshold: 3, + call: { + method: 'method', + section: 'section', + args: ['arg1', 'arg2'], + }, + }, + }); + }); + it('should enrich collective-voted event', async () => { + const kind = EventKind.CollectiveVoted; + const event = constructEvent( + ['alice', 'hash', constructBool(true), '1', '0'], + 'council' + ); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice'], + network: SupportedNetwork.Substrate, + data: { + kind, + collectiveName: 'council', + proposalHash: 'hash', + voter: 'alice', + vote: true, + }, + }); + }); + it('should enrich collective-approved event', async () => { + const kind = EventKind.CollectiveApproved; + const event = constructEvent(['hash'], 'council'); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + collectiveName: 'council', + proposalHash: 'hash', + }, + }); + }); + it('should enrich collective-disapproved event', async () => { + const kind = EventKind.CollectiveDisapproved; + const event = constructEvent(['hash'], 'council'); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + collectiveName: 'council', + proposalHash: 'hash', + }, + }); + }); + it('should enrich collective-executed event', async () => { + const kind = EventKind.CollectiveExecuted; + const event = constructEvent(['hash', constructBool(true)], 'council'); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + collectiveName: 'council', + proposalHash: 'hash', + executionOk: true, + }, + }); + }); + it('should enrich collective-member-executed event', async () => { + const kind = EventKind.CollectiveExecuted; + const event = constructEvent(['hash', constructBool(false)], 'council'); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + collectiveName: 'council', + proposalHash: 'hash', + executionOk: false, + }, + }); + }); + + /** signaling events */ + it('should enrich signaling-new-proposal event', async () => { + const kind = EventKind.SignalingNewProposal; + const event = constructEvent(['alice', 'hash']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice'], + network: SupportedNetwork.Substrate, + data: { + kind, + proposer: 'alice', + proposalHash: 'hash', + voteId: '101', + title: 'title', + description: 'contents', + tallyType: 'onePerson', + voteType: 'binary', + choices: ['1', '2'], + }, + }); + }); + it('should enrich signaling-commit-started event', async () => { + const kind = EventKind.SignalingCommitStarted; + const event = constructEvent(['hash', '101', '20']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'hash', + voteId: '101', + endBlock: 20, + }, + }); + }); + it('should enrich signaling-voting-started event', async () => { + const kind = EventKind.SignalingVotingStarted; + const event = constructEvent(['hash', '101', '20']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'hash', + voteId: '101', + endBlock: 20, + }, + }); + }); + it('should enrich signaling-voting-completed event', async () => { + const kind = EventKind.SignalingVotingCompleted; + const event = constructEvent(['hash', '101']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + proposalHash: 'hash', + voteId: '101', + }, + }); + }); + + /** TreasuryReward events */ + it('should enrich treasury-reward-minted-v1 event', async () => { + const kind = EventKind.TreasuryRewardMinting; + const event = constructEvent([1000, 100, 10]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + pot: '1000', + reward: '100', + }, + }); + }); + it('should enrich treasury-reward-minted-v2 event', async () => { + const kind = EventKind.TreasuryRewardMintingV2; + const event = constructEvent([1000, 10, 'pot']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + pot: '1000', + potAddress: 'pot', + }, + }); + }); + + /** Identity events */ + it('should enrich identity-set event', async () => { + const kind = EventKind.IdentitySet; + const event = constructEvent(['alice']); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice'], + network: SupportedNetwork.Substrate, + data: { + kind, + who: 'alice', + displayName: 'alice-display-name', + judgements: [ + ['charlie', IdentityJudgement.KnownGood], + ['dave', IdentityJudgement.Erroneous], + ], + }, + }); + }); + it('should enrich identity-judgment-given event', async () => { + const kind = EventKind.JudgementGiven; + const event = constructEvent(['alice', 1]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + who: 'alice', + registrar: 'dave', + judgement: IdentityJudgement.Erroneous, + }, + }); + }); + it('should enrich identity-cleared event', async () => { + const kind = EventKind.IdentityCleared; + const event = constructEvent(['alice', 1000]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + excludeAddresses: ['alice'], + network: SupportedNetwork.Substrate, + data: { + kind, + who: 'alice', + }, + }); + }); + it('should enrich identity-killed event', async () => { + const kind = EventKind.IdentityKilled; + const event = constructEvent(['alice', 1000]); + const result = await Enrich(api, blockNumber, kind, event); + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + who: 'alice', + }, + }); + }); + /** offences events */ + it('should enrich new offence event', async () => { + const kind = EventKind.Offence; + const event = constructEvent( + ['offline', '10000', constructBool(true), offenceDetails], + 'offences', + ['Kind', 'OpaqueTimeSlot', 'bool', 'Option[]'] + ); + const result = await Enrich(api, blockNumber, kind, event); + + assert.deepEqual(result, { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind, + offenceKind: 'offline', + opaqueTimeSlot: '10000', + applied: constructBool(true).isTrue, + offenders: ['charlie'], + }, + }); + }); + /** other */ + it('should not enrich invalid event', (done) => { + const kind = 'invalid-event' as EventKind; + const event = constructEvent([]); + Enrich(api, blockNumber, kind, event) + .then(() => done(new Error('should not permit invalid event'))) + .catch(() => done()); + }); + it('should not enrich with invalid API query', (done) => { + const kind = EventKind.Bonded; + const event = constructEvent(['alice-not-stash', 10000]); + Enrich(api, blockNumber, kind, event) + .then(() => done(new Error('should not permit invalid API result'))) + .catch(() => done()); + }); +}); diff --git a/packages/chain-events/test/unit/substrate/listener.spec.ts b/packages/chain-events/test/unit/substrate/listener.spec.ts new file mode 100644 index 00000000000..7fbfc61972b --- /dev/null +++ b/packages/chain-events/test/unit/substrate/listener.spec.ts @@ -0,0 +1,152 @@ +import * as events from 'events'; + +import * as chai from 'chai'; +import { ApiPromise } from '@polkadot/api'; + +import { + Poller, + Processor, + StorageFetcher, + Subscriber, + Listener, +} from '../../../src/chains/substrate'; +import { networkUrls } from '../../../scripts/listenerUtils'; +import { TestHandler } from '../../util'; + +const { assert } = chai; + +describe.skip('Substrate listener class tests', () => { + let listener; + const handlerEmitter = new events.EventEmitter(); + + it('should create the substrate listener', () => { + listener = new Listener( + 'polkadot', + networkUrls.polkadot, + {}, + false, + 0, + true, + {}, + false + ); + assert.equal(listener.chain, 'polkadot'); + assert.deepEqual(listener.options, { + archival: false, + startBlock: 0, + url: networkUrls.polkadot, + spec: {}, + skipCatchup: true, + enricherConfig: {}, + }); + assert.equal(listener.subscribed, false); + assert.equal(listener._verbose, false); + }); + + it('should initialize the substrate listener class', async () => { + await listener.init(); + assert( + listener._subscriber instanceof Subscriber, + 'Subscriber should be initialized' + ); + assert(listener._poller instanceof Poller, 'Poller should be initialized'); + assert( + listener.storageFetcher instanceof StorageFetcher, + 'StorageFetcher should be initialized' + ); + assert( + listener._processor instanceof Processor, + 'Processor should be initialized' + ); + assert(listener._api instanceof ApiPromise, 'Api should be initialized'); + }); + + it('should add a handler', async () => { + listener.eventHandlers.TestHandler = { + handler: new TestHandler(listener._verbose, handlerEmitter), + excludedEvents: [], + }; + + assert(listener.eventHandlers.TestHandler.handler instanceof TestHandler); + }); + + it('should subscribe the listener to the specified chain', async () => { + await listener.subscribe(); + assert.equal(listener.subscribed, true); + }); + + it('should verify that the handler handled an event successfully', (done) => { + let counter = 0; + + // after 10 seconds with no event received use storage fetcher to verify api/connection + const timeoutHandler = setTimeout(() => { + // handlerEmitter.removeAllListeners(); + const startBlock = 6435620; + + listener.storageFetcher.fetch({ startBlock }).then((es) => { + if (es.length > 0) done(); + else assert.fail('No event received and storage handler failed'); + }); + }, 20000); + + const verifyHandler = () => { + assert(listener.eventHandlers.TestHandler.handler.counter >= 1); + ++counter; + if (counter === 1) { + clearTimeout(timeoutHandler); + done(); + } + }; + handlerEmitter.on('eventHandled', verifyHandler); + }).timeout(50000); + + it('should update the chain spec', async () => { + await listener.updateSpec({ randomSpec: 0 }); + assert.deepEqual(listener._options.spec, { randomSpec: 0 }); + }); + + it('should verify that the handler handled an event successfully after changing specs', (done) => { + let counter = 0; + // after 10 seconds with no event received use storage fetcher to verify api/connection + const timeoutHandler = setTimeout(() => { + // handlerEmitter.removeAllListeners(); + const startBlock = 6435620; + + listener.storageFetcher.fetch({ startBlock }).then((es) => { + if (es.length > 0) done(); + else assert.fail('No event received and storage handler failed'); + }); + }, 20000); + + const verifyHandler = () => { + assert(listener.eventHandlers.TestHandler.handler.counter >= 1); + ++counter; + if (counter === 1) { + clearTimeout(timeoutHandler); + done(); + } + }; + handlerEmitter.on('eventHandled', verifyHandler); + }).timeout(50000); + + xit('should verify that the handler handled an event successfully after changing urls', () => { + assert(listener.eventHandlers.TestHandler.handler.counter >= 1); + listener.eventHandlers.TestHandler.handler.counter = 0; + }); + + it('should unsubscribe from the chain', async () => { + listener.unsubscribe(); + assert.equal(listener.subscribed, false); + }); + + it('should return the updated options', async () => { + assert.deepEqual(listener.options, { + archival: false, + startBlock: 0, + url: networkUrls.polkadot, + spec: { randomSpec: 0 }, + skipCatchup: true, + enricherConfig: {}, + }); + }); +}); diff --git a/packages/chain-events/test/unit/substrate/poller.spec.ts b/packages/chain-events/test/unit/substrate/poller.spec.ts new file mode 100755 index 00000000000..e211cfd273a --- /dev/null +++ b/packages/chain-events/test/unit/substrate/poller.spec.ts @@ -0,0 +1,176 @@ +import chai from 'chai'; +import { + Hash, + EventRecord, + Header, + RuntimeVersion, +} from '@polkadot/types/interfaces'; + +import { Poller } from '../../../src/chains/substrate/poller'; + +import { constructFakeApi } from './testUtil'; + +const { assert } = chai; + +// we need a number that implements "isEmpty" when 0, to align with +// the Substrate Hash's interface +class IMockHash extends Number { + get isEmpty(): boolean { + return this.valueOf() === 0; + } +} + +const hashNums: number[] = [...Array(10).keys()].map((i) => (i < 5 ? 0 : i)); +const hashes = (hashNums.map((n) => new IMockHash(n)) as unknown) as Hash[]; +const headers: Header[] = hashNums.map((hash) => { + if (hash === 0) { + return undefined; + } + return ({ + parentHash: hash - 1, + number: 100 + hash, + hash, + } as unknown) as Header; +}); + +const events = { + 6: ([{ event: { data: [1] } }] as unknown) as EventRecord[], + 8: ([ + { event: { data: [2] } }, + { event: { data: [3, 4] } }, + ] as unknown) as EventRecord[], +}; + +const getMockApi = () => { + return constructFakeApi({ + getHeader: async (hash?: Hash) => { + if (hash === undefined) { + hash = hashes[hashes.length - 1]; + } + return headers[(hash as unknown) as number]; + }, + 'events.at': (hash: Hash) => { + return events[(hash as unknown) as number] || []; + }, + getBlockHash: async (blockNumber: number) => { + if (blockNumber === 2600 || blockNumber === 2400) { + return hashes[5]; + } + if (blockNumber >= 100 && blockNumber <= 110) { + return hashes[blockNumber - 100]; + } + return new IMockHash(0); + }, + getBlock: async () => { + return { + block: { + extrinsics: [], + }, + }; + }, + getRuntimeVersion: async () => { + return ({ + specVersion: 10, + specName: 'edgeware', + } as unknown) as RuntimeVersion; + }, + }); +}; + +/* eslint-disable: dot-notation */ +describe('Edgeware Event Poller Tests', () => { + it('should return block data', async () => { + // setup mock data + const api = getMockApi(); + // setup test class + const poller = new Poller(api); + + // run test + const blocks = await poller.poll({ startBlock: 105, endBlock: 108 }); + assert.lengthOf(blocks, 3); + assert.equal(+blocks[0].header.number, 105); + assert.deepEqual(blocks[0].events, []); + assert.equal(blocks[0].versionNumber, 10); + assert.equal(blocks[0].versionName, 'edgeware'); + assert.equal(+blocks[1].header.number, 106); + assert.deepEqual(blocks[1].events, events[6]); + assert.equal(blocks[1].versionNumber, 10); + assert.equal(blocks[1].versionName, 'edgeware'); + assert.equal(+blocks[2].header.number, 107); + assert.deepEqual(blocks[2].events, []); + assert.equal(blocks[2].versionNumber, 10); + assert.equal(blocks[2].versionName, 'edgeware'); + }); + + it('should skip zeroed hashes', async () => { + // setup mock data + const api = getMockApi(); + + // setup test class + const poller = new Poller(api); + + // run test + const blocks = await poller.poll({ startBlock: 101, endBlock: 106 }); + assert.lengthOf(blocks, 1); + assert.equal(+blocks[0].header.number, 105); + assert.deepEqual(blocks[0].events, []); + assert.equal(blocks[0].versionNumber, 10); + assert.equal(blocks[0].versionName, 'edgeware'); + }); + + it('should derive endblock from header', async () => { + // setup mock data + const api = getMockApi(); + + // setup test class + const poller = new Poller(api); + + // run test + const blocks = await poller.poll({ startBlock: 107 }); + assert.lengthOf(blocks, 2); + assert.equal(+blocks[0].header.number, 107); + assert.deepEqual(blocks[0].events, []); + assert.equal(blocks[0].versionNumber, 10); + assert.equal(blocks[0].versionName, 'edgeware'); + assert.equal(+blocks[1].header.number, 108); + assert.deepEqual(blocks[1].events, events[8]); + assert.equal(blocks[1].versionNumber, 10); + assert.equal(blocks[1].versionName, 'edgeware'); + }); + + it('should not accept invalid start/end blocks', async () => { + // setup mock data + const api = getMockApi(); + + // setup test class + const poller = new Poller(api); + + assert.isEmpty( + await poller.poll({ + startBlock: 111, + }) + ); + assert.isEmpty( + await poller.poll({ + startBlock: 100, + endBlock: 99, + }) + ); + }); + + it('should reduce size of range if too large', async () => { + // setup mock data + const api = getMockApi(); + + // setup test class + const poller = new Poller(api); + + // run test + const blocks = await poller.poll({ startBlock: 100, endBlock: 3000 }); + assert.lengthOf(blocks, 1); + assert.equal(+blocks[0].header.number, 105); + assert.deepEqual(blocks[0].events, []); + assert.equal(blocks[0].versionNumber, 10); + assert.equal(blocks[0].versionName, 'edgeware'); + }); +}); diff --git a/packages/chain-events/test/unit/substrate/processor.spec.ts b/packages/chain-events/test/unit/substrate/processor.spec.ts new file mode 100644 index 00000000000..5beb90cd870 --- /dev/null +++ b/packages/chain-events/test/unit/substrate/processor.spec.ts @@ -0,0 +1,392 @@ +import chai from 'chai'; +import { Header, EventRecord, Extrinsic } from '@polkadot/types/interfaces'; +import BN from 'bn.js'; + +import { SupportedNetwork } from '../../../src'; +import { Processor } from '../../../src/chains/substrate/processor'; +import { EventKind, ISlash } from '../../../src/chains/substrate/types'; + +import { constructFakeApi } from './testUtil'; + +const { assert } = chai; + +interface IFakeEvent { + section: string; + method: string; + // eslint-disable-next-line @typescript-eslint/no-explicit-any + data: any; + phase?: { + isApplyExtrinsic: boolean; + asApplyExtrinsic: number; + }; +} + +const constructFakeBlock = ( + blockNumber: number, + events: IFakeEvent[], + extrinsics = [] +) => { + return { + header: ({ + hash: blockNumber, + number: blockNumber, + } as unknown) as Header, + events: events.map((event) => { + const phase = { ...event.phase }; + delete event.phase; + return ({ event, phase } as unknown) as EventRecord; + }), + versionNumber: 10, + versionName: 'edgeware', + extrinsics: extrinsics as Extrinsic[], + }; +}; + +describe('Edgeware Event Processor Tests', () => { + it('should process blocks into events', (done) => { + // setup fake data + const fakeEvents: IFakeEvent[] = [ + { + section: 'staking', + method: 'Slash', + data: ['Alice', '10000'], + }, + { + section: 'democracy', + method: 'Proposed', + data: ['4', '100000'], + }, + { + section: 'democracy', + method: 'Started', + data: ['5', 'Supermajorityapproval'], + phase: { + isApplyExtrinsic: true, + asApplyExtrinsic: 0, + }, + }, + { + section: 'system', + method: 'ExtrinsicSuccess', + data: [], + phase: { + isApplyExtrinsic: true, + asApplyExtrinsic: 0, + }, + }, + { + section: 'bounty', + method: 'BountyProposed', + data: ['1'], + }, + ]; + + const fakeExtrinsics = [ + { + method: { + section: 'elections', + method: 'submitCandidacy', + args: [], + }, + signer: 'Alice', + data: new Uint8Array(), + }, + ]; + + const fakeBlocks = [ + constructFakeBlock(1, fakeEvents.slice(0, 2)), + constructFakeBlock(2, fakeEvents.slice(2, 5), fakeExtrinsics), + ]; + + const api = constructFakeApi({ + publicProps: async () => { + return [[], [4, 'hash', 'Alice']]; + }, + electionRounds: async () => '5', + referendumInfoOf: async (idx) => { + if (+idx === 5) { + return { + isSome: true, + isNone: false, + unwrap: () => { + return { + proposalHash: 'hash', + voteThreshold: 'Supermajorityapproval', + end: 123, + delay: 20, + }; + }, + }; + } + throw new Error('bad referendum idx'); + }, + getBlockHash: async () => { + return 2; + }, + 'currentIndex.at': async () => new BN(12), + }); + + // run test + const processor = new Processor(api); + Promise.all(fakeBlocks.map((block) => processor.process(block))) + .then((results) => { + assert.equal(processor.lastBlockNumber, 2); + assert.deepEqual(results[0], [ + { + /* eslint-disable dot-notation */ + data: { + kind: EventKind.Slash, + validator: 'Alice', + amount: '10000', + } as ISlash, + blockNumber: 1, + network: SupportedNetwork.Substrate, + includeAddresses: ['Alice'], + }, + { + data: { + kind: EventKind.DemocracyProposed, + proposalIndex: 4, + proposalHash: 'hash', + deposit: '100000', + proposer: 'Alice', + }, + excludeAddresses: ['Alice'], + blockNumber: 1, + network: SupportedNetwork.Substrate, + }, + ]); + assert.deepEqual(results[1], [ + { + data: { + kind: EventKind.DemocracyStarted, + referendumIndex: 5, + proposalHash: 'hash', + voteThreshold: 'Supermajorityapproval', + endBlock: 123, + }, + blockNumber: 2, + network: SupportedNetwork.Substrate, + }, + { + data: { + kind: EventKind.ElectionCandidacySubmitted, + candidate: 'Alice', + round: 5, + }, + blockNumber: 2, + excludeAddresses: ['Alice'], + network: SupportedNetwork.Substrate, + }, + ]); + done(); + }) + .catch((err) => done(err)); + }); + + it('should process old and new versions differently', (done) => { + done(); + }); + + it('should fail gracefully to find a kind', (done) => { + // setup fake data + const fakeEvents: IFakeEvent[] = [ + { + section: 'staking', + method: 'Fake', + data: ['Alice', '10000'], + }, + ]; + + const block = constructFakeBlock(1, fakeEvents); + const api = constructFakeApi({}); + + // run test + const processor = new Processor(api); + processor.process(block).then((results) => { + try { + assert.equal(processor.lastBlockNumber, 1); + assert.deepEqual(results, []); + done(); + } catch (err) { + done(err); + } + }); + }); + + it('should fail gracefully to find an extrinsic', (done) => { + // setup fake data + const fakeEvents: IFakeEvent[] = [ + { + section: 'system', + method: 'ExtrinsicSuccess', + data: [], + phase: { + isApplyExtrinsic: true, + asApplyExtrinsic: 0, + }, + }, + ]; + const fakeExtrinsics = [ + { + method: { + section: 'elections', + method: 'submitBetterCandidacy', + args: [], + }, + signer: 'Alice', + data: new Uint8Array(), + }, + ]; + + const block = constructFakeBlock(1, fakeEvents, fakeExtrinsics); + const api = constructFakeApi({}); + + // run test + const processor = new Processor(api); + processor.process(block).then((results) => { + try { + assert.equal(processor.lastBlockNumber, 1); + assert.deepEqual(results, []); + done(); + } catch (err) { + done(err); + } + }); + }); + + it('should fail gracefully on invalid option during enrichment', (done) => { + // setup fake data + const fakeEvents: IFakeEvent[] = [ + { + section: 'staking', + method: 'Bonded', + data: ['Alice', '10000'], + }, + ]; + + const block = constructFakeBlock(1, fakeEvents); + + const api = constructFakeApi({ + bonded: async () => { + return { + isNone: true, + isEmpty: true, + isSome: false, + value: null, + unwrap: () => { + throw new Error('no value'); + }, + }; + }, + }); + + const processor = new Processor(api); + processor.process(block).then((results) => { + try { + assert.equal(processor.lastBlockNumber, 1); + assert.deepEqual(results, []); + done(); + } catch (err) { + done(err); + } + }); + }); + + it('should fail gracefully on invalid api call during enrichment', (done) => { + // setup fake data + const fakeEvents: IFakeEvent[] = [ + { + section: 'staking', + method: 'Bonded', + data: ['Alice', '10000'], + }, + ]; + + const block = constructFakeBlock(1, fakeEvents); + const api = constructFakeApi({}); + + const processor = new Processor(api); + processor.process(block).then((results) => { + try { + assert.equal(processor.lastBlockNumber, 1); + assert.deepEqual(results, []); + done(); + } catch (err) { + done(err); + } + }); + }); + + it('should ignore failed extrinsics', (done) => { + // setup fake data + const fakeEvents: IFakeEvent[] = [ + { + section: 'system', + method: 'ExtrinsicFailed', + data: [], + phase: { + isApplyExtrinsic: true, + asApplyExtrinsic: 0, + }, + }, + ]; + + const fakeExtrinsics = [ + { + method: { + section: 'elections', + method: 'submitCandidacy', + args: [], + }, + signer: 'Alice', + data: new Uint8Array(), + }, + ]; + + const block = constructFakeBlock(1, fakeEvents, fakeExtrinsics); + const api = constructFakeApi({}); + + const processor = new Processor(api); + processor.process(block).then((results) => { + try { + assert.equal(processor.lastBlockNumber, 1); + assert.deepEqual(results, []); + done(); + } catch (err) { + done(err); + } + }); + }); + + it('should ignore extrinsics with no success or failed events', (done) => { + // setup fake data + const fakeEvents: IFakeEvent[] = []; + + const fakeExtrinsics = [ + { + method: { + section: 'elections', + method: 'submitCandidacy', + args: [], + }, + signer: 'Alice', + data: new Uint8Array(), + }, + ]; + + const block = constructFakeBlock(1, fakeEvents, fakeExtrinsics); + const api = constructFakeApi({}); + + const processor = new Processor(api); + processor.process(block).then((results) => { + try { + assert.equal(processor.lastBlockNumber, 1); + assert.deepEqual(results, []); + done(); + } catch (err) { + done(err); + } + }); + }); +}); diff --git a/packages/chain-events/test/unit/substrate/storageFetcher.spec.ts b/packages/chain-events/test/unit/substrate/storageFetcher.spec.ts new file mode 100644 index 00000000000..a1b359d6fa7 --- /dev/null +++ b/packages/chain-events/test/unit/substrate/storageFetcher.spec.ts @@ -0,0 +1,671 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ +import chai from 'chai'; +import BN from 'bn.js'; +import { + AccountId, + BalanceOf, + Registration, + RegistrarInfo, + TreasuryProposal, + Proposal, + Votes, + Bounty, + OpenTip, +} from '@polkadot/types/interfaces'; +import { Vec, Data, TypeRegistry, Bytes } from '@polkadot/types'; +import { Codec } from '@polkadot/types/types'; +import { stringToHex } from '@polkadot/util'; +import { DeriveReferendum } from '@polkadot/api-derive/democracy/types'; +import { DeriveBounty } from '@polkadot/api-derive/types'; + +import { SupportedNetwork } from '../../../src'; +import { + EventKind, + IDemocracyProposed, + IDemocracyStarted, + IDemocracyPassed, + IPreimageNoted, + ITreasuryProposed, + ICollectiveProposed, + ISignalingNewProposal, + ISignalingVotingStarted, + ISignalingVotingCompleted, + ICollectiveVoted, + IdentityJudgement, + ITreasuryBountyProposed, + ITreasuryBountyBecameActive, + INewTip, + ITipVoted, + ITipClosing, +} from '../../../src/chains/substrate/types'; +import { StorageFetcher } from '../../../src/chains/substrate/storageFetcher'; + +import { + constructFakeApi, + constructOption, + constructIdentityJudgement, +} from './testUtil'; + +const { assert } = chai; + +const blockNumber = 10; + +const api = constructFakeApi({ + getHeader: async () => ({ + number: blockNumber, + }), + + // identities + identityOfMulti: async (addrs) => + addrs.map((addr, i) => { + if (i === 1) return constructOption(); + if (addr === 'dave') + return constructOption(({ + info: { + // NO DISPLAY NAME SET + web: new Data(new TypeRegistry(), { + Raw: stringToHex(`${addr}-display-name`), + }), + }, + judgements: [], + } as unknown) as Registration); + return constructOption(({ + info: { + display: new Data(new TypeRegistry(), { + Raw: stringToHex(`${addr}-display-name`), + }), + }, + judgements: + addr !== 'charlie' + ? [ + [0, constructIdentityJudgement(IdentityJudgement.KnownGood)], + [1, constructIdentityJudgement(IdentityJudgement.Erroneous)], + ] + : [], + } as unknown) as Registration); + }), + registrars: async () => [ + constructOption(({ account: 'charlie' } as unknown) as RegistrarInfo), + constructOption(({ account: 'dave' } as unknown) as RegistrarInfo), + ], + + // democracy proposals + publicProps: async () => [[1, 'hash1', 'Charlie']], + depositOf: async (idx) => + idx !== 1 + ? constructOption() + : constructOption(([new BN('100'), ['Alice']] as unknown) as [ + BalanceOf, + Vec + ] & + Codec), + + // democracy referenda + referendumsActive: async () => [ + ({ + index: '3', + imageHash: 'image-hash-2', + status: { + threshold: 'Supermajorityapproval', + end: '100', + }, + } as unknown) as DeriveReferendum, + ], + dispatchQueue: async () => [ + { + index: '2', + at: '50', + imageHash: 'image-hash-1', + }, + ], + + // democracy preimages + preimages: async (hashes) => + hashes.map((hash) => + hash === 'image-hash-1' + ? { + at: '10', + proposer: 'Alice', + proposal: { + method: 'method-1', + section: 'section-1', + args: ['arg-1-1', 'arg-1-2'], + }, + } + : hash === 'hash1' + ? { + at: '20', + proposer: 'Bob', + proposal: { + method: 'method-2', + section: 'section-2', + args: ['arg-2-1', 'arg-2-2'], + }, + } + : null + ), + + // treasury proposals + treasuryApprovals: async () => ['0', '1', '2'], + treasuryProposalCount: async () => '4', + treasuryProposalsMulti: async (ids) => + ids.length === 1 && +ids[0] === 3 + ? [ + constructOption(({ + proposer: 'Alice', + value: 50, + beneficiary: 'Bob', + bond: 5, + } as unknown) as TreasuryProposal), + ] + : [], // should not see anything else + + // bounty proposals + bountyApprovals: async () => ['0', '1', '2'], + bountyCount: async () => '3', + bountiesMulti: async (ids) => + ids.length === 1 && +ids[0] === 3 + ? [ + constructOption(({ + proposer: 'alice', + value: 50, + fee: 10, + curatorDeposit: 10, + bond: 10, + status: {}, + } as unknown) as Bounty), + ] + : [], // should not see anything else + bounties: async () => [ + ({ + bounty: { + proposer: 'alice', + value: 50, + fee: 10, + curatorDeposit: 10, + bond: 10, + status: { + isPendingPayout: false, + asActive: { + curator: 'bob', + updateDue: 200, + }, + isActive: true, + }, + }, + description: 'hello', + index: 0, + proposals: [{}], + } as unknown) as DeriveBounty, + ], + + // collective proposals + collectiveProposals: async () => ['council-hash2', 'council-hash'], + votingMulti: async () => [ + constructOption(), + constructOption(({ + index: '15', + threshold: '4', + ayes: ['Alice'], + nays: ['Bob'], + } as unknown) as Votes), + ], + collectiveProposalOf: async (h) => { + if (h !== 'council-hash') { + throw new Error('invalid council proposal'); + } else { + return constructOption(({ + method: 'proposal-method', + section: 'proposal-section', + args: ['proposal-arg-1', 'proposal-arg-2'], + } as unknown) as Proposal); + } + }, + + // tips + tipsKeys: async () => [ + { args: ['tip-hash-1'] }, + { args: ['tip-hash-2'] }, + { args: ['tip-hash-3'] }, + ], + getStorage: async (key) => { + if (key?.args[0] === 'tip-hash-1') { + return constructOption(({ + reason: 'reasonHash1', + who: 'alice', + finder: 'bob', + deposit: '1000', + tips: [], + closes: constructOption(), + findersFee: { + valueOf: () => true, + }, + } as unknown) as OpenTip); + } + if (key?.args[0] === 'tip-hash-2') { + return constructOption(({ + reason: 'reasonHash2', + who: 'charlie', + finder: 'dave', + deposit: '999', + tips: [ + ['eve', '3'], + ['ferdie', '4'], + ], + closes: constructOption('123' as any), + findersFee: { + valueOf: () => false, + }, + } as unknown) as OpenTip); + } + throw new Error('UNKNOWN STORAGE ITEM'); + }, + tipReasons: async (hash) => + hash === 'reasonHash1' + ? constructOption((stringToHex('hello world!') as unknown) as Bytes) + : constructOption((stringToHex('goodbye world!') as unknown) as Bytes), + + // signaling proposals + inactiveProposals: async () => [['inactive-hash', '100']], + activeProposals: async () => [['active-hash', '200']], + completedProposals: async () => [['completed-hash', '10']], + signalingProposalOf: async (hash) => + hash === 'inactive-hash' + ? constructOption({ + author: 'Inactive Author', + title: 'inactive', + contents: 'inactive contents', + vote_id: '1', + stage: { + isCommit: false, + isVoting: false, + isCompleted: false, + }, + } as any) + : hash === 'active-hash' + ? constructOption({ + author: 'Active Author', + title: 'active', + contents: 'active contents', + vote_id: '2', + transition_time: '250', + stage: { + isCommit: false, + isVoting: true, + isCompleted: false, + }, + } as any) + : hash === 'completed-hash' + ? constructOption({ + author: 'Completed Author', + title: 'completed', + contents: 'completed contents', + vote_id: '3', + transition_time: '100', + stage: { + isCommit: false, + isVoting: false, + isCompleted: true, + }, + } as any) + : constructOption(), + voteRecords: async (id) => + id === '1' + ? constructOption({ + id: 1, + outcomes: ['inactive1', 'inactive2'], + data: { + tally_type: 'inactive tally', + vote_type: 'inactive vote', + }, + } as any) + : id === '2' + ? constructOption({ + id: 2, + outcomes: ['active1', 'active2'], + data: { + tally_type: 'active tally', + vote_type: 'active vote', + }, + } as any) + : id === '3' + ? constructOption({ + id: 3, + outcomes: ['completed1', 'completed2'], + data: { + tally_type: 'completed tally', + vote_type: 'completed vote', + }, + } as any) + : constructOption(), +}); + +/* eslint-disable: dot-notation */ +describe('Edgeware Event Migration Tests', () => { + it('should generate proposal events events', async () => { + const fetcher = new StorageFetcher(api); + const events = await fetcher.fetch(); + assert.sameDeepMembers( + events.sort( + (p1, p2) => + p1.data.kind.localeCompare(p2.data.kind) || + p1.blockNumber - p2.blockNumber + ), + [ + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.DemocracyProposed, + proposalIndex: 1, + proposalHash: 'hash1', + proposer: 'Charlie', + deposit: '100', + } as IDemocracyProposed, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.DemocracyStarted, + referendumIndex: 3, + proposalHash: 'image-hash-2', + voteThreshold: 'Supermajorityapproval', + endBlock: 100, + } as IDemocracyStarted, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.DemocracyStarted, + referendumIndex: 2, + proposalHash: 'image-hash-1', + voteThreshold: '', + endBlock: 0, + } as IDemocracyStarted, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.DemocracyPassed, + referendumIndex: 2, + dispatchBlock: 50, + } as IDemocracyPassed, + }, + { + blockNumber: 10, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.PreimageNoted, + proposalHash: 'image-hash-1', + noter: 'Alice', + preimage: { + method: 'method-1', + section: 'section-1', + args: ['arg-1-1', 'arg-1-2'], + }, + } as IPreimageNoted, + }, + { + blockNumber: 20, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.PreimageNoted, + proposalHash: 'hash1', + noter: 'Bob', + preimage: { + method: 'method-2', + section: 'section-2', + args: ['arg-2-1', 'arg-2-2'], + }, + } as IPreimageNoted, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.TreasuryProposed, + proposalIndex: 3, + proposer: 'Alice', + value: '50', + beneficiary: 'Bob', + bond: '5', + } as ITreasuryProposed, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.CollectiveProposed, + collectiveName: 'council', + proposalIndex: 15, + proposalHash: 'council-hash', + proposer: '', + threshold: 4, + call: { + method: 'proposal-method', + section: 'proposal-section', + args: ['proposal-arg-1', 'proposal-arg-2'], + }, + } as ICollectiveProposed, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.CollectiveVoted, + collectiveName: 'council', + proposalHash: 'council-hash', + voter: 'Alice', + vote: true, + } as ICollectiveVoted, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.CollectiveVoted, + collectiveName: 'council', + proposalHash: 'council-hash', + voter: 'Bob', + vote: false, + } as ICollectiveVoted, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.SignalingNewProposal, + proposer: 'Inactive Author', + proposalHash: 'inactive-hash', + voteId: '1', + title: 'inactive', + description: 'inactive contents', + tallyType: 'inactive tally', + voteType: 'inactive vote', + choices: ['inactive1', 'inactive2'], + } as ISignalingNewProposal, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.SignalingNewProposal, + proposer: 'Active Author', + proposalHash: 'active-hash', + voteId: '2', + title: 'active', + description: 'active contents', + tallyType: 'active tally', + voteType: 'active vote', + choices: ['active1', 'active2'], + } as ISignalingNewProposal, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.SignalingNewProposal, + proposer: 'Completed Author', + proposalHash: 'completed-hash', + voteId: '3', + title: 'completed', + description: 'completed contents', + tallyType: 'completed tally', + voteType: 'completed vote', + choices: ['completed1', 'completed2'], + } as ISignalingNewProposal, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.SignalingVotingStarted, + proposalHash: 'active-hash', + voteId: '2', + endBlock: 250, + } as ISignalingVotingStarted, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.SignalingVotingStarted, + proposalHash: 'completed-hash', + voteId: '3', + endBlock: 100, + } as ISignalingVotingStarted, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.SignalingVotingCompleted, + proposalHash: 'completed-hash', + voteId: '3', + } as ISignalingVotingCompleted, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: 'treasury-bounty-proposed', + bountyIndex: 0, + proposer: 'alice', + value: '50', + fee: '10', + curatorDeposit: '10', + bond: '10', + description: 'hello', + } as ITreasuryBountyProposed, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: 'treasury-bounty-became-active', + bountyIndex: 0, + curator: 'bob', + updateDue: 200, + } as ITreasuryBountyBecameActive, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: 'new-tip', + proposalHash: 'tip-hash-1', + who: 'alice', + reason: 'hello world!', + finder: 'bob', + deposit: '1000', + findersFee: true, + } as INewTip, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: 'new-tip', + proposalHash: 'tip-hash-2', + who: 'charlie', + reason: 'goodbye world!', + finder: 'dave', + deposit: '999', + findersFee: false, + } as INewTip, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: 'tip-voted', + proposalHash: 'tip-hash-2', + who: 'eve', + value: '3', + } as ITipVoted, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: 'tip-voted', + proposalHash: 'tip-hash-2', + who: 'ferdie', + value: '4', + } as ITipVoted, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: 'tip-closing', + proposalHash: 'tip-hash-2', + closing: 123, + } as ITipClosing, + }, + ].sort( + (p1, p2) => + p1.data.kind.localeCompare(p2.data.kind) || + p1.blockNumber - p2.blockNumber + ) + ); + }); + + it('should generate identity-set events', async () => { + const fetcher = new StorageFetcher(api); + const events = await fetcher.fetchIdentities([ + 'alice', + 'bob', + 'charlie', + 'dave', + ]); + assert.sameDeepMembers(events, [ + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.IdentitySet, + who: 'alice', + displayName: 'alice-display-name', + judgements: [ + ['charlie', IdentityJudgement.KnownGood], + ['dave', IdentityJudgement.Erroneous], + ], + }, + }, + { + blockNumber, + network: SupportedNetwork.Substrate, + data: { + kind: EventKind.IdentitySet, + who: 'charlie', + displayName: 'charlie-display-name', + judgements: [], + }, + }, + ]); + }); +}); diff --git a/packages/chain-events/test/unit/substrate/subscribeFunc.spec.ts b/packages/chain-events/test/unit/substrate/subscribeFunc.spec.ts new file mode 100644 index 00000000000..582b3e2d2c7 --- /dev/null +++ b/packages/chain-events/test/unit/substrate/subscribeFunc.spec.ts @@ -0,0 +1,25 @@ +import chai from 'chai'; + +import { EdgewareSpec } from '../../../scripts/specs/edgeware'; +import { createApi } from '../../../src/chains/substrate/subscribeFunc'; + +const { assert } = chai; + +describe.skip('Subscribe Func Tests', () => { + it('should create an API connection', async () => { + const VALID_URL = 'ws://mainnet1.edgewa.re:9944'; + const api = await createApi(VALID_URL, EdgewareSpec); + assert.isNotNull(api); + assert.isTrue(api.isConnected); + }); + + it('should timeout on bad api connection', async () => { + const INVALID_URL = 'ws://mainnet1.edgewa.re:9943'; + try { + await createApi(INVALID_URL, EdgewareSpec, 200); + assert.fail('Should throw error on connect timeout'); + } catch (e) { + // success + } + }); +}); diff --git a/packages/chain-events/test/unit/substrate/subscriber.spec.ts b/packages/chain-events/test/unit/substrate/subscriber.spec.ts new file mode 100644 index 00000000000..85f616919e9 --- /dev/null +++ b/packages/chain-events/test/unit/substrate/subscriber.spec.ts @@ -0,0 +1,136 @@ +import chai from 'chai'; +import { Hash, EventRecord, RuntimeVersion } from '@polkadot/types/interfaces'; + +import { Subscriber } from '../../../src/chains/substrate/subscriber'; + +import { constructFakeApi } from './testUtil'; + +const { assert } = chai; + +const hashes = [(1 as unknown) as Hash, (2 as unknown) as Hash]; +const events = [ + ([{ event: { data: [1] } }] as unknown) as EventRecord[], + ([ + { event: { data: [2] } }, + { event: { data: [3, 4] } }, + ] as unknown) as EventRecord[], +]; + +const getApi = () => { + return constructFakeApi({ + subscribeNewHeads: async (callback) => { + callback({ hash: hashes[0], number: '1' }); + const handle = setTimeout( + () => callback({ hash: hashes[1], number: '2' }), + 50 + ); + return () => clearInterval(handle); // unsubscribe + }, + // eslint-disable-next-line consistent-return + 'events.at': async (hash) => { + if (hash === hashes[0]) return events[0]; + if (hash === hashes[1]) return events[1]; + assert.fail('events.at called with invalid hash'); + }, + getBlock: async () => { + return { + block: { + extrinsics: [], + }, + }; + }, + subscribeRuntimeVersion: async (callback) => { + callback(({ + specVersion: 10, + specName: 'edgeware', + } as unknown) as RuntimeVersion); + }, + }); +}; + +/* eslint-disable: dot-notation */ +describe('Edgeware Event Subscriber Tests', () => { + it('should callback with block data', (done) => { + // setup mock data + const api = getApi(); + + // setup test class + const subscriber = new Subscriber(api); + + // confirm unsubscribe is no-op + subscriber.unsubscribe(); + + // run test + let seenBlocks = 0; + subscriber.subscribe((block) => { + try { + if (seenBlocks === 0) { + // first block + assert.deepEqual(block.header.hash, hashes[0]); + assert.equal(+block.header.number, 1); + assert.lengthOf(block.events, 1); + assert.deepEqual(block.events[0], events[0][0]); + assert.equal(block.versionNumber, 10); + assert.equal(block.versionName, 'edgeware'); + } else if (seenBlocks === 1) { + // second block + assert.deepEqual(block.header.hash, hashes[1]); + assert.equal(+block.header.number, 2); + assert.lengthOf(block.events, 2); + assert.deepEqual(block.events[0], events[1][0]); + assert.deepEqual(block.events[1], events[1][1]); + assert.equal(block.versionNumber, 10); + assert.equal(block.versionName, 'edgeware'); + } else { + assert.fail('invalid hash'); + } + seenBlocks++; + if (seenBlocks === 2) { + done(); + } + } catch (err) { + done(err); + } + }); + }); + + it('should unsubscribe', (done) => { + // setup mock data + const api = getApi(); + + // setup test class + const subscriber = new Subscriber(api); + + // run test + let seenBlocks = 0; + subscriber + .subscribe((block) => { + try { + if (seenBlocks === 0) { + // first block + assert.deepEqual(block.header.hash, hashes[0]); + assert.equal(+block.header.number, 1); + assert.lengthOf(block.events, 1); + assert.deepEqual(block.events[0], events[0][0]); + assert.equal(block.versionNumber, 10); + assert.equal(block.versionName, 'edgeware'); + } else if (seenBlocks === 1) { + // second block + assert.fail('should only process one block'); + } else { + assert.fail('invalid hash'); + } + seenBlocks++; + } catch (err) { + done(err); + } + }) + .then(() => { + setTimeout(() => { + subscriber.unsubscribe(); + setTimeout(() => done(), 50); + }, 10); + }); + }); + // TODO: fail tests +}); diff --git a/packages/chain-events/test/unit/substrate/testUtil.ts b/packages/chain-events/test/unit/substrate/testUtil.ts new file mode 100644 index 00000000000..b8793ae8763 --- /dev/null +++ b/packages/chain-events/test/unit/substrate/testUtil.ts @@ -0,0 +1,296 @@ +/* eslint-disable func-names */ +/* eslint-disable dot-notation */ +import { ApiPromise } from '@polkadot/api'; +import { Option } from '@polkadot/types'; +import { IdentityJudgement, AccountVote } from '@polkadot/types/interfaces'; +import { Codec } from '@polkadot/types/types'; + +import { IdentityJudgement as JudgementEnum } from '../../../src/chains/substrate/types'; + +export function constructOption(value?: T): Option { + if (value) { + return ({ + isSome: true, + isNone: false, + isEmpty: false, + value, + unwrap: () => value, + } as unknown) as Option; + } + return ({ + isSome: false, + isNone: true, + isEmpty: true, + value: undefined, + unwrap: () => { + throw new Error('option is null'); + }, + } as unknown) as Option; +} + +export function constructIdentityJudgement( + j: JudgementEnum +): IdentityJudgement { + const obj = { + isUnknown: false, + isFeePaid: false, + isReasonable: false, + isKnownGood: false, + isOutOfDate: false, + isLowQuality: false, + isErroneous: false, + }; + switch (j) { + case JudgementEnum.Unknown: + obj.isUnknown = true; + break; + case JudgementEnum.Reasonable: + obj.isReasonable = true; + break; + case JudgementEnum.OutOfDate: + obj.isOutOfDate = true; + break; + case JudgementEnum.LowQuality: + obj.isLowQuality = true; + break; + case JudgementEnum.KnownGood: + obj.isKnownGood = true; + break; + case JudgementEnum.FeePaid: + obj.isFeePaid = true; + break; + case JudgementEnum.Erroneous: + obj.isErroneous = true; + break; + default: + break; + } + return (obj as unknown) as IdentityJudgement; +} + +export function constructAccountVote( + isAye: boolean, + conviction: number, + balance: string, + isSplit = false +): AccountVote { + if (isSplit) { + return { isSplit: true, asSplit: {}, isStandard: false } as AccountVote; + } + return ({ + isSplit: false, + isStandard: true, + asStandard: { + balance, + vote: { + isAye, + isNay: !isAye, + conviction: { + index: conviction, + }, + }, + }, + } as unknown) as AccountVote; +} + +export function constructFakeApi(callOverrides: { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + [name: string]: (...args: any[]) => Promise; +}): ApiPromise { + // TODO: auto-multi everything here + const identityOf = function (...args) { + return callOverrides['identityOf'](...args); + }; + identityOf.multi = callOverrides['identityOfMulti']; + + const blockHash = function (...args) { + return callOverrides['blockHash'](...args); + }; + blockHash.multi = callOverrides['blockHash.multi']; + + const events = function (...args) { + return callOverrides['events'](...args); + }; + events.at = callOverrides['events.at']; + + const currentIndex = function (...args) { + return callOverrides['currentIndex'](...args); + }; + currentIndex.at = callOverrides['currentIndex.at']; + + const validators = function (...args) { + return callOverrides['validators'](...args); + }; + validators.at = callOverrides['validators.at']; + validators.keysAt = callOverrides['validators.keysAt']; + + const bonded = function (...args) { + return callOverrides['bonded'](...args); + }; + bonded.at = callOverrides['bonded.at']; + + const stakers = function (...args) { + return callOverrides['stakers'](...args); + }; + stakers.at = callOverrides['stakers.at']; + stakers.keysAt = callOverrides['stakers.keysAt']; + + const currentEra = function (...args) { + return callOverrides['currentEra'](...args); + }; + currentEra.at = callOverrides['currentEra.at']; + + const erasRewardPoints = function (...args) { + return callOverrides['erasRewardPoints'](...args); + }; + erasRewardPoints.at = callOverrides['erasRewardPoints.at']; + + const currentEraPointsEarned = function (...args) { + return callOverrides['currentEraPointsEarned'](...args); + }; + currentEraPointsEarned.at = callOverrides['currentEraPointsEarned.at']; + + const payee = function (...args) { + return callOverrides['payee'](...args); + }; + payee.at = callOverrides['payee.at']; + + const proposals = function (...args) { + return callOverrides['treasuryProposals'](...args); + }; + proposals.multi = callOverrides['treasuryProposalsMulti']; + + const bounties = function (...args) { + return callOverrides['treasuryBounties'](...args); + }; + bounties.multi = callOverrides['bountiesMulti']; + + const tips = function (...args) { + return callOverrides['tips'](...args); + }; + tips.keys = callOverrides['tipsKeys']; + + return ({ + createType: (name, value) => value, + queryMulti: (queries) => { + return Promise.all( + // eslint-disable-next-line @typescript-eslint/no-explicit-any + queries.map((q: any[]) => { + const qFunc = q[0]; + const qArgs = q.slice(1); + return qFunc(...qArgs); + }) + ); + }, + rpc: { + chain: { + subscribeNewHeads: callOverrides['subscribeNewHeads'], + getHeader: callOverrides['getHeader'], + getBlock: callOverrides['getBlock'], + getBlockHash: callOverrides['getBlockHash'], + }, + state: { + getStorage: callOverrides['getStorage'], + getRuntimeVersion: callOverrides['getRuntimeVersion'], + subscribeRuntimeVersion: callOverrides['subscribeRuntimeVersion'], + }, + }, + query: { + system: { + blockHash, + events, + }, + balances: { + totalIssuance: callOverrides['totalIssuance'], + }, + session: { + nextKeys: callOverrides['nextKeys'], + currentIndex, + validators, + }, + staking: { + bonded, + currentPoints: callOverrides['currentPoints'], + activeEra: callOverrides['activeEra'], + stakers, + currentEra, + validators, + erasRewardPoints, + currentEraPointsEarned, + payee, + }, + bounties: { + bountyCount: callOverrides['bountyCount'], + bountyDescriptions: callOverrides['bountyDescriptions'], + }, + democracy: { + referendumInfoOf: callOverrides['referendumInfoOf'], + publicProps: callOverrides['publicProps'], + depositOf: callOverrides['depositOf'], + }, + electionsPhragmen: { + members: callOverrides['electionMembers'], + electionRounds: callOverrides['electionRounds'], + }, + treasury: { + proposals, + approvals: callOverrides['treasuryApprovals'], + proposalCount: callOverrides['treasuryProposalCount'], + }, + council: { + voting: { + multi: callOverrides['votingMulti'], + }, + proposals: callOverrides['collectiveProposals'], + proposalOf: callOverrides['collectiveProposalOf'], + }, + signaling: { + proposalOf: callOverrides['signalingProposalOf'], + inactiveProposals: callOverrides['inactiveProposals'], + activeProposals: callOverrides['activeProposals'], + completedProposals: callOverrides['completedProposals'], + }, + tips: { + tips, + reasons: callOverrides['tipReasons'], + }, + voting: { + voteRecords: callOverrides['voteRecords'], + }, + offences: { + concurrentReportsIndex: callOverrides['concurrentReportsIndex'], + reports: { + multi: callOverrides['reports.multi'], + }, + }, + identity: { + identityOf, + registrars: callOverrides['registrars'], + }, + }, + derive: { + chain: { + bestNumber: callOverrides['bestNumber'], + }, + staking: { + validators: callOverrides['validators'], + electedInfo: callOverrides['electedInfo'], + }, + bounties: { + bounties: callOverrides['bounties'], + }, + democracy: { + dispatchQueue: callOverrides['dispatchQueue'], + preimage: callOverrides['preimage'], + preimages: callOverrides['preimages'], + referendumsActive: callOverrides['referendumsActive'], + }, + treasury: { + proposals: callOverrides['treasuryProposalsDerive'], + }, + council: { + proposals: callOverrides['councilProposalsDerive'], + }, + }, + } as unknown) as ApiPromise; +} diff --git a/packages/chain-events/test/util.ts b/packages/chain-events/test/util.ts new file mode 100644 index 00000000000..cbb4110fed3 --- /dev/null +++ b/packages/chain-events/test/util.ts @@ -0,0 +1,29 @@ +import events from 'events'; + +import { + CWEvent, + IChainEventData, + IEventHandler, + ChainEventKinds, +} from '../src'; + +export class TestHandler implements IEventHandler { + private counter = 0; + + constructor( + private _verbose: boolean, + protected emitter: events.EventEmitter + ) {} + + public async handle( + event: CWEvent + ): Promise { + if (this._verbose) + console.log(`Received event: ${JSON.stringify(event, null, 2)}`); + if (ChainEventKinds.includes(event.data.kind)) { + ++this.counter; + this.emitter.emit('eventHandled'); + } + return event.data; + } +} diff --git a/packages/chain-events/tsconfig.json b/packages/chain-events/tsconfig.json new file mode 100644 index 00000000000..1e36984c232 --- /dev/null +++ b/packages/chain-events/tsconfig.json @@ -0,0 +1,31 @@ +{ + "compilerOptions": { + "allowJs": true, + "target": "es6", + "lib": [ + "es2019" + ], + "moduleResolution": "node", + "module": "commonjs", + "allowSyntheticDefaultImports": true, + "outDir": "./dist", + "baseUrl": "./src", + "declaration": true, + "resolveJsonModule": true, + "esModuleInterop": true, + "downlevelIteration": true, + "sourceMap": true, + "typeRoots": [ + "./node_modules/@types" + ] + }, + "include": [ + "./src", + ], + "exclude": [ + "./dist", + "./node_modules", + "./test", + "./scripts" + ] +} diff --git a/packages/chain-events/yarn.lock b/packages/chain-events/yarn.lock new file mode 100644 index 00000000000..34fba99cd9a --- /dev/null +++ b/packages/chain-events/yarn.lock @@ -0,0 +1,7743 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +"@aave/aave-token@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@aave/aave-token/-/aave-token-1.0.4.tgz#cd283a65f0f7456f51977ba145f7aecdf5430974" + integrity sha512-4uhKVfDuzWZnI+EBe85+oUk3X4LKLaP+nuR6ErD1VKkfz22drwc/UOYWoXJTxWCo1JaNi4quKgXSa4dy5nuCIQ== + dependencies: + tmp-promise "^3.0.2" + +"@babel/code-frame@7.12.11": + version "7.12.11" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" + integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== + dependencies: + "@babel/highlight" "^7.10.4" + +"@babel/code-frame@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" + integrity sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw== + dependencies: + "@babel/highlight" "^7.14.5" + +"@babel/compat-data@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.15.0.tgz#2dbaf8b85334796cafbb0f5793a90a2fc010b176" + integrity sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA== + +"@babel/core@^7.10.3", "@babel/core@^7.7.5": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.15.0.tgz#749e57c68778b73ad8082775561f67f5196aafa8" + integrity sha512-tXtmTminrze5HEUPn/a0JtOzzfp0nk+UEXQ/tqIJo3WDGypl/2OFQEMll/zSFU8f/lfmfLXvTaORHF3cfXIQMw== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.15.0" + "@babel/helper-compilation-targets" "^7.15.0" + "@babel/helper-module-transforms" "^7.15.0" + "@babel/helpers" "^7.14.8" + "@babel/parser" "^7.15.0" + "@babel/template" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.1.2" + semver "^6.3.0" + source-map "^0.5.0" + +"@babel/generator@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.15.0.tgz#a7d0c172e0d814974bad5aa77ace543b97917f15" + integrity sha512-eKl4XdMrbpYvuB505KTta4AV9g+wWzmVBW69tX0H2NwKVKd2YJbKgyK6M8j/rgLbmHOYJn6rUklV677nOyJrEQ== + dependencies: + "@babel/types" "^7.15.0" + jsesc "^2.5.1" + source-map "^0.5.0" + +"@babel/helper-compilation-targets@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.0.tgz#973df8cbd025515f3ff25db0c05efc704fa79818" + integrity sha512-h+/9t0ncd4jfZ8wsdAsoIxSa61qhBYlycXiHWqJaQBCXAhDCMbPRSMTGnZIkkmt1u4ag+UQmuqcILwqKzZ4N2A== + dependencies: + "@babel/compat-data" "^7.15.0" + "@babel/helper-validator-option" "^7.14.5" + browserslist "^4.16.6" + semver "^6.3.0" + +"@babel/helper-function-name@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz#89e2c474972f15d8e233b52ee8c480e2cfcd50c4" + integrity sha512-Gjna0AsXWfFvrAuX+VKcN/aNNWonizBj39yGwUzVDVTlMYJMK2Wp6xdpy72mfArFq5uK+NOuexfzZlzI1z9+AQ== + dependencies: + "@babel/helper-get-function-arity" "^7.14.5" + "@babel/template" "^7.14.5" + "@babel/types" "^7.14.5" + +"@babel/helper-get-function-arity@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz#25fbfa579b0937eee1f3b805ece4ce398c431815" + integrity sha512-I1Db4Shst5lewOM4V+ZKJzQ0JGGaZ6VY1jYvMghRjqs6DWgxLCIyFt30GlnKkfUeFLpJt2vzbMVEXVSXlIFYUg== + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-hoist-variables@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz#e0dd27c33a78e577d7c8884916a3e7ef1f7c7f8d" + integrity sha512-R1PXiz31Uc0Vxy4OEOm07x0oSjKAdPPCh3tPivn/Eo8cvz6gveAeuyUUPB21Hoiif0uoPQSSdhIPS3352nvdyQ== + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-member-expression-to-functions@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.0.tgz#0ddaf5299c8179f27f37327936553e9bba60990b" + integrity sha512-Jq8H8U2kYiafuj2xMTPQwkTBnEEdGKpT35lJEQsRRjnG0LW3neucsaMWLgKcwu3OHKNeYugfw+Z20BXBSEs2Lg== + dependencies: + "@babel/types" "^7.15.0" + +"@babel/helper-module-imports@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz#6d1a44df6a38c957aa7c312da076429f11b422f3" + integrity sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ== + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-module-transforms@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.15.0.tgz#679275581ea056373eddbe360e1419ef23783b08" + integrity sha512-RkGiW5Rer7fpXv9m1B3iHIFDZdItnO2/BLfWVW/9q7+KqQSDY5kUfQEbzdXM1MVhJGcugKV7kRrNVzNxmk7NBg== + dependencies: + "@babel/helper-module-imports" "^7.14.5" + "@babel/helper-replace-supers" "^7.15.0" + "@babel/helper-simple-access" "^7.14.8" + "@babel/helper-split-export-declaration" "^7.14.5" + "@babel/helper-validator-identifier" "^7.14.9" + "@babel/template" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" + +"@babel/helper-optimise-call-expression@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz#f27395a8619e0665b3f0364cddb41c25d71b499c" + integrity sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA== + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-replace-supers@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.15.0.tgz#ace07708f5bf746bf2e6ba99572cce79b5d4e7f4" + integrity sha512-6O+eWrhx+HEra/uJnifCwhwMd6Bp5+ZfZeJwbqUTuqkhIT6YcRhiZCOOFChRypOIe0cV46kFrRBlm+t5vHCEaA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.15.0" + "@babel/helper-optimise-call-expression" "^7.14.5" + "@babel/traverse" "^7.15.0" + "@babel/types" "^7.15.0" + +"@babel/helper-simple-access@^7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.8.tgz#82e1fec0644a7e775c74d305f212c39f8fe73924" + integrity sha512-TrFN4RHh9gnWEU+s7JloIho2T76GPwRHhdzOWLqTrMnlas8T9O7ec+oEDNsRXndOmru9ymH9DFrEOxpzPoSbdg== + dependencies: + "@babel/types" "^7.14.8" + +"@babel/helper-split-export-declaration@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.14.5.tgz#22b23a54ef51c2b7605d851930c1976dd0bc693a" + integrity sha512-hprxVPu6e5Kdp2puZUmvOGjaLv9TCe58E/Fl6hRq4YiVQxIcNvuq6uTM2r1mT/oPskuS9CgR+I94sqAYv0NGKA== + dependencies: + "@babel/types" "^7.14.5" + +"@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.14.9": + version "7.14.9" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.9.tgz#6654d171b2024f6d8ee151bf2509699919131d48" + integrity sha512-pQYxPY0UP6IHISRitNe8bsijHex4TWZXi2HwKVsjPiltzlhse2znVcm9Ace510VT1kxIHjGJCZZQBX2gJDbo0g== + +"@babel/helper-validator-option@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" + integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow== + +"@babel/helpers@^7.14.8": + version "7.14.8" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.8.tgz#839f88f463025886cff7f85a35297007e2da1b77" + integrity sha512-ZRDmI56pnV+p1dH6d+UN6GINGz7Krps3+270qqI9UJ4wxYThfAIcI5i7j5vXC4FJ3Wap+S9qcebxeYiqn87DZw== + dependencies: + "@babel/template" "^7.14.5" + "@babel/traverse" "^7.14.8" + "@babel/types" "^7.14.8" + +"@babel/highlight@^7.10.4", "@babel/highlight@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" + integrity sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg== + dependencies: + "@babel/helper-validator-identifier" "^7.14.5" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.14.5", "@babel/parser@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.15.0.tgz#b6d6e29058ca369127b0eeca2a1c4b5794f1b6b9" + integrity sha512-0v7oNOjr6YT9Z2RAOTv4T9aP+ubfx4Q/OhVtAet7PFDt0t9Oy6Jn+/rfC6b8HJ5zEqrQCiMxJfgtHpmIminmJQ== + +"@babel/polyfill@^7.10.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.12.1.tgz#1f2d6371d1261bbd961f3c5d5909150e12d0bd96" + integrity sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g== + dependencies: + core-js "^2.6.5" + regenerator-runtime "^0.13.4" + +"@babel/register@^7.10.3": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.14.5.tgz#d0eac615065d9c2f1995842f85d6e56c345f3233" + integrity sha512-TjJpGz/aDjFGWsItRBQMOFTrmTI9tr79CHOK+KIvLeCkbxuOAk2M5QHjvruIMGoo9OuccMh5euplPzc5FjAKGg== + dependencies: + clone-deep "^4.0.1" + find-cache-dir "^2.0.0" + make-dir "^2.1.0" + pirates "^4.0.0" + source-map-support "^0.5.16" + +"@babel/runtime@^7.15.3", "@babel/runtime@^7.15.4": + version "7.15.4" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.15.4.tgz#fd17d16bfdf878e6dd02d19753a39fa8a8d9c84a" + integrity sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw== + dependencies: + regenerator-runtime "^0.13.4" + +"@babel/template@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.14.5.tgz#a9bc9d8b33354ff6e55a9c60d1109200a68974f4" + integrity sha512-6Z3Po85sfxRGachLULUhOmvAaOo7xCvqGQtxINai2mEGPFm6pQ4z5QInFnUrRpfoSV60BnjyF5F3c+15fxFV1g== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/parser" "^7.14.5" + "@babel/types" "^7.14.5" + +"@babel/traverse@^7.14.8", "@babel/traverse@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.15.0.tgz#4cca838fd1b2a03283c1f38e141f639d60b3fc98" + integrity sha512-392d8BN0C9eVxVWd8H6x9WfipgVH5IaIoLp23334Sc1vbKKWINnvwRpb4us0xtPaCumlwbTtIYNA0Dv/32sVFw== + dependencies: + "@babel/code-frame" "^7.14.5" + "@babel/generator" "^7.15.0" + "@babel/helper-function-name" "^7.14.5" + "@babel/helper-hoist-variables" "^7.14.5" + "@babel/helper-split-export-declaration" "^7.14.5" + "@babel/parser" "^7.15.0" + "@babel/types" "^7.15.0" + debug "^4.1.0" + globals "^11.1.0" + +"@babel/types@^7.14.5", "@babel/types@^7.14.8", "@babel/types@^7.15.0": + version "7.15.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.15.0.tgz#61af11f2286c4e9c69ca8deb5f4375a73c72dcbd" + integrity sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ== + dependencies: + "@babel/helper-validator-identifier" "^7.14.9" + to-fast-properties "^2.0.0" + +"@eslint/eslintrc@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" + integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + +"@ethereumjs/block@^3.4.0": + version "3.4.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/block/-/block-3.4.0.tgz#4747b0c06220ee10cbdfe1cbde8cbb0677b1b074" + integrity sha512-umKAoTX32yXzErpIksPHodFc/5y8bmZMnOl6hWy5Vd8xId4+HKFUOyEiN16Y97zMwFRysRpcrR6wBejfqc6Bmg== + dependencies: + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/tx" "^3.3.0" + ethereumjs-util "^7.1.0" + merkle-patricia-tree "^4.2.0" + +"@ethereumjs/blockchain@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/blockchain/-/blockchain-5.4.0.tgz#28d712627d3442b2bb1f50dd5acba7cde1021993" + integrity sha512-wAuKLaew6PL52kH8YPXO7PbjjKV12jivRSyHQehkESw4slSLLfYA6Jv7n5YxyT2ajD7KNMPVh7oyF/MU6HcOvg== + dependencies: + "@ethereumjs/block" "^3.4.0" + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/ethash" "^1.0.0" + debug "^2.2.0" + ethereumjs-util "^7.1.0" + level-mem "^5.0.1" + lru-cache "^5.1.1" + rlp "^2.2.4" + semaphore-async-await "^1.5.1" + +"@ethereumjs/common@^2.3.0", "@ethereumjs/common@^2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/common/-/common-2.4.0.tgz#2d67f6e6ba22246c5c89104e6b9a119fb3039766" + integrity sha512-UdkhFWzWcJCZVsj1O/H8/oqj/0RVYjLc1OhPjBrQdALAkQHpCp8xXI4WLnuGTADqTdJZww0NtgwG+TRPkXt27w== + dependencies: + crc-32 "^1.2.0" + ethereumjs-util "^7.1.0" + +"@ethereumjs/ethash@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/ethash/-/ethash-1.0.0.tgz#4e77f85b37be1ade5393e8719bdabac3e796ddaa" + integrity sha512-iIqnGG6NMKesyOxv2YctB2guOVX18qMAWlj3QlZyrc+GqfzLqoihti+cVNQnyNxr7eYuPdqwLQOFuPe6g/uKjw== + dependencies: + "@types/levelup" "^4.3.0" + buffer-xor "^2.0.1" + ethereumjs-util "^7.0.7" + miller-rabin "^4.0.0" + +"@ethereumjs/tx@^3.2.1", "@ethereumjs/tx@^3.3.0": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@ethereumjs/tx/-/tx-3.3.0.tgz#14ed1b7fa0f28e1cd61e3ecbdab824205f6a4378" + integrity sha512-yTwEj2lVzSMgE6Hjw9Oa1DZks/nKTWM8Wn4ykDNapBPua2f4nXO3qKnni86O6lgDj5fVNRqbDsD0yy7/XNGDEA== + dependencies: + "@ethereumjs/common" "^2.4.0" + ethereumjs-util "^7.1.0" + +"@ethereumjs/vm@^5.5.2": + version "5.5.2" + resolved "https://registry.yarnpkg.com/@ethereumjs/vm/-/vm-5.5.2.tgz#918a2c1000aaa9fdbe6007a4fdc2c62833122adf" + integrity sha512-AydZ4wfvZAsBuFzs3xVSA2iU0hxhL8anXco3UW3oh9maVC34kTEytOfjHf06LTEfN0MF9LDQ4ciLa7If6ZN/sg== + dependencies: + "@ethereumjs/block" "^3.4.0" + "@ethereumjs/blockchain" "^5.4.0" + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/tx" "^3.3.0" + async-eventemitter "^0.2.4" + core-js-pure "^3.0.1" + debug "^2.2.0" + ethereumjs-util "^7.1.0" + functional-red-black-tree "^1.0.1" + mcl-wasm "^0.7.1" + merkle-patricia-tree "^4.2.0" + rustbn.js "~0.2.0" + util.promisify "^1.0.1" + +"@ethersproject/abi@5.0.7": + version "5.0.7" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.7.tgz#79e52452bd3ca2956d0e1c964207a58ad1a0ee7b" + integrity sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw== + dependencies: + "@ethersproject/address" "^5.0.4" + "@ethersproject/bignumber" "^5.0.7" + "@ethersproject/bytes" "^5.0.4" + "@ethersproject/constants" "^5.0.4" + "@ethersproject/hash" "^5.0.4" + "@ethersproject/keccak256" "^5.0.3" + "@ethersproject/logger" "^5.0.5" + "@ethersproject/properties" "^5.0.3" + "@ethersproject/strings" "^5.0.4" + +"@ethersproject/abi@5.4.0", "@ethersproject/abi@^5.0.0", "@ethersproject/abi@^5.1.2", "@ethersproject/abi@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.4.0.tgz#a6d63bdb3672f738398846d4279fa6b6c9818242" + integrity sha512-9gU2H+/yK1j2eVMdzm6xvHSnMxk8waIHQGYCZg5uvAyH0rsAzxkModzBSpbAkAuhKFEovC2S9hM4nPuLym8IZw== + dependencies: + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/hash" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/abstract-provider@5.4.1", "@ethersproject/abstract-provider@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.4.1.tgz#e404309a29f771bd4d28dbafadcaa184668c2a6e" + integrity sha512-3EedfKI3LVpjSKgAxoUaI+gB27frKsxzm+r21w9G60Ugk+3wVLQwhi1LsEJAKNV7WoZc8CIpNrATlL1QFABjtQ== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/networks" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/web" "^5.4.0" + +"@ethersproject/abstract-signer@5.4.1", "@ethersproject/abstract-signer@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.4.1.tgz#e4e9abcf4dd4f1ba0db7dff9746a5f78f355ea81" + integrity sha512-SkkFL5HVq1k4/25dM+NWP9MILgohJCgGv5xT5AcRruGz4ILpfHeBtO/y6j+Z3UN/PAjDeb4P7E51Yh8wcGNLGA== + dependencies: + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + +"@ethersproject/address@5.4.0", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.4.0.tgz#ba2d00a0f8c4c0854933b963b9a3a9f6eb4a37a3" + integrity sha512-SD0VgOEkcACEG/C6xavlU1Hy3m5DGSXW3CUHkaaEHbAPPsgi0coP5oNPsxau8eTlZOk/bpa/hKeCNoK5IzVI2Q== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/rlp" "^5.4.0" + +"@ethersproject/base64@5.4.0", "@ethersproject/base64@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.4.0.tgz#7252bf65295954c9048c7ca5f43e5c86441b2a9a" + integrity sha512-CjQw6E17QDSSC5jiM9YpF7N1aSCHmYGMt9bWD8PWv6YPMxjsys2/Q8xLrROKI3IWJ7sFfZ8B3flKDTM5wlWuZQ== + dependencies: + "@ethersproject/bytes" "^5.4.0" + +"@ethersproject/basex@5.4.0", "@ethersproject/basex@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.4.0.tgz#0a2da0f4e76c504a94f2b21d3161ed9438c7f8a6" + integrity sha512-J07+QCVJ7np2bcpxydFVf/CuYo9mZ7T73Pe7KQY4c1lRlrixMeblauMxHXD0MPwFmUHZIILDNViVkykFBZylbg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + +"@ethersproject/bignumber@5.4.1", "@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.4.0": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.4.1.tgz#64399d3b9ae80aa83d483e550ba57ea062c1042d" + integrity sha512-fJhdxqoQNuDOk6epfM7yD6J8Pol4NUCy1vkaGAkuujZm0+lNow//MKu1hLhRiYV4BsOHyBv5/lsTjF+7hWwhJg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + bn.js "^4.11.9" + +"@ethersproject/bytes@5.4.0", "@ethersproject/bytes@^5.0.0", "@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.4.0.tgz#56fa32ce3bf67153756dbaefda921d1d4774404e" + integrity sha512-H60ceqgTHbhzOj4uRc/83SCN9d+BSUnOkrr2intevqdtEMO1JFVZ1XL84OEZV+QjV36OaZYxtnt4lGmxcGsPfA== + dependencies: + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/constants@5.4.0", "@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.4.0.tgz#ee0bdcb30bf1b532d2353c977bf2ef1ee117958a" + integrity sha512-tzjn6S7sj9+DIIeKTJLjK9WGN2Tj0P++Z8ONEIlZjyoTkBuODN+0VfhAyYksKi43l1Sx9tX2VlFfzjfmr5Wl3Q== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + +"@ethersproject/contracts@5.4.1": + version "5.4.1" + resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.4.1.tgz#3eb4f35b7fe60a962a75804ada2746494df3e470" + integrity sha512-m+z2ZgPy4pyR15Je//dUaymRUZq5MtDajF6GwFbGAVmKz/RF+DNIPwF0k5qEcL3wPGVqUjFg2/krlCRVTU4T5w== + dependencies: + "@ethersproject/abi" "^5.4.0" + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + +"@ethersproject/hash@5.4.0", "@ethersproject/hash@^5.0.4", "@ethersproject/hash@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.4.0.tgz#d18a8e927e828e22860a011f39e429d388344ae0" + integrity sha512-xymAM9tmikKgbktOCjW60Z5sdouiIIurkZUr9oW5NOex5uwxrbsYG09kb5bMcNjlVeJD3yPivTNzViIs1GCbqA== + dependencies: + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/hdnode@5.4.0", "@ethersproject/hdnode@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.4.0.tgz#4bc9999b9a12eb5ce80c5faa83114a57e4107cac" + integrity sha512-pKxdS0KAaeVGfZPp1KOiDLB0jba11tG6OP1u11QnYfb7pXn6IZx0xceqWRr6ygke8+Kw74IpOoSi7/DwANhy8Q== + dependencies: + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/basex" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/pbkdf2" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/sha2" "^5.4.0" + "@ethersproject/signing-key" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/wordlists" "^5.4.0" + +"@ethersproject/json-wallets@5.4.0", "@ethersproject/json-wallets@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.4.0.tgz#2583341cfe313fc9856642e8ace3080154145e95" + integrity sha512-igWcu3fx4aiczrzEHwG1xJZo9l1cFfQOWzTqwRw/xcvxTk58q4f9M7cjh51EKphMHvrJtcezJ1gf1q1AUOfEQQ== + dependencies: + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/hdnode" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/pbkdf2" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/random" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + aes-js "3.0.0" + scrypt-js "3.0.1" + +"@ethersproject/keccak256@5.4.0", "@ethersproject/keccak256@^5.0.3", "@ethersproject/keccak256@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.4.0.tgz#7143b8eea4976080241d2bd92e3b1f1bf7025318" + integrity sha512-FBI1plWet+dPUvAzPAeHzRKiPpETQzqSUWR1wXJGHVWi4i8bOSrpC3NwpkPjgeXG7MnugVc1B42VbfnQikyC/A== + dependencies: + "@ethersproject/bytes" "^5.4.0" + js-sha3 "0.5.7" + +"@ethersproject/logger@5.4.0", "@ethersproject/logger@^5.0.5", "@ethersproject/logger@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.4.0.tgz#f39adadf62ad610c420bcd156fd41270e91b3ca9" + integrity sha512-xYdWGGQ9P2cxBayt64d8LC8aPFJk6yWCawQi/4eJ4+oJdMMjEBMrIcIMZ9AxhwpPVmnBPrsB10PcXGmGAqgUEQ== + +"@ethersproject/networks@5.4.2", "@ethersproject/networks@^5.4.0": + version "5.4.2" + resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.4.2.tgz#2247d977626e97e2c3b8ee73cd2457babde0ce35" + integrity sha512-eekOhvJyBnuibfJnhtK46b8HimBc5+4gqpvd1/H9LEl7Q7/qhsIhM81dI9Fcnjpk3jB1aTy6bj0hz3cifhNeYw== + dependencies: + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/pbkdf2@5.4.0", "@ethersproject/pbkdf2@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.4.0.tgz#ed88782a67fda1594c22d60d0ca911a9d669641c" + integrity sha512-x94aIv6tiA04g6BnazZSLoRXqyusawRyZWlUhKip2jvoLpzJuLb//KtMM6PEovE47pMbW+Qe1uw+68ameJjB7g== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/sha2" "^5.4.0" + +"@ethersproject/properties@5.4.0", "@ethersproject/properties@^5.0.3", "@ethersproject/properties@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.4.0.tgz#38ba20539b44dcc5d5f80c45ad902017dcdbefe7" + integrity sha512-7jczalGVRAJ+XSRvNA6D5sAwT4gavLq3OXPuV/74o3Rd2wuzSL035IMpIMgei4CYyBdialJMrTqkOnzccLHn4A== + dependencies: + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/providers@5.4.3", "@ethersproject/providers@^5.0.0": + version "5.4.3" + resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.4.3.tgz#4cd7ccd9e12bc3875b33df8b24abf735663958a5" + integrity sha512-VURwkaWPoUj7jq9NheNDT5Iyy64Qcyf6BOFDwVdHsmLmX/5prNjFrgSX3GHPE4z1BRrVerDxe2yayvXKFm/NNg== + dependencies: + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/basex" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/hash" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/networks" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/random" "^5.4.0" + "@ethersproject/rlp" "^5.4.0" + "@ethersproject/sha2" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/web" "^5.4.0" + bech32 "1.1.4" + ws "7.4.6" + +"@ethersproject/random@5.4.0", "@ethersproject/random@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.4.0.tgz#9cdde60e160d024be39cc16f8de3b9ce39191e16" + integrity sha512-pnpWNQlf0VAZDEOVp1rsYQosmv2o0ITS/PecNw+mS2/btF8eYdspkN0vIXrCMtkX09EAh9bdk8GoXmFXM1eAKw== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/rlp@5.4.0", "@ethersproject/rlp@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.4.0.tgz#de61afda5ff979454e76d3b3310a6c32ad060931" + integrity sha512-0I7MZKfi+T5+G8atId9QaQKHRvvasM/kqLyAH4XxBCBchAooH2EX5rL9kYZWwcm3awYV+XC7VF6nLhfeQFKVPg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/sha2@5.4.0", "@ethersproject/sha2@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.4.0.tgz#c9a8db1037014cbc4e9482bd662f86c090440371" + integrity sha512-siheo36r1WD7Cy+bDdE1BJ8y0bDtqXCOxRMzPa4bV1TGt/eTUUt03BHoJNB6reWJD8A30E/pdJ8WFkq+/uz4Gg== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + hash.js "1.1.7" + +"@ethersproject/signing-key@5.4.0", "@ethersproject/signing-key@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.4.0.tgz#2f05120984e81cf89a3d5f6dec5c68ee0894fbec" + integrity sha512-q8POUeywx6AKg2/jX9qBYZIAmKSB4ubGXdQ88l40hmATj29JnG5pp331nAWwwxPn2Qao4JpWHNZsQN+bPiSW9A== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + bn.js "^4.11.9" + elliptic "6.5.4" + hash.js "1.1.7" + +"@ethersproject/solidity@5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.4.0.tgz#1305e058ea02dc4891df18b33232b11a14ece9ec" + integrity sha512-XFQTZ7wFSHOhHcV1DpcWj7VXECEiSrBuv7JErJvB9Uo+KfCdc3QtUZV+Vjh/AAaYgezUEKbCtE6Khjm44seevQ== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/sha2" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/strings@5.4.0", "@ethersproject/strings@^5.0.4", "@ethersproject/strings@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.4.0.tgz#fb12270132dd84b02906a8d895ae7e7fa3d07d9a" + integrity sha512-k/9DkH5UGDhv7aReXLluFG5ExurwtIpUfnDNhQA29w896Dw3i4uDTz01Quaptbks1Uj9kI8wo9tmW73wcIEaWA== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/transactions@5.4.0", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.4.0.tgz#a159d035179334bd92f340ce0f77e83e9e1522e0" + integrity sha512-s3EjZZt7xa4BkLknJZ98QGoIza94rVjaEed0rzZ/jB9WrIuu/1+tjvYCWzVrystXtDswy7TPBeIepyXwSYa4WQ== + dependencies: + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/rlp" "^5.4.0" + "@ethersproject/signing-key" "^5.4.0" + +"@ethersproject/units@5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.4.0.tgz#d57477a4498b14b88b10396062c8cbbaf20c79fe" + integrity sha512-Z88krX40KCp+JqPCP5oPv5p750g+uU6gopDYRTBGcDvOASh6qhiEYCRatuM/suC4S2XW9Zz90QI35MfSrTIaFg== + dependencies: + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/constants" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + +"@ethersproject/wallet@5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.4.0.tgz#fa5b59830b42e9be56eadd45a16a2e0933ad9353" + integrity sha512-wU29majLjM6AjCjpat21mPPviG+EpK7wY1+jzKD0fg3ui5fgedf2zEu1RDgpfIMsfn8fJHJuzM4zXZ2+hSHaSQ== + dependencies: + "@ethersproject/abstract-provider" "^5.4.0" + "@ethersproject/abstract-signer" "^5.4.0" + "@ethersproject/address" "^5.4.0" + "@ethersproject/bignumber" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/hash" "^5.4.0" + "@ethersproject/hdnode" "^5.4.0" + "@ethersproject/json-wallets" "^5.4.0" + "@ethersproject/keccak256" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/random" "^5.4.0" + "@ethersproject/signing-key" "^5.4.0" + "@ethersproject/transactions" "^5.4.0" + "@ethersproject/wordlists" "^5.4.0" + +"@ethersproject/web@5.4.0", "@ethersproject/web@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.4.0.tgz#49fac173b96992334ed36a175538ba07a7413d1f" + integrity sha512-1bUusGmcoRLYgMn6c1BLk1tOKUIFuTg8j+6N8lYlbMpDesnle+i3pGSagGNvwjaiLo4Y5gBibwctpPRmjrh4Og== + dependencies: + "@ethersproject/base64" "^5.4.0" + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@ethersproject/wordlists@5.4.0", "@ethersproject/wordlists@^5.4.0": + version "5.4.0" + resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.4.0.tgz#f34205ec3bbc9e2c49cadaee774cf0b07e7573d7" + integrity sha512-FemEkf6a+EBKEPxlzeVgUaVSodU7G0Na89jqKjmWMlDB0tomoU8RlEMgUvXyqtrg8N4cwpLh8nyRnm1Nay1isA== + dependencies: + "@ethersproject/bytes" "^5.4.0" + "@ethersproject/hash" "^5.4.0" + "@ethersproject/logger" "^5.4.0" + "@ethersproject/properties" "^5.4.0" + "@ethersproject/strings" "^5.4.0" + +"@humanwhocodes/config-array@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" + integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.0.tgz#87de7af9c231826fdd68ac7258f77c429e0e5fcf" + integrity sha512-wdppn25U8z/2yiaT6YGquE6X8sSv7hNMWSXYSSU1jGv/yd6XqjXgTDJ8KP4NgjTXfJ3GbRjeeb8RTV7a/VpM+w== + +"@istanbuljs/load-nyc-config@^1.0.0": + version "1.1.0" + resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" + integrity sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ== + dependencies: + camelcase "^5.3.1" + find-up "^4.1.0" + get-package-type "^0.1.0" + js-yaml "^3.13.1" + resolve-from "^5.0.0" + +"@istanbuljs/nyc-config-typescript@^0.1.3": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/nyc-config-typescript/-/nyc-config-typescript-0.1.3.tgz#944d15b3ebdb71f963a628daffaa25ade981bb86" + integrity sha512-EzRFg92bRSD1W/zeuNkeGwph0nkWf+pP2l/lYW4/5hav7RjKKBN5kV1Ix7Tvi0CMu3pC4Wi/U7rNisiJMR3ORg== + +"@istanbuljs/schema@^0.1.2": + version "0.1.3" + resolved "https://registry.yarnpkg.com/@istanbuljs/schema/-/schema-0.1.3.tgz#e45e384e4b8ec16bce2fd903af78450f6bf7ec98" + integrity sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA== + +"@nodelib/fs.scandir@2.1.5": + version "2.1.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" + integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== + dependencies: + "@nodelib/fs.stat" "2.0.5" + run-parallel "^1.1.9" + +"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": + version "2.0.5" + resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" + integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== + +"@nodelib/fs.walk@^1.2.3": + version "1.2.8" + resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" + integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== + dependencies: + "@nodelib/fs.scandir" "2.1.5" + fastq "^1.6.0" + +"@nomiclabs/hardhat-ethers@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.2.tgz#c472abcba0c5185aaa4ad4070146e95213c68511" + integrity sha512-6quxWe8wwS4X5v3Au8q1jOvXYEPkS1Fh+cME5u6AwNdnI4uERvPlVjlgRWzpnb+Rrt1l/cEqiNRH9GlsBMSDQg== + +"@nomiclabs/hardhat-waffle@^2.0.1": + version "2.0.1" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.1.tgz#5d43654fba780720c5033dea240fe14f70ef4bd2" + integrity sha512-2YR2V5zTiztSH9n8BYWgtv3Q+EL0N5Ltm1PAr5z20uAY4SkkfylJ98CIqt18XFvxTD5x4K2wKBzddjV9ViDAZQ== + dependencies: + "@types/sinon-chai" "^3.2.3" + "@types/web3" "1.0.19" + +"@openzeppelin/contracts-governance@npm:@openzeppelin/contracts@^4.3.2": + version "4.3.2" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.3.2.tgz#ff80affd6d352dbe1bbc5b4e1833c41afd6283b6" + integrity sha512-AybF1cesONZStg5kWf6ao9OlqTZuPqddvprc0ky7lrUVOjXeKpmQ2Y9FK+6ygxasb+4aic4O5pneFBfwVsRRRg== + +"@openzeppelin/contracts@^2.4.0": + version "2.5.1" + resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-2.5.1.tgz#c76e3fc57aa224da3718ec351812a4251289db31" + integrity sha512-qIy6tLx8rtybEsIOAlrM4J/85s2q2nPkDqj/Rx46VakBZ0LwtFhXIVub96LXHczQX0vaqmAueDqNPXtbSXSaYQ== + +"@polkadot/api-derive@6.0.5": + version "6.0.5" + resolved "https://registry.yarnpkg.com/@polkadot/api-derive/-/api-derive-6.0.5.tgz#f75038822517602ad7cb6421a32e282f7570f16a" + integrity sha512-I4Lq2bde5Mbw1vdiZQQHUg9+WzJqGR2NwWPej0jfEO9wWvCSri1d9c7KxgTZRLkb276L8FZu/o8P/uuC3nC56w== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/api" "6.0.5" + "@polkadot/rpc-core" "6.0.5" + "@polkadot/types" "6.0.5" + "@polkadot/util" "^7.4.1" + "@polkadot/util-crypto" "^7.4.1" + rxjs "^7.3.0" + +"@polkadot/api@6.0.5": + version "6.0.5" + resolved "https://registry.yarnpkg.com/@polkadot/api/-/api-6.0.5.tgz#2474d4a5b06625159248816a89386340f943e5fc" + integrity sha512-DX0bN358SWP5F52UxBIl4A0/fIhua0mFhbcGLlu/JoElzqHJMxPaQU7hPRMS3fB7+YvZ3h/3VMSQ9V0bnw9hYA== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/api-derive" "6.0.5" + "@polkadot/keyring" "^7.4.1" + "@polkadot/rpc-core" "6.0.5" + "@polkadot/rpc-provider" "6.0.5" + "@polkadot/types" "6.0.5" + "@polkadot/types-known" "6.0.5" + "@polkadot/util" "^7.4.1" + "@polkadot/util-crypto" "^7.4.1" + eventemitter3 "^4.0.7" + rxjs "^7.3.0" + +"@polkadot/keyring@^7.4.1": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/keyring/-/keyring-7.4.1.tgz#cda3f371cc2a9bf4b8847bad41c4c14edfb05745" + integrity sha512-3QCfhiv8O2vpbQ4qThn7aQSEZ3EJm0WMJ1TxklKdzaZ+5K6kVFXOGbS3ntRXXjjtoOPSPuyjOiOq2YEi+69s4A== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/util" "7.4.1" + "@polkadot/util-crypto" "7.4.1" + +"@polkadot/networks@7.4.1", "@polkadot/networks@^7.4.1": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/networks/-/networks-7.4.1.tgz#02b4a1a159e64b90a08d0f3a0206858b64846a3b" + integrity sha512-V+IagmVtaoDwR6zA+8R4JeihuTVJlheeYbDJyYCIyS9WtYImb5c7j/83XzoGicx+2auc+rwK2dH8hxHboi8Quw== + dependencies: + "@babel/runtime" "^7.15.4" + +"@polkadot/rpc-core@6.0.5": + version "6.0.5" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-core/-/rpc-core-6.0.5.tgz#10e6c236d833573c8512079811034d4e82cbc86f" + integrity sha512-jfC2HyjFPs1F3vTcWCkehb3QkUpF4548Ksx8svfOpaOnJqv1fRMcnqUSSsxNtgyIr7P90Zc5tXeCTujznvLy+A== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/rpc-provider" "6.0.5" + "@polkadot/types" "6.0.5" + "@polkadot/util" "^7.4.1" + rxjs "^7.3.0" + +"@polkadot/rpc-provider@6.0.5": + version "6.0.5" + resolved "https://registry.yarnpkg.com/@polkadot/rpc-provider/-/rpc-provider-6.0.5.tgz#a7dec0eb615ca4650275da03fff9ed7f19932006" + integrity sha512-PlF3hS6nLsxKIGIONVF8r30p+UwZGEpf6uWf1dsLByXFVHKO1fDfJIfDUlOZXC86YxYC3uwjn3IWf0GB6MfOUg== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/types" "6.0.5" + "@polkadot/util" "^7.4.1" + "@polkadot/util-crypto" "^7.4.1" + "@polkadot/x-fetch" "^7.4.1" + "@polkadot/x-global" "^7.4.1" + "@polkadot/x-ws" "^7.4.1" + eventemitter3 "^4.0.7" + +"@polkadot/types-known@6.0.5": + version "6.0.5" + resolved "https://registry.yarnpkg.com/@polkadot/types-known/-/types-known-6.0.5.tgz#e9b52a9e9f2c0df674163a6ae8ba3078f2fea156" + integrity sha512-cP7iIGnbXuFyiV/OYZfrGhgOj/nXQlwTofavTqJr2NpXlRwqzvGSO63Dvfyliy7aHpzLGizLGu8yxq4hCxJw4w== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/networks" "^7.4.1" + "@polkadot/types" "6.0.5" + "@polkadot/util" "^7.4.1" + +"@polkadot/types@6.0.5": + version "6.0.5" + resolved "https://registry.yarnpkg.com/@polkadot/types/-/types-6.0.5.tgz#7998bec6b0429df341554e4f77f33a19e47eda81" + integrity sha512-KpYN0FpNEQPhk1aMQE8aN3OFPqkJNIbeJ0b7njMg8+zuXpYinSAs+7BWdtdOxFoujWLXKKycw2FNAvQIiP5MnQ== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/util" "^7.4.1" + "@polkadot/util-crypto" "^7.4.1" + rxjs "^7.3.0" + +"@polkadot/util-crypto@7.4.1", "@polkadot/util-crypto@^7.4.1": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/util-crypto/-/util-crypto-7.4.1.tgz#76760df995e9feb7deef69d85cab6c13e9ceb977" + integrity sha512-ragnHzqROJl6mlWDIgcHHMM42XA/v7BlnATbVEkKuKOV8xHmdpNHDdtTsqwWzJ+F+oV1jeITaIUZqPuEDWloiw== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/networks" "7.4.1" + "@polkadot/util" "7.4.1" + "@polkadot/wasm-crypto" "^4.2.1" + "@polkadot/x-randomvalues" "7.4.1" + base-x "^3.0.8" + base64-js "^1.5.1" + blakejs "^1.1.1" + bn.js "^4.12.0" + create-hash "^1.2.0" + ed2curve "^0.3.0" + elliptic "^6.5.4" + hash.js "^1.1.7" + js-sha3 "^0.8.0" + scryptsy "^2.1.0" + tweetnacl "^1.0.3" + xxhashjs "^0.2.2" + +"@polkadot/util@7.4.1", "@polkadot/util@^7.4.1": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/util/-/util-7.4.1.tgz#f5aa9b60e5ca5c5b8f0d188beb7cbd47dd6c4041" + integrity sha512-HHsVVh8XpeIZZEHJDMZ8tCBnS2UfVuiZ4+79IuQln437HxL1uVfuTyv0mx0qsv6KsOyifMpxrUBfeAlna5jrWA== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/x-textdecoder" "7.4.1" + "@polkadot/x-textencoder" "7.4.1" + "@types/bn.js" "^4.11.6" + bn.js "^4.12.0" + camelcase "^6.2.0" + ip-regex "^4.3.0" + +"@polkadot/wasm-crypto-asmjs@^4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-asmjs/-/wasm-crypto-asmjs-4.2.1.tgz#6b7eae1c011709f8042dfd30872a5fc5e9e021c0" + integrity sha512-ON9EBpTNDCI3QRUmuQJIegYoAcwvxDaNNA7uwKTaEEStu8LjCIbQxbt4WbOBYWI0PoUpl4iIluXdT3XZ3V3jXA== + dependencies: + "@babel/runtime" "^7.15.3" + +"@polkadot/wasm-crypto-wasm@^4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto-wasm/-/wasm-crypto-wasm-4.2.1.tgz#2a86f9b405e7195c3f523798c6ce4afffd19737e" + integrity sha512-Rs2CKiR4D+2hKzmKBfPNYxcd2E8NfLWia0av4fgicjT9YsWIWOGQUi9AtSOfazPOR9FrjxKJy+chQxAkcfKMnQ== + dependencies: + "@babel/runtime" "^7.15.3" + +"@polkadot/wasm-crypto@^4.2.1": + version "4.2.1" + resolved "https://registry.yarnpkg.com/@polkadot/wasm-crypto/-/wasm-crypto-4.2.1.tgz#4d09402f5ac71a90962fb58cbe4b1707772a4fb6" + integrity sha512-C/A/QnemOilRTLnM0LfhPY2N/x3ZFd1ihm9sXYyuh98CxtekSVYI9h4IJ5Jrgz5imSUHgvt9oJLqJ5GbWQV/Zg== + dependencies: + "@babel/runtime" "^7.15.3" + "@polkadot/wasm-crypto-asmjs" "^4.2.1" + "@polkadot/wasm-crypto-wasm" "^4.2.1" + +"@polkadot/x-fetch@^7.4.1": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-fetch/-/x-fetch-7.4.1.tgz#70dc3f648981f24b32afbcfb5b59e2000c72f4b2" + integrity sha512-ot7VcBVVSnrh+Kt0I+p/YISsenRFpmFl6sBGk4qz90JlPbrmuc93iTTwyImi1QaT6wYBEGGcM56wyfTxkzGG4g== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/x-global" "7.4.1" + "@types/node-fetch" "^2.5.12" + node-fetch "^2.6.2" + +"@polkadot/x-global@7.4.1", "@polkadot/x-global@^7.4.1": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-global/-/x-global-7.4.1.tgz#66f7f8a5d0208832773a4606c56d10e7927552fc" + integrity sha512-am24TT18b3H028ERjOtfrMt1MBIU4PN17n7+tpDmnS09HA+6ebfLlVTSU5gDWNu9p0EjzE0gOMTJIUw62mzkkg== + dependencies: + "@babel/runtime" "^7.15.4" + +"@polkadot/x-randomvalues@7.4.1": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-randomvalues/-/x-randomvalues-7.4.1.tgz#e48d6c7fa869f5f871b2d18aa8b864c9802e9aeb" + integrity sha512-7XRXcII5zoGXXpRInR61DZsWW3XWqkOWctbrWSgT5psrw9rGmHs2iyRa8lsqtGUAFCiFM0FcRwSJ/hbRodgLKQ== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/x-global" "7.4.1" + +"@polkadot/x-textdecoder@7.4.1": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-textdecoder/-/x-textdecoder-7.4.1.tgz#e0e0bc375d5aa7fad8929a7ea1c279884c57ad26" + integrity sha512-7tbwF8u1SJGS/AUWee3ZukcyW6o03ZVbgvXYcPtd+Xfx8WXUuUih0bJVeF7B0HevenBpqCWjsdcAQIJOcHOBpg== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/x-global" "7.4.1" + +"@polkadot/x-textencoder@7.4.1": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-textencoder/-/x-textencoder-7.4.1.tgz#0411213c6ab3f6f80af074f49ed12174c3e28775" + integrity sha512-QYdSQ8mGj3LXGSWQOUKh/3ZlmDgSaHA+nKmIWwgdzXStfy77ErQbIo+AVQsDSdbr+bDAteugWPO+AoSBAqBkHg== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/x-global" "7.4.1" + +"@polkadot/x-ws@^7.4.1": + version "7.4.1" + resolved "https://registry.yarnpkg.com/@polkadot/x-ws/-/x-ws-7.4.1.tgz#94b310e3385dabf550adba99a2a06cbf03a737cb" + integrity sha512-OLM61XX8Ut8NiCqKjraDr+t8WNFGZEuhOOzyPiFfUYqSML12U0/xrdbkS2AQTrtey4Cxv7iJB9GWCjn0amM4LQ== + dependencies: + "@babel/runtime" "^7.15.4" + "@polkadot/x-global" "7.4.1" + "@types/websocket" "^1.0.4" + websocket "^1.0.34" + +"@sentry/core@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/core/-/core-5.30.0.tgz#6b203664f69e75106ee8b5a2fe1d717379b331f3" + integrity sha512-TmfrII8w1PQZSZgPpUESqjB+jC6MvZJZdLtE/0hZ+SrnKhW3x5WlYLvTXZpcWePYBku7rl2wn1RZu6uT0qCTeg== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/hub@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/hub/-/hub-5.30.0.tgz#2453be9b9cb903404366e198bd30c7ca74cdc100" + integrity sha512-2tYrGnzb1gKz2EkMDQcfLrDTvmGcQPuWxLnJKXJvYTQDGLlEvi2tWz1VIHjunmOvJrB5aIQLhm+dcMRwFZDCqQ== + dependencies: + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/minimal@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/minimal/-/minimal-5.30.0.tgz#ce3d3a6a273428e0084adcb800bc12e72d34637b" + integrity sha512-BwWb/owZKtkDX+Sc4zCSTNcvZUq7YcH3uAVlmh/gtR9rmUvbzAA3ewLuB3myi4wWRAMEtny6+J/FN/x+2wn9Xw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sentry/node@^5.18.1": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/node/-/node-5.30.0.tgz#4ca479e799b1021285d7fe12ac0858951c11cd48" + integrity sha512-Br5oyVBF0fZo6ZS9bxbJZG4ApAjRqAnqFFurMVJJdunNb80brh7a5Qva2kjhm+U6r9NJAB5OmDyPkA1Qnt+QVg== + dependencies: + "@sentry/core" "5.30.0" + "@sentry/hub" "5.30.0" + "@sentry/tracing" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + cookie "^0.4.1" + https-proxy-agent "^5.0.0" + lru_map "^0.3.3" + tslib "^1.9.3" + +"@sentry/tracing@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-5.30.0.tgz#501d21f00c3f3be7f7635d8710da70d9419d4e1f" + integrity sha512-dUFowCr0AIMwiLD7Fs314Mdzcug+gBVo/+NCMyDw8tFxJkwWAKl7Qa2OZxLQ0ZHjakcj1hNKfCQJ9rhyfOl4Aw== + dependencies: + "@sentry/hub" "5.30.0" + "@sentry/minimal" "5.30.0" + "@sentry/types" "5.30.0" + "@sentry/utils" "5.30.0" + tslib "^1.9.3" + +"@sentry/types@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/types/-/types-5.30.0.tgz#19709bbe12a1a0115bc790b8942917da5636f402" + integrity sha512-R8xOqlSTZ+htqrfteCWU5Nk0CDN5ApUTvrlvBuiH1DyP6czDZ4ktbZB0hAgBlVcK0U+qpD3ag3Tqqpa5Q67rPw== + +"@sentry/utils@5.30.0": + version "5.30.0" + resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-5.30.0.tgz#9a5bd7ccff85ccfe7856d493bffa64cabc41e980" + integrity sha512-zaYmoH0NWWtvnJjC9/CBseXMtKHm/tm40sz3YfJRxeQjyzRqNQPgivpd9R/oDJCYj999mzdW382p/qi2ypjLww== + dependencies: + "@sentry/types" "5.30.0" + tslib "^1.9.3" + +"@sindresorhus/is@^0.14.0": + version "0.14.0" + resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" + integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== + +"@sinonjs/commons@^1.7.0": + version "1.8.3" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d" + integrity sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^7.1.0": + version "7.1.2" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz#2524eae70c4910edccf99b2f4e6efc5894aff7b5" + integrity sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg== + dependencies: + "@sinonjs/commons" "^1.7.0" + +"@solidity-parser/parser@^0.11.0": + version "0.11.1" + resolved "https://registry.yarnpkg.com/@solidity-parser/parser/-/parser-0.11.1.tgz#fa840af64840c930f24a9c82c08d4a092a068add" + integrity sha512-H8BSBoKE8EubJa0ONqecA2TviT3TnHeC4NpgnAHSUiuhZoQBfPB4L2P9bs8R6AoTW10Endvh3vc+fomVMIDIYQ== + +"@szmarczak/http-timer@^1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" + integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== + dependencies: + defer-to-connect "^1.0.1" + +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + +"@typechain/ethers-v5@^6.0.0": + version "6.0.5" + resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-6.0.5.tgz#39bbf9baadd0e8d9efad9d16c60152b7cd9a467b" + integrity sha512-KJh+EWuxmX1a17fQWS1ba8DCYcqK7UpdbqMZZwyfiv9FQfn8ZQJX17anbkCMOSU8TV3EvRuJ/vFEKGzKnpkO8g== + +"@types/abstract-leveldown@*": + version "5.0.2" + resolved "https://registry.yarnpkg.com/@types/abstract-leveldown/-/abstract-leveldown-5.0.2.tgz#ee81917fe38f770e29eec8139b6f16ee4a8b0a5f" + integrity sha512-+jA1XXF3jsz+Z7FcuiNqgK53hTa/luglT2TyTpKPqoYbxVY+mCPF22Rm+q3KPBrMHJwNXFrTViHszBOfU4vftQ== + +"@types/bn.js@*", "@types/bn.js@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" + integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA== + dependencies: + "@types/node" "*" + +"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.5", "@types/bn.js@^4.11.6": + version "4.11.6" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" + integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== + dependencies: + "@types/node" "*" + +"@types/chai@*": + version "4.2.22" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.22.tgz#47020d7e4cf19194d43b5202f35f75bd2ad35ce7" + integrity sha512-tFfcE+DSTzWAgifkjik9AySNqIyNoYwmR+uecPwwD/XRNfvOjmC/FjCxpiUGDkDVDphPfCUecSQVFw+lN3M3kQ== + +"@types/chai@^4.2.11": + version "4.2.21" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.2.21.tgz#9f35a5643129df132cf3b5c1ec64046ea1af0650" + integrity sha512-yd+9qKmJxm496BOV9CMNaey8TWsikaZOwMRwPHQIjcOJM9oV+fi9ZMNw3JsVnbEEbo2gRTDnGEBv8pjyn67hNg== + +"@types/json-schema@^7.0.7": + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== + +"@types/level-errors@*": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@types/level-errors/-/level-errors-3.0.0.tgz#15c1f4915a5ef763b51651b15e90f6dc081b96a8" + integrity sha512-/lMtoq/Cf/2DVOm6zE6ORyOM+3ZVm/BvzEZVxUhf6bgh8ZHglXlBqxbxSlJeVp8FCbD3IVvk/VbsaNmDjrQvqQ== + +"@types/levelup@^4.3.0": + version "4.3.3" + resolved "https://registry.yarnpkg.com/@types/levelup/-/levelup-4.3.3.tgz#4dc2b77db079b1cf855562ad52321aa4241b8ef4" + integrity sha512-K+OTIjJcZHVlZQN1HmU64VtrC0jC3dXWQozuEIR9zVvltIk90zaGPM2AgT+fIkChpzHhFE3YnvFLCbLtzAmexA== + dependencies: + "@types/abstract-leveldown" "*" + "@types/level-errors" "*" + "@types/node" "*" + +"@types/lru-cache@^5.1.0": + version "5.1.1" + resolved "https://registry.yarnpkg.com/@types/lru-cache/-/lru-cache-5.1.1.tgz#c48c2e27b65d2a153b19bfc1a317e30872e01eef" + integrity sha512-ssE3Vlrys7sdIzs5LOxCzTVMsU7i9oa/IaW92wF32JFb3CVczqOkru2xspuKczHEbG3nvmPY7IFqVmGGHdNbYw== + +"@types/mkdirp@^0.5.2": + version "0.5.2" + resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" + integrity sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg== + dependencies: + "@types/node" "*" + +"@types/mocha@^7.0.2": + version "7.0.2" + resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-7.0.2.tgz#b17f16cf933597e10d6d78eae3251e692ce8b0ce" + integrity sha512-ZvO2tAcjmMi8V/5Z3JsyofMe3hasRcaw88cto5etSVMwVQfeivGAlEYmaQgceUSVYFofVjT+ioHsATjdWcFt1w== + +"@types/node-fetch@^2.5.12": + version "2.5.12" + resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.12.tgz#8a6f779b1d4e60b7a57fb6fd48d84fb545b9cc66" + integrity sha512-MKgC4dlq4kKNa/mYrwpKfzQMB5X3ee5U6fSprkKpToBqBmX4nFZL9cW5jl6sWn+xpRJ7ypWh2yyqqr8UUCstSw== + dependencies: + "@types/node" "*" + form-data "^3.0.0" + +"@types/node@*": + version "16.4.13" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.4.13.tgz#7dfd9c14661edc65cccd43a29eb454174642370d" + integrity sha512-bLL69sKtd25w7p1nvg9pigE4gtKVpGTPojBFLMkGHXuUgap2sLqQt2qUnqmVCDfzGUL0DRNZP+1prIZJbMeAXg== + +"@types/node@^12.12.6": + version "12.20.19" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.19.tgz#538e61fc220f77ae4a4663c3d8c3cb391365c209" + integrity sha512-niAuZrwrjKck4+XhoCw6AAVQBENHftpXw9F4ryk66fTgYaKQ53R4FI7c9vUGGw5vQis1HKBHDR1gcYI/Bq1xvw== + +"@types/node@^14.0.14": + version "14.17.9" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.9.tgz#b97c057e6138adb7b720df2bd0264b03c9f504fd" + integrity sha512-CMjgRNsks27IDwI785YMY0KLt3co/c0cQ5foxHYv/shC2w8oOnVwz5Ubq1QG5KzrcW+AXk6gzdnxIkDnTvzu3g== + +"@types/pbkdf2@^3.0.0": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" + integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== + dependencies: + "@types/node" "*" + +"@types/prettier@^2.1.1": + version "2.3.2" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.3.2.tgz#fc8c2825e4ed2142473b4a81064e6e081463d1b3" + integrity sha512-eI5Yrz3Qv4KPUa/nSIAi0h+qX0XyewOliug5F2QAtuRg6Kjg6jfmxe1GIwoIRhZspD1A0RP8ANrPwvEXXtRFog== + +"@types/resolve@^0.0.8": + version "0.0.8" + resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" + integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== + dependencies: + "@types/node" "*" + +"@types/secp256k1@^4.0.1": + version "4.0.3" + resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.3.tgz#1b8e55d8e00f08ee7220b4d59a6abe89c37a901c" + integrity sha512-Da66lEIFeIz9ltsdMZcpQvmrmmoqrfju8pm1BH8WbYjZSwUgCwXLb9C+9XYogwBITnbsSaMdVPb2ekf7TV+03w== + dependencies: + "@types/node" "*" + +"@types/sinon-chai@^3.2.3": + version "3.2.5" + resolved "https://registry.yarnpkg.com/@types/sinon-chai/-/sinon-chai-3.2.5.tgz#df21ae57b10757da0b26f512145c065f2ad45c48" + integrity sha512-bKQqIpew7mmIGNRlxW6Zli/QVyc3zikpGzCa797B/tRnD9OtHvZ/ts8sYXV+Ilj9u3QRaUEM8xrjgd1gwm1BpQ== + dependencies: + "@types/chai" "*" + "@types/sinon" "*" + +"@types/sinon@*": + version "10.0.3" + resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.3.tgz#2d17cf53f42981e8ebd3e2339dade748b0da742a" + integrity sha512-XUaFuUOQ3A/r6gS1qCU/USMleascaqGeQpGR1AZ5JdRtBPlzijRzKsik1TuGzvdtPA0mdq42JqaJmJ+Afg1LJg== + dependencies: + "@sinonjs/fake-timers" "^7.1.0" + +"@types/underscore@*", "@types/underscore@^1.10.1": + version "1.11.3" + resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.11.3.tgz#d6734f3741ce41b2630018c6b61c6745f6188c07" + integrity sha512-Fl1TX1dapfXyDqFg2ic9M+vlXRktcPJrc4PR7sRc7sdVrjavg/JHlbUXBt8qWWqhJrmSqg3RNAkAPRiOYw6Ahw== + +"@types/web3@1.0.19": + version "1.0.19" + resolved "https://registry.yarnpkg.com/@types/web3/-/web3-1.0.19.tgz#46b85d91d398ded9ab7c85a5dd57cb33ac558924" + integrity sha512-fhZ9DyvDYDwHZUp5/STa9XW2re0E8GxoioYJ4pEUZ13YHpApSagixj7IAdoYH5uAK+UalGq6Ml8LYzmgRA/q+A== + dependencies: + "@types/bn.js" "*" + "@types/underscore" "*" + +"@types/websocket@^1.0.4": + version "1.0.4" + resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-1.0.4.tgz#1dc497280d8049a5450854dd698ee7e6ea9e60b8" + integrity sha512-qn1LkcFEKK8RPp459jkjzsfpbsx36BBt3oC3pITYtkoBw/aVX+EZFa5j3ThCRTNpLFvIMr5dSTD4RaMdilIOpA== + dependencies: + "@types/node" "*" + +"@types/yargs-parser@*": + version "20.2.1" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-20.2.1.tgz#3b9ce2489919d9e4fea439b76916abc34b2df129" + integrity sha512-7tFImggNeNBVMsn0vLrpn1H1uPrUBdnARPTpZoitY37ZrdJREzf7I16tMrlK3hen349gr1NYh8CmZQa7CTG6Aw== + +"@types/yargs@^15.0.9": + version "15.0.14" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.14.tgz#26d821ddb89e70492160b66d10a0eb6df8f6fb06" + integrity sha512-yEJzHoxf6SyQGhBhIYGXQDSCkJjB6HohDShto7m8vaKg9Yp0Yn8+71J9eakh2bnPg6BfsH9PRMhiRTZnd4eXGQ== + dependencies: + "@types/yargs-parser" "*" + +"@typescript-eslint/eslint-plugin@^4.22.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.29.0.tgz#b866c9cd193bfaba5e89bade0015629ebeb27996" + integrity sha512-eiREtqWRZ8aVJcNru7cT/AMVnYd9a2UHsfZT8MR1dW3UUEg6jDv9EQ9Cq4CUPZesyQ58YUpoAADGv71jY8RwgA== + dependencies: + "@typescript-eslint/experimental-utils" "4.29.0" + "@typescript-eslint/scope-manager" "4.29.0" + debug "^4.3.1" + functional-red-black-tree "^1.0.1" + regexpp "^3.1.0" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/experimental-utils@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.29.0.tgz#19b1417602d0e1ef325b3312ee95f61220542df5" + integrity sha512-FpNVKykfeaIxlArLUP/yQfv/5/3rhl1ov6RWgud4OgbqWLkEq7lqgQU9iiavZRzpzCRQV4XddyFz3wFXdkiX9w== + dependencies: + "@types/json-schema" "^7.0.7" + "@typescript-eslint/scope-manager" "4.29.0" + "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/typescript-estree" "4.29.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + +"@typescript-eslint/parser@^4.22.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.29.0.tgz#e5367ca3c63636bb5d8e0748fcbab7a4f4a04289" + integrity sha512-+92YRNHFdXgq+GhWQPT2bmjX09X7EH36JfgN2/4wmhtwV/HPxozpCNst8jrWcngLtEVd/4zAwA6BKojAlf+YqA== + dependencies: + "@typescript-eslint/scope-manager" "4.29.0" + "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/typescript-estree" "4.29.0" + debug "^4.3.1" + +"@typescript-eslint/scope-manager@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.29.0.tgz#cf5474f87321bedf416ef65839b693bddd838599" + integrity sha512-HPq7XAaDMM3DpmuijxLV9Io8/6pQnliiXMQUcAdjpJJSR+fdmbD/zHCd7hMkjJn04UQtCQBtshgxClzg6NIS2w== + dependencies: + "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/visitor-keys" "4.29.0" + +"@typescript-eslint/types@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.29.0.tgz#c8f1a1e4441ea4aca9b3109241adbc145f7f8a4e" + integrity sha512-2YJM6XfWfi8pgU2HRhTp7WgRw78TCRO3dOmSpAvIQ8MOv4B46JD2chnhpNT7Jq8j0APlIbzO1Bach734xxUl4A== + +"@typescript-eslint/typescript-estree@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.29.0.tgz#af7ab547757b86c91bfdbc54ff86845410856256" + integrity sha512-8ZpNHDIOyqzzgZrQW9+xQ4k5hM62Xy2R4RPO3DQxMc5Rq5QkCdSpk/drka+DL9w6sXNzV5nrdlBmf8+x495QXQ== + dependencies: + "@typescript-eslint/types" "4.29.0" + "@typescript-eslint/visitor-keys" "4.29.0" + debug "^4.3.1" + globby "^11.0.3" + is-glob "^4.0.1" + semver "^7.3.5" + tsutils "^3.21.0" + +"@typescript-eslint/visitor-keys@4.29.0": + version "4.29.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.29.0.tgz#1ff60f240def4d85ea68d4fd2e4e9759b7850c04" + integrity sha512-LoaofO1C/jAJYs0uEpYMXfHboGXzOJeV118X4OsZu9f7rG7Pr9B3+4HTU8+err81rADa4xfQmAxnRnPAI2jp+Q== + dependencies: + "@typescript-eslint/types" "4.29.0" + eslint-visitor-keys "^2.0.0" + +"@ungap/promise-all-settled@1.1.2": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" + integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== + +abab@^2.0.3, abab@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" + integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== + +abort-controller@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/abort-controller/-/abort-controller-3.0.0.tgz#eaf54d53b62bae4138e809ca225c8439a6efb392" + integrity sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg== + dependencies: + event-target-shim "^5.0.0" + +abstract-leveldown@^6.2.1: + version "6.3.0" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz#d25221d1e6612f820c35963ba4bd739928f6026a" + integrity sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +abstract-leveldown@~6.2.1: + version "6.2.3" + resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz#036543d87e3710f2528e47040bc3261b77a9a8eb" + integrity sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ== + dependencies: + buffer "^5.5.0" + immediate "^3.2.3" + level-concat-iterator "~2.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +accepts@~1.3.7: + version "1.3.7" + resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" + integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== + dependencies: + mime-types "~2.1.24" + negotiator "0.6.2" + +acorn-globals@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" + integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== + dependencies: + acorn "^7.1.1" + acorn-walk "^7.1.1" + +acorn-jsx@^5.3.1: + version "5.3.2" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" + integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== + +acorn-walk@^7.1.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" + integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== + +acorn@^7.1.1, acorn@^7.4.0: + version "7.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" + integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== + +acorn@^8.2.4: + version "8.4.1" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.4.1.tgz#56c36251fc7cabc7096adc18f05afe814321a28c" + integrity sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA== + +adm-zip@^0.4.16: + version "0.4.16" + resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" + integrity sha512-TFi4HBKSGfIKsK5YCkKaaFG2m4PEDyViZmEwof3MTIgzimHLto6muaHVpbrljdIvIrFZzEq/p4nafOeLcYegrg== + +aes-js@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" + integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= + +agent-base@6: + version "6.0.2" + resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" + integrity sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ== + dependencies: + debug "4" + +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4: + version "6.12.6" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + +ajv@^8.0.1: + version "8.6.2" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.6.2.tgz#2fb45e0e5fcbc0813326c1c3da535d1881bb0571" + integrity sha512-9807RlWAgT564wT+DjeyU5OFMPjmzxVobvDFmNAhY+5zD6A2ly3jDp6sgnfyDtlIQ+7H97oc/DGCzzfu9rjw9w== + dependencies: + fast-deep-equal "^3.1.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + uri-js "^4.2.2" + +ansi-colors@3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813" + integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw== + +ansi-colors@4.1.1, ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-escapes@^4.3.0: + version "4.3.2" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" + integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== + dependencies: + type-fest "^0.21.3" + +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= + +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + +ansi-regex@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" + integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== + +ansi-styles@^3.2.0, ansi-styles@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" + integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== + dependencies: + color-convert "^1.9.0" + +ansi-styles@^4.0.0, ansi-styles@^4.1.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" + integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== + dependencies: + color-convert "^2.0.1" + +anymatch@~3.1.1, anymatch@~3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" + integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== + dependencies: + normalize-path "^3.0.0" + picomatch "^2.0.4" + +append-transform@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/append-transform/-/append-transform-2.0.0.tgz#99d9d29c7b38391e6f428d28ce136551f0b77e12" + integrity sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg== + dependencies: + default-require-extensions "^3.0.0" + +archy@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" + integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= + +arg@^4.1.0: + version "4.1.3" + resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" + integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== + +argparse@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" + integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== + dependencies: + sprintf-js "~1.0.2" + +argparse@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" + integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== + +array-back@^1.0.3, array-back@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" + integrity sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs= + dependencies: + typical "^2.6.0" + +array-back@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/array-back/-/array-back-2.0.0.tgz#6877471d51ecc9c9bfa6136fb6c7d5fe69748022" + integrity sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw== + dependencies: + typical "^2.6.1" + +array-flatten@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" + integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= + +array-includes@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.3.tgz#c7f619b382ad2afaf5326cddfdc0afc61af7690a" + integrity sha512-gcem1KlBU7c9rB+Rq8/3PPKsK2kjqeEBa3bD5kkQo4nYlOHQCJqIJFqBXDEfwaRuYTT4E+FxA9xez7Gf/e3Q7A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + get-intrinsic "^1.1.1" + is-string "^1.0.5" + +array-union@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" + integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== + +array.prototype.flat@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz#6ef638b43312bd401b4c6199fdec7e2dc9e9a123" + integrity sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.1" + +arrify@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" + integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= + +asn1.js@^5.2.0: + version "5.4.1" + resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" + integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== + dependencies: + bn.js "^4.0.0" + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + safer-buffer "^2.1.0" + +asn1@~0.2.3: + version "0.2.4" + resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" + integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== + dependencies: + safer-buffer "~2.1.0" + +assert-plus@1.0.0, assert-plus@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" + integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= + +assertion-error@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" + integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== + +astral-regex@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" + integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== + +async-eventemitter@^0.2.4: + version "0.2.4" + resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" + integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== + dependencies: + async "^2.4.0" + +async-limiter@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" + integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== + +async@^2.4.0: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + +asynckit@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" + integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= + +available-typed-arrays@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.4.tgz#9e0ae84ecff20caae6a94a1c3bc39b955649b7a9" + integrity sha512-SA5mXJWrId1TaQjfxUYghbqQ/hYioKmLJvPJyDuYRtXXenFNMjj4hSSt1Cf1xsuXSXrtxrVC5Ot4eU6cOtBDdA== + +aws-sign2@~0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" + integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= + +aws4@^1.8.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" + integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +base-x@^3.0.2, base-x@^3.0.8: + version "3.0.8" + resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" + integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== + dependencies: + safe-buffer "^5.0.1" + +base64-js@^1.3.1, base64-js@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" + integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== + +bcrypt-pbkdf@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" + integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= + dependencies: + tweetnacl "^0.14.3" + +bech32@1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" + integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== + +bignumber.js@^9.0.0: + version "9.0.1" + resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" + integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== + +binary-extensions@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" + integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== + +blakejs@^1.1.0, blakejs@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.1.tgz#bf313053978b2cd4c444a48795710be05c785702" + integrity sha512-bLG6PHOCZJKNshTjGRBvET0vTciwQE6zFKOKKXPDJfwFBd4Ac0yBfPZqcGvGJap50l7ktvlpFqc2jGVaUgbJgg== + +bluebird@^3.5.0: + version "3.7.2" + resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" + integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== + +bn.js@4.11.6: + version "4.11.6" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" + integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= + +bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.12.0: + version "4.12.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" + integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== + +bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2, bn.js@^5.1.3: + version "5.2.0" + resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" + integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== + +body-parser@1.19.0, body-parser@^1.16.0: + version "1.19.0" + resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" + integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== + dependencies: + bytes "3.1.0" + content-type "~1.0.4" + debug "2.6.9" + depd "~1.1.2" + http-errors "1.7.2" + iconv-lite "0.4.24" + on-finished "~2.3.0" + qs "6.7.0" + raw-body "2.4.0" + type-is "~1.6.17" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +braces@^3.0.1, braces@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" + integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== + dependencies: + fill-range "^7.0.1" + +brorand@^1.0.1, brorand@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" + integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= + +browser-process-hrtime@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz#3c9b4b7d782c8121e56f10106d84c0d0ffc94626" + integrity sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow== + +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + +browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" + integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== + dependencies: + buffer-xor "^1.0.3" + cipher-base "^1.0.0" + create-hash "^1.1.0" + evp_bytestokey "^1.0.3" + inherits "^2.0.1" + safe-buffer "^5.0.1" + +browserify-cipher@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" + integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== + dependencies: + browserify-aes "^1.0.4" + browserify-des "^1.0.0" + evp_bytestokey "^1.0.0" + +browserify-des@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" + integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== + dependencies: + cipher-base "^1.0.1" + des.js "^1.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: + version "4.1.0" + resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" + integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== + dependencies: + bn.js "^5.0.0" + randombytes "^2.0.1" + +browserify-sign@^4.0.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" + integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== + dependencies: + bn.js "^5.1.1" + browserify-rsa "^4.0.1" + create-hash "^1.2.0" + create-hmac "^1.1.7" + elliptic "^6.5.3" + inherits "^2.0.4" + parse-asn1 "^5.1.5" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +browserslist@^4.16.6: + version "4.16.7" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.7.tgz#108b0d1ef33c4af1b587c54f390e7041178e4335" + integrity sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA== + dependencies: + caniuse-lite "^1.0.30001248" + colorette "^1.2.2" + electron-to-chromium "^1.3.793" + escalade "^3.1.1" + node-releases "^1.1.73" + +bs58@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" + integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= + dependencies: + base-x "^3.0.2" + +bs58check@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" + integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== + dependencies: + bs58 "^4.0.0" + create-hash "^1.1.0" + safe-buffer "^5.1.2" + +buffer-from@^1.0.0, buffer-from@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" + integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== + +buffer-to-arraybuffer@^0.0.5: + version "0.0.5" + resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" + integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo= + +buffer-writer@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/buffer-writer/-/buffer-writer-2.0.0.tgz#ce7eb81a38f7829db09c873f2fbb792c0c98ec04" + integrity sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw== + +buffer-xor@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" + integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= + +buffer-xor@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-2.0.2.tgz#34f7c64f04c777a1f8aac5e661273bb9dd320289" + integrity sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ== + dependencies: + safe-buffer "^5.1.1" + +buffer@^5.0.5, buffer@^5.5.0, buffer@^5.6.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" + integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== + dependencies: + base64-js "^1.3.1" + ieee754 "^1.1.13" + +bufferutil@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.3.tgz#66724b756bed23cd7c28c4d306d7994f9943cc6b" + integrity sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw== + dependencies: + node-gyp-build "^4.2.0" + +bytes@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" + integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== + +cacheable-request@^6.0.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" + integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== + dependencies: + clone-response "^1.0.2" + get-stream "^5.1.0" + http-cache-semantics "^4.0.0" + keyv "^3.0.0" + lowercase-keys "^2.0.0" + normalize-url "^4.1.0" + responselike "^1.0.2" + +caching-transform@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/caching-transform/-/caching-transform-4.0.0.tgz#00d297a4206d71e2163c39eaffa8157ac0651f0f" + integrity sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA== + dependencies: + hasha "^5.0.0" + make-dir "^3.0.0" + package-hash "^4.0.0" + write-file-atomic "^3.0.0" + +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + +callsites@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" + integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== + +camelcase@^5.0.0, camelcase@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + +camelcase@^6.0.0, camelcase@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" + integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== + +caniuse-lite@^1.0.30001248: + version "1.0.30001249" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001249.tgz#90a330057f8ff75bfe97a94d047d5e14fabb2ee8" + integrity sha512-vcX4U8lwVXPdqzPWi6cAJ3FnQaqXbBqy/GZseKNQzRj37J7qZdGcBtxq/QLFNLLlfsoXLUdHw8Iwenri86Tagw== + +caseless@~0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" + integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= + +chai@^4.2.0: + version "4.3.4" + resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" + integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== + dependencies: + assertion-error "^1.1.0" + check-error "^1.0.2" + deep-eql "^3.0.1" + get-func-name "^2.0.0" + pathval "^1.1.1" + type-detect "^4.0.5" + +chalk@^2.0.0, chalk@^2.4.1, chalk@^2.4.2: + version "2.4.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" + integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== + dependencies: + ansi-styles "^3.2.1" + escape-string-regexp "^1.0.5" + supports-color "^5.3.0" + +chalk@^4.0.0: + version "4.1.2" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" + integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== + dependencies: + ansi-styles "^4.1.0" + supports-color "^7.1.0" + +check-error@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" + integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= + +chokidar@3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.3.0.tgz#12c0714668c55800f659e262d4962a97faf554a6" + integrity sha512-dGmKLDdT3Gdl7fBUe8XK+gAtGmzy5Fn0XkkWQuYxGIgWVPPse2CxFA5mtrlD0TOHaHjEUqkWNyP1XdHoJES/4A== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.2.0" + optionalDependencies: + fsevents "~2.1.1" + +chokidar@3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" + integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.5.0" + optionalDependencies: + fsevents "~2.3.1" + +chokidar@^3.4.0: + version "3.5.2" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.2.tgz#dba3976fcadb016f66fd365021d91600d01c1e75" + integrity sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ== + dependencies: + anymatch "~3.1.2" + braces "~3.0.2" + glob-parent "~5.1.2" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.6.0" + optionalDependencies: + fsevents "~2.3.2" + +chownr@^1.1.1: + version "1.1.4" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" + integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== + +ci-info@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" + integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== + +cids@^0.7.1: + version "0.7.5" + resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" + integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== + dependencies: + buffer "^5.5.0" + class-is "^1.1.0" + multibase "~0.6.0" + multicodec "^1.0.0" + multihashes "~0.4.15" + +cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" + integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +class-is@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" + integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== + +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + +cliui@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-6.0.0.tgz#511d702c0c4e41ca156d7d0e96021f23e13225b1" + integrity sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^6.2.0" + +cliui@^7.0.2: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + +clone-response@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" + integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= + dependencies: + mimic-response "^1.0.0" + +color-convert@^1.9.0: + version "1.9.3" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" + integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== + dependencies: + color-name "1.1.3" + +color-convert@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" + integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== + dependencies: + color-name "~1.1.4" + +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" + integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= + +color-name@~1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" + integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== + +colorette@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" + integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== + +combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: + version "1.0.8" + resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" + integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== + dependencies: + delayed-stream "~1.0.0" + +command-exists@^1.2.8: + version "1.2.9" + resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" + integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== + +command-line-args@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.7.tgz#f8d1916ecb90e9e121eda6428e41300bfb64cc46" + integrity sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA== + dependencies: + array-back "^2.0.0" + find-replace "^1.0.3" + typical "^2.6.1" + +commander@3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" + integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== + +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + +commondir@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" + integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +confusing-browser-globals@^1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" + integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== + +content-disposition@0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" + integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== + dependencies: + safe-buffer "5.1.2" + +content-hash@^2.5.2: + version "2.5.2" + resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" + integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== + dependencies: + cids "^0.7.1" + multicodec "^0.5.5" + multihashes "^0.4.15" + +content-type@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" + integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== + +convert-source-map@^1.7.0: + version "1.8.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369" + integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== + dependencies: + safe-buffer "~5.1.1" + +cookie-signature@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" + integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= + +cookie@0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" + integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== + +cookie@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.1.tgz#afd713fe26ebd21ba95ceb61f9a8116e50a537d1" + integrity sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA== + +cookiejar@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" + integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== + +copyfiles@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5" + integrity sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg== + dependencies: + glob "^7.0.5" + minimatch "^3.0.3" + mkdirp "^1.0.4" + noms "0.0.0" + through2 "^2.0.1" + untildify "^4.0.0" + yargs "^16.1.0" + +core-js-pure@^3.0.1: + version "3.16.0" + resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.16.0.tgz#218e07add3f1844e53fab195c47871fc5ba18de8" + integrity sha512-wzlhZNepF/QA9yvx3ePDgNGudU5KDB8lu/TRPKelYA/QtSnkS/cLl2W+TIdEX1FAFcBr0YpY7tPDlcmXJ7AyiQ== + +core-js@^2.6.5: + version "2.6.12" + resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" + integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== + +core-util-is@1.0.2, core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= + +cors@^2.8.1: + version "2.8.5" + resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" + integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== + dependencies: + object-assign "^4" + vary "^1" + +crc-32@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/crc-32/-/crc-32-1.2.0.tgz#cb2db6e29b88508e32d9dd0ec1693e7b41a18208" + integrity sha512-1uBwHxF+Y/4yF5G48fwnKq6QsIXheor3ZLPT80yGBV1oEUwpPojlEhQbWKVw1VwcTQyMGHK1/XMmTjmlsmTTGA== + dependencies: + exit-on-epipe "~1.0.1" + printj "~1.1.0" + +create-ecdh@^4.0.0: + version "4.0.4" + resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" + integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== + dependencies: + bn.js "^4.1.0" + elliptic "^6.5.3" + +create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" + integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== + dependencies: + cipher-base "^1.0.1" + inherits "^2.0.1" + md5.js "^1.3.4" + ripemd160 "^2.0.1" + sha.js "^2.4.0" + +create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" + integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== + dependencies: + cipher-base "^1.0.3" + create-hash "^1.1.0" + inherits "^2.0.1" + ripemd160 "^2.0.0" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +cross-spawn@^6.0.0: + version "6.0.5" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" + integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== + dependencies: + nice-try "^1.0.4" + path-key "^2.0.1" + semver "^5.5.0" + shebang-command "^1.2.0" + which "^1.2.9" + +cross-spawn@^7.0.0, cross-spawn@^7.0.2: + version "7.0.3" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" + integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== + dependencies: + path-key "^3.1.0" + shebang-command "^2.0.0" + which "^2.0.1" + +crypto-browserify@3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" + integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== + dependencies: + browserify-cipher "^1.0.0" + browserify-sign "^4.0.0" + create-ecdh "^4.0.0" + create-hash "^1.1.0" + create-hmac "^1.1.0" + diffie-hellman "^5.0.0" + inherits "^2.0.1" + pbkdf2 "^3.0.3" + public-encrypt "^4.0.0" + randombytes "^2.0.0" + randomfill "^1.0.3" + +cssom@^0.4.4: + version "0.4.4" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.4.4.tgz#5a66cf93d2d0b661d80bf6a44fb65f5c2e4e0a10" + integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== + +cssom@~0.3.6: + version "0.3.8" + resolved "https://registry.yarnpkg.com/cssom/-/cssom-0.3.8.tgz#9f1276f5b2b463f2114d3f2c75250af8c1a36f4a" + integrity sha512-b0tGHbfegbhPJpxpiBPU2sCkigAqtM9O121le6bbOlgyV+NyGyCmVfJ6QW9eRjz8CpNfWEOYBIMIGRYkLwsIYg== + +cssstyle@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" + integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== + dependencies: + cssom "~0.3.6" + +cuint@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" + integrity sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs= + +d@1, d@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" + integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== + dependencies: + es5-ext "^0.10.50" + type "^1.0.1" + +dashdash@^1.12.0: + version "1.14.1" + resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" + integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= + dependencies: + assert-plus "^1.0.0" + +data-urls@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" + integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== + dependencies: + abab "^2.0.3" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" + +debug@2.6.9, debug@^2.2.0, debug@^2.6.9: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== + dependencies: + ms "2.0.0" + +debug@3.2.6: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1: + version "4.3.2" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" + integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== + dependencies: + ms "2.1.2" + +debug@4.3.1: + version "4.3.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" + integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== + dependencies: + ms "2.1.2" + +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + +decamelize@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= + +decamelize@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" + integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== + +decimal.js@^10.2.1: + version "10.3.1" + resolved "https://registry.yarnpkg.com/decimal.js/-/decimal.js-10.3.1.tgz#d8c3a444a9c6774ba60ca6ad7261c3a94fd5e783" + integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ== + +decode-uri-component@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" + integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= + +decompress-response@^3.2.0, decompress-response@^3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" + integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= + dependencies: + mimic-response "^1.0.0" + +deep-eql@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" + integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== + dependencies: + type-detect "^4.0.0" + +deep-is@^0.1.3, deep-is@~0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" + integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= + +default-require-extensions@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-3.0.0.tgz#e03f93aac9b2b6443fc52e5e4a37b3ad9ad8df96" + integrity sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg== + dependencies: + strip-bom "^4.0.0" + +defer-to-connect@^1.0.1: + version "1.1.3" + resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" + integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== + +deferred-leveldown@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz#27a997ad95408b61161aa69bd489b86c71b78058" + integrity sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw== + dependencies: + abstract-leveldown "~6.2.1" + inherits "^2.0.3" + +define-properties@^1.1.2, define-properties@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" + integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + dependencies: + object-keys "^1.0.12" + +delayed-stream@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" + integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= + +depd@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" + integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= + +des.js@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" + integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== + dependencies: + inherits "^2.0.1" + minimalistic-assert "^1.0.0" + +destroy@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" + integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= + +diff@3.5.0, diff@^3.1.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" + integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== + +diff@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" + integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== + +diff@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/diff/-/diff-4.0.2.tgz#60f3aecb89d5fae520c11aa19efc2bb982aade7d" + integrity sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A== + +diffie-hellman@^5.0.0: + version "5.0.3" + resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" + integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== + dependencies: + bn.js "^4.1.0" + miller-rabin "^4.0.0" + randombytes "^2.0.0" + +dir-glob@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/dir-glob/-/dir-glob-3.0.1.tgz#56dbf73d992a4a93ba1584f4534063fd2e41717f" + integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== + dependencies: + path-type "^4.0.0" + +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + +doctrine@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" + integrity sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + dependencies: + esutils "^2.0.2" + +dom-walk@^0.1.0: + version "0.1.2" + resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" + integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== + +domexception@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" + integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== + dependencies: + webidl-conversions "^5.0.0" + +dotenv@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" + integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== + +duplexer3@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" + integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= + +ecc-jsbn@~0.1.1: + version "0.1.2" + resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" + integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= + dependencies: + jsbn "~0.1.0" + safer-buffer "^2.1.0" + +ed2curve@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/ed2curve/-/ed2curve-0.3.0.tgz#322b575152a45305429d546b071823a93129a05d" + integrity sha512-8w2fmmq3hv9rCrcI7g9hms2pMunQr1JINfcjwR9tAyZqhtyaMN991lF/ZfHfr5tzZQ8c7y7aBgZbjfbd0fjFwQ== + dependencies: + tweetnacl "1.x.x" + +ee-first@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" + integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= + +electron-to-chromium@^1.3.793: + version "1.3.799" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.799.tgz#6e9911b25e7ecd5aa1e54dcb68f82a3e02d00f09" + integrity sha512-V2rbYWdGvSqrg+95KjkVuSi41bGfrhrOzjl1tSi2VLnm0mRe3FsSvhiqidSiSll9WiMhrQAhpDcW/wcqK3c+Yw== + +elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3, elliptic@^6.5.4: + version "6.5.4" + resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" + integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== + dependencies: + bn.js "^4.11.9" + brorand "^1.1.0" + hash.js "^1.0.0" + hmac-drbg "^1.0.1" + inherits "^2.0.4" + minimalistic-assert "^1.0.1" + minimalistic-crypto-utils "^1.0.1" + +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + +emoji-regex@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" + integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== + +encodeurl@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" + integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= + +encoding-down@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-6.3.0.tgz#b1c4eb0e1728c146ecaef8e32963c549e76d082b" + integrity sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw== + dependencies: + abstract-leveldown "^6.2.1" + inherits "^2.0.3" + level-codec "^9.0.0" + level-errors "^2.0.0" + +end-of-stream@^1.1.0: + version "1.4.4" + resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" + integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== + dependencies: + once "^1.4.0" + +enquirer@^2.3.0, enquirer@^2.3.5: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + +env-paths@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2" + integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A== + +errno@~0.1.1: + version "0.1.8" + resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" + integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== + dependencies: + prr "~1.0.1" + +error-ex@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" + integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== + dependencies: + is-arrayish "^0.2.1" + +error-stack-parser@^1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-1.3.6.tgz#e0e73b93e417138d1cd7c0b746b1a4a14854c292" + integrity sha1-4Oc7k+QXE40c18C3RrGkoUhUwpI= + dependencies: + stackframe "^0.3.1" + +es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2, es-abstract@^1.18.2, es-abstract@^1.18.5: + version "1.18.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.5.tgz#9b10de7d4c206a3581fd5b2124233e04db49ae19" + integrity sha512-DDggyJLoS91CkJjgauM5c0yZMjiD1uK3KcaCeAmffGwZ+ODWzOkPN4QwRbsK5DOFf06fywmyLci3ZD8jLGhVYA== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + get-intrinsic "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.2" + internal-slot "^1.0.3" + is-callable "^1.2.3" + is-negative-zero "^2.0.1" + is-regex "^1.1.3" + is-string "^1.0.6" + object-inspect "^1.11.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + string.prototype.trimend "^1.0.4" + string.prototype.trimstart "^1.0.4" + unbox-primitive "^1.0.1" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + +es5-ext@^0.10.35, es5-ext@^0.10.50: + version "0.10.53" + resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" + integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== + dependencies: + es6-iterator "~2.0.3" + es6-symbol "~3.1.3" + next-tick "~1.0.0" + +es6-error@^4.0.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d" + integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg== + +es6-iterator@~2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" + integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= + dependencies: + d "1" + es5-ext "^0.10.35" + es6-symbol "^3.1.1" + +es6-symbol@^3.1.1, es6-symbol@~3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" + integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== + dependencies: + d "^1.0.1" + ext "^1.1.2" + +escalade@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" + integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== + +escape-html@~1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" + integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= + +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" + integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= + +escape-string-regexp@4.0.0, escape-string-regexp@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" + integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== + +escodegen@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" + integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +eslint-config-airbnb-base@^14.0.0: + version "14.2.1" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" + integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== + dependencies: + confusing-browser-globals "^1.0.10" + object.assign "^4.1.2" + object.entries "^1.1.2" + +eslint-config-prettier@^6.10.1: + version "6.15.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz#7f93f6cb7d45a92f1537a70ecc06366e1ac6fed9" + integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw== + dependencies: + get-stdin "^6.0.0" + +eslint-import-resolver-node@^0.3.4: + version "0.3.4" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz#85ffa81942c25012d8231096ddf679c03042c717" + integrity sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA== + dependencies: + debug "^2.6.9" + resolve "^1.13.1" + +eslint-module-utils@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.6.1.tgz#b51be1e473dd0de1c5ea638e22429c2490ea8233" + integrity sha512-ZXI9B8cxAJIH4nfkhTwcRTEAnrVfobYqwjWy/QMCZ8rHkZHFjf9yO4BzpiF9kCSfNlMG54eKigISHpX0+AaT4A== + dependencies: + debug "^3.2.7" + pkg-dir "^2.0.0" + +eslint-plugin-import@^2.20.0: + version "2.23.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.23.4.tgz#8dceb1ed6b73e46e50ec9a5bb2411b645e7d3d97" + integrity sha512-6/wP8zZRsnQFiR3iaPFgh5ImVRM1WN5NUWfTIRqwOdeiGJlBcSk82o1FEVq8yXmy4lkIzTo7YhHCIxlU/2HyEQ== + dependencies: + array-includes "^3.1.3" + array.prototype.flat "^1.2.4" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.4" + eslint-module-utils "^2.6.1" + find-up "^2.0.0" + has "^1.0.3" + is-core-module "^2.4.0" + minimatch "^3.0.4" + object.values "^1.1.3" + pkg-up "^2.0.0" + read-pkg-up "^3.0.0" + resolve "^1.20.0" + tsconfig-paths "^3.9.0" + +eslint-plugin-prettier@^3.1.2: + version "3.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.0.tgz#cdbad3bf1dbd2b177e9825737fe63b476a08f0c7" + integrity sha512-UDK6rJT6INSfcOo545jiaOwB701uAIt2/dR7WnFQoGCVl1/EMqdANBmwUaqqQ45aXprsTGzSa39LI1PyuRBxxw== + dependencies: + prettier-linter-helpers "^1.0.0" + +eslint-scope@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + +eslint-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" + integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== + dependencies: + eslint-visitor-keys "^1.1.0" + +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + +eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" + integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== + +eslint-visitor-keys@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" + integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== + +eslint@^7.14.0: + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.3" + "@humanwhocodes/config-array" "^0.5.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.1.2" + globals "^13.6.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.9" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + +espree@^7.3.0, espree@^7.3.1: + version "7.3.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" + integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== + dependencies: + acorn "^7.4.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^1.3.0" + +esprima@^4.0.0, esprima@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" + integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== + +esquery@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5" + integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w== + dependencies: + estraverse "^5.1.0" + +esrecurse@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921" + integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== + dependencies: + estraverse "^5.2.0" + +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + +estraverse@^5.1.0, estraverse@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" + integrity sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ== + +esutils@^2.0.2: + version "2.0.3" + resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" + integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== + +etag@~1.8.1: + version "1.8.1" + resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" + integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= + +eth-ens-namehash@2.0.8: + version "2.0.8" + resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" + integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= + dependencies: + idna-uts46-hx "^2.3.1" + js-sha3 "^0.5.7" + +eth-lib@0.2.8: + version "0.2.8" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" + integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + xhr-request-promise "^0.1.2" + +eth-lib@^0.1.26: + version "0.1.29" + resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" + integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== + dependencies: + bn.js "^4.11.6" + elliptic "^6.4.0" + nano-json-stream-parser "^0.1.2" + servify "^0.1.12" + ws "^3.0.0" + xhr-request-promise "^0.1.2" + +eth-sig-util@^2.5.2: + version "2.5.4" + resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-2.5.4.tgz#577b01fe491b6bf59b0464be09633e20c1677bc5" + integrity sha512-aCMBwp8q/4wrW4QLsF/HYBOSA7TpLKmkVwP3pYQNkEEseW2Rr8Z5Uxc9/h6HX+OG3tuHo+2bINVSihIeBfym6A== + dependencies: + ethereumjs-abi "0.6.8" + ethereumjs-util "^5.1.1" + tweetnacl "^1.0.3" + tweetnacl-util "^0.15.0" + +ethereum-block-by-date@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ethereum-block-by-date/-/ethereum-block-by-date-1.4.0.tgz#c28b14f842e894c7645917e284d66e29332dd6d6" + integrity sha512-3D+6esxU9bQDyFev9/9C6+Wqpb+HdSyeKnAhktIZXOQjgPdGRc4zwr/FdrgMfrJlB9Ee4cG9psu7eCgYQ3szaA== + dependencies: + moment "^2.29.1" + +ethereum-bloom-filters@^1.0.6: + version "1.0.10" + resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.10.tgz#3ca07f4aed698e75bd134584850260246a5fed8a" + integrity sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA== + dependencies: + js-sha3 "^0.8.0" + +ethereum-cryptography@^0.1.2, ethereum-cryptography@^0.1.3: + version "0.1.3" + resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" + integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== + dependencies: + "@types/pbkdf2" "^3.0.0" + "@types/secp256k1" "^4.0.1" + blakejs "^1.1.0" + browserify-aes "^1.2.0" + bs58check "^2.1.2" + create-hash "^1.2.0" + create-hmac "^1.1.7" + hash.js "^1.1.7" + keccak "^3.0.0" + pbkdf2 "^3.0.17" + randombytes "^2.1.0" + safe-buffer "^5.1.2" + scrypt-js "^3.0.0" + secp256k1 "^4.0.1" + setimmediate "^1.0.5" + +ethereumjs-abi@0.6.8, ethereumjs-abi@^0.6.8: + version "0.6.8" + resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" + integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== + dependencies: + bn.js "^4.11.8" + ethereumjs-util "^6.0.0" + +ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" + integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== + dependencies: + "@types/bn.js" "^4.11.3" + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.3" + +ethereumjs-util@^5.1.1: + version "5.2.1" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz#a833f0e5fca7e5b361384dc76301a721f537bf65" + integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== + dependencies: + bn.js "^4.11.0" + create-hash "^1.1.2" + elliptic "^6.5.2" + ethereum-cryptography "^0.1.3" + ethjs-util "^0.1.3" + rlp "^2.0.0" + safe-buffer "^5.1.1" + +ethereumjs-util@^7.0.10, ethereumjs-util@^7.0.7, ethereumjs-util@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.1.0.tgz#e2b43a30bfcdbcb432a4eb42bd5f2393209b3fd5" + integrity sha512-kR+vhu++mUDARrsMMhsjjzPduRVAeundLGXucGRHF3B4oEltOUspfgCVco4kckucj3FMlLaZHUl9n7/kdmr6Tw== + dependencies: + "@types/bn.js" "^5.1.0" + bn.js "^5.1.2" + create-hash "^1.1.2" + ethereum-cryptography "^0.1.3" + ethjs-util "0.1.6" + rlp "^2.2.4" + +ethers@^5.0.0: + version "5.4.4" + resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.4.4.tgz#35cce530505b84c699da944162195cfb3f894947" + integrity sha512-zaTs8yaDjfb0Zyj8tT6a+/hEkC+kWAA350MWRp6yP5W7NdGcURRPMOpOU+6GtkfxV9wyJEShWesqhE/TjdqpMA== + dependencies: + "@ethersproject/abi" "5.4.0" + "@ethersproject/abstract-provider" "5.4.1" + "@ethersproject/abstract-signer" "5.4.1" + "@ethersproject/address" "5.4.0" + "@ethersproject/base64" "5.4.0" + "@ethersproject/basex" "5.4.0" + "@ethersproject/bignumber" "5.4.1" + "@ethersproject/bytes" "5.4.0" + "@ethersproject/constants" "5.4.0" + "@ethersproject/contracts" "5.4.1" + "@ethersproject/hash" "5.4.0" + "@ethersproject/hdnode" "5.4.0" + "@ethersproject/json-wallets" "5.4.0" + "@ethersproject/keccak256" "5.4.0" + "@ethersproject/logger" "5.4.0" + "@ethersproject/networks" "5.4.2" + "@ethersproject/pbkdf2" "5.4.0" + "@ethersproject/properties" "5.4.0" + "@ethersproject/providers" "5.4.3" + "@ethersproject/random" "5.4.0" + "@ethersproject/rlp" "5.4.0" + "@ethersproject/sha2" "5.4.0" + "@ethersproject/signing-key" "5.4.0" + "@ethersproject/solidity" "5.4.0" + "@ethersproject/strings" "5.4.0" + "@ethersproject/transactions" "5.4.0" + "@ethersproject/units" "5.4.0" + "@ethersproject/wallet" "5.4.0" + "@ethersproject/web" "5.4.0" + "@ethersproject/wordlists" "5.4.0" + +ethjs-unit@0.1.6: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" + integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= + dependencies: + bn.js "4.11.6" + number-to-bn "1.7.0" + +ethjs-util@0.1.6, ethjs-util@^0.1.3: + version "0.1.6" + resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" + integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== + dependencies: + is-hex-prefixed "1.0.0" + strip-hex-prefix "1.0.0" + +event-target-shim@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/event-target-shim/-/event-target-shim-5.0.1.tgz#5d4d3ebdf9583d63a5333ce2deb7480ab2b05789" + integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== + +eventemitter3@4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" + integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== + +eventemitter3@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f" + integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== + +evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" + integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== + dependencies: + md5.js "^1.3.4" + safe-buffer "^5.1.1" + +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + +executioner@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/executioner/-/executioner-2.0.1.tgz#add328e03bc45dd598f358fbb529fc0be0ec6fcd" + integrity sha1-rdMo4DvEXdWY81j7tSn8C+Dsb80= + dependencies: + mixly "^1.0.0" + +exit-on-epipe@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" + integrity sha512-h2z5mrROTxce56S+pnvAV890uu7ls7f1kEvVGJbw1OlFH3/mlJ5bkXu0KRyW94v37zzHPiUd55iLn3DA7TjWpw== + +express@^4.14.0: + version "4.17.1" + resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" + integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== + dependencies: + accepts "~1.3.7" + array-flatten "1.1.1" + body-parser "1.19.0" + content-disposition "0.5.3" + content-type "~1.0.4" + cookie "0.4.0" + cookie-signature "1.0.6" + debug "2.6.9" + depd "~1.1.2" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + finalhandler "~1.1.2" + fresh "0.5.2" + merge-descriptors "1.0.1" + methods "~1.1.2" + on-finished "~2.3.0" + parseurl "~1.3.3" + path-to-regexp "0.1.7" + proxy-addr "~2.0.5" + qs "6.7.0" + range-parser "~1.2.1" + safe-buffer "5.1.2" + send "0.17.1" + serve-static "1.14.1" + setprototypeof "1.1.1" + statuses "~1.5.0" + type-is "~1.6.18" + utils-merge "1.0.1" + vary "~1.1.2" + +ext@^1.1.2: + version "1.4.0" + resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" + integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== + dependencies: + type "^2.0.0" + +extend@~3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" + integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== + +extsprintf@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" + integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= + +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= + +fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" + integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== + +fast-diff@^1.1.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03" + integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w== + +fast-glob@^3.1.1: + version "3.2.7" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.7.tgz#fd6cb7a2d7e9aa7a7846111e85a196d6b2f766a1" + integrity sha512-rYGMRwip6lUMvYD3BTScMwT1HtAs2d71SMv66Vrxs0IekGZEjhM0pcMfjQPnknBt2zeCwQMEupiN02ZP4DiT1Q== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + +fast-json-stable-stringify@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" + integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== + +fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" + integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= + +fastq@^1.6.0: + version "1.11.1" + resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.11.1.tgz#5d8175aae17db61947f8b162cfc7f63264d22807" + integrity sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw== + dependencies: + reusify "^1.0.4" + +file-entry-cache@^6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" + integrity sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg== + dependencies: + flat-cache "^3.0.4" + +fill-range@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" + integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== + dependencies: + to-regex-range "^5.0.1" + +finalhandler@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" + integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== + dependencies: + debug "2.6.9" + encodeurl "~1.0.2" + escape-html "~1.0.3" + on-finished "~2.3.0" + parseurl "~1.3.3" + statuses "~1.5.0" + unpipe "~1.0.0" + +find-cache-dir@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.1.0.tgz#8d0f94cd13fe43c6c7c261a0d86115ca918c05f7" + integrity sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ== + dependencies: + commondir "^1.0.1" + make-dir "^2.0.0" + pkg-dir "^3.0.0" + +find-cache-dir@^3.2.0: + version "3.3.1" + resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-3.3.1.tgz#89b33fad4a4670daa94f855f7fbe31d6d84fe880" + integrity sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ== + dependencies: + commondir "^1.0.1" + make-dir "^3.0.2" + pkg-dir "^4.1.0" + +find-replace@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0" + integrity sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A= + dependencies: + array-back "^1.0.4" + test-value "^2.1.0" + +find-up@3.0.0, find-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73" + integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== + dependencies: + locate-path "^3.0.0" + +find-up@5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + +find-up@^2.0.0, find-up@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" + integrity sha1-RdG35QbHF93UgndaK3eSCjwMV6c= + dependencies: + locate-path "^2.0.0" + +find-up@^4.0.0, find-up@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-4.1.0.tgz#97afe7d6cdc0bc5928584b7c8d7b16e8a9aa5d19" + integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== + dependencies: + locate-path "^5.0.0" + path-exists "^4.0.0" + +flat-cache@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" + integrity sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg== + dependencies: + flatted "^3.1.0" + rimraf "^3.0.2" + +flat@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/flat/-/flat-4.1.1.tgz#a392059cc382881ff98642f5da4dde0a959f309b" + integrity sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA== + dependencies: + is-buffer "~2.0.3" + +flat@^5.0.2: + version "5.0.2" + resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" + integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== + +flatted@^3.1.0: + version "3.2.2" + resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" + integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== + +follow-redirects@^1.12.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43" + integrity sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg== + +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + +foreach@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" + integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= + +foreground-child@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-2.0.0.tgz#71b32800c9f15aa8f2f83f4a6bd9bff35d861a53" + integrity sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^3.0.2" + +forever-agent@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" + integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= + +form-data@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" + integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.8" + mime-types "^2.1.12" + +form-data@~2.3.2: + version "2.3.3" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" + integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== + dependencies: + asynckit "^0.4.0" + combined-stream "^1.0.6" + mime-types "^2.1.12" + +forwarded@0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" + integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== + +fp-ts@1.19.3: + version "1.19.3" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.3.tgz#261a60d1088fbff01f91256f91d21d0caaaaa96f" + integrity sha512-H5KQDspykdHuztLTg+ajGN0Z2qUjcEf3Ybxc6hLt0k7/zPkn29XnKnxlBPyW2XIddWrGaJBzBl4VLYOtk39yZg== + +fp-ts@^1.0.0: + version "1.19.5" + resolved "https://registry.yarnpkg.com/fp-ts/-/fp-ts-1.19.5.tgz#3da865e585dfa1fdfd51785417357ac50afc520a" + integrity sha512-wDNqTimnzs8QqpldiId9OavWK2NptormjXnRJTQecNjzwfyp6P/8s/zG8e4h3ja3oqkKaY72UlTjQYt/1yXf9A== + +fresh@0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" + integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= + +fromentries@^1.2.0: + version "1.3.2" + resolved "https://registry.yarnpkg.com/fromentries/-/fromentries-1.3.2.tgz#e4bca6808816bf8f93b52750f1127f5a6fd86e3a" + integrity sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg== + +fs-extra@^0.30.0: + version "0.30.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" + integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A= + dependencies: + graceful-fs "^4.1.2" + jsonfile "^2.1.0" + klaw "^1.0.0" + path-is-absolute "^1.0.0" + rimraf "^2.2.8" + +fs-extra@^4.0.2: + version "4.0.3" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-extra@^7.0.0, fs-extra@^7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" + integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== + dependencies: + graceful-fs "^4.1.2" + jsonfile "^4.0.0" + universalify "^0.1.0" + +fs-minipass@^1.2.5: + version "1.2.7" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" + integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== + dependencies: + minipass "^2.6.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +fsevents@~2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.1.3.tgz#fb738703ae8d2f9fe900c33836ddebee8b97f23e" + integrity sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ== + +fsevents@~2.3.1, fsevents@~2.3.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" + integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== + +fulcon@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/fulcon/-/fulcon-1.0.2.tgz#8a4dfda4c73fcd9cc62a79d5045c392b45547320" + integrity sha1-ik39pMc/zZzGKnnVBFw5K0VUcyA= + +function-bind@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" + integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== + +functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= + +ganache-cli@^6.9.1: + version "6.12.2" + resolved "https://registry.yarnpkg.com/ganache-cli/-/ganache-cli-6.12.2.tgz#c0920f7db0d4ac062ffe2375cb004089806f627a" + integrity sha512-bnmwnJDBDsOWBUP8E/BExWf85TsdDEFelQSzihSJm9VChVO1SHp94YXLP5BlA4j/OTxp0wR4R1Tje9OHOuAJVw== + dependencies: + ethereumjs-util "6.2.1" + source-map-support "0.5.12" + yargs "13.2.4" + +gensync@^1.0.0-beta.2: + version "1.0.0-beta.2" + resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" + integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== + +get-caller-file@^2.0.1, get-caller-file@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + +get-func-name@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" + integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= + +get-intrinsic@^1.0.2, get-intrinsic@^1.1.0, get-intrinsic@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" + integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-symbols "^1.0.1" + +get-package-type@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" + integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== + +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + +get-stream@^4.0.0, get-stream@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + +get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + +getpass@^0.1.1: + version "0.1.7" + resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" + integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= + dependencies: + assert-plus "^1.0.0" + +glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: + version "5.1.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" + integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== + dependencies: + is-glob "^4.0.1" + +glob@7.1.3: + version "7.1.3" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" + integrity sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@7.1.6: + version "7.1.6" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.5, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: + version "7.1.7" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" + integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +global@~4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" + integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== + dependencies: + min-document "^2.19.0" + process "^0.11.10" + +globals@^11.1.0: + version "11.12.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" + integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== + +globals@^13.6.0, globals@^13.9.0: + version "13.10.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.10.0.tgz#60ba56c3ac2ca845cfbf4faeca727ad9dd204676" + integrity sha512-piHC3blgLGFjvOuMmWZX60f+na1lXFDhQXBf1UYp2fXPXqvEUbOhNwi6BsQ0bQishwedgnjkwv1d9zKf+MWw3g== + dependencies: + type-fest "^0.20.2" + +globby@^11.0.3: + version "11.0.4" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.4.tgz#2cbaff77c2f2a62e71e9b2813a67b97a3a3001a5" + integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.1.1" + ignore "^5.1.4" + merge2 "^1.3.0" + slash "^3.0.0" + +got@9.6.0: + version "9.6.0" + resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" + integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== + dependencies: + "@sindresorhus/is" "^0.14.0" + "@szmarczak/http-timer" "^1.1.2" + cacheable-request "^6.0.0" + decompress-response "^3.3.0" + duplexer3 "^0.1.4" + get-stream "^4.1.0" + lowercase-keys "^1.0.1" + mimic-response "^1.0.1" + p-cancelable "^1.0.0" + to-readable-stream "^1.0.0" + url-parse-lax "^3.0.0" + +got@^7.1.0: + version "7.1.0" + resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" + integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== + dependencies: + decompress-response "^3.2.0" + duplexer3 "^0.1.4" + get-stream "^3.0.0" + is-plain-obj "^1.1.0" + is-retry-allowed "^1.0.0" + is-stream "^1.0.0" + isurl "^1.0.0-alpha5" + lowercase-keys "^1.0.0" + p-cancelable "^0.3.0" + p-timeout "^1.1.1" + safe-buffer "^5.0.1" + timed-out "^4.0.0" + url-parse-lax "^1.0.0" + url-to-options "^1.0.1" + +graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: + version "4.2.8" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" + integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +har-schema@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" + integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= + +har-validator@~5.1.3: + version "5.1.5" + resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" + integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== + dependencies: + ajv "^6.12.3" + har-schema "^2.0.0" + +hardhat-typechain@^0.3.5: + version "0.3.5" + resolved "https://registry.yarnpkg.com/hardhat-typechain/-/hardhat-typechain-0.3.5.tgz#8e50616a9da348b33bd001168c8fda9c66b7b4af" + integrity sha512-w9lm8sxqTJACY+V7vijiH+NkPExnmtiQEjsV9JKD1KgMdVk2q8y+RhvU/c4B7+7b1+HylRUCxpOIvFuB3rE4+w== + +hardhat@^2.6.4: + version "2.6.4" + resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.6.4.tgz#9ff3f139f697bfc4e14836a3fef3ca4c62357d65" + integrity sha512-6QNfu1FptjtyGJ+jBR7LMX7AMY9gWWw9kAUD7v0YZNZH1ZBgsZdMHqXKiSzO5pLQXo+fy9zZovKAUNYbjQ/1fw== + dependencies: + "@ethereumjs/block" "^3.4.0" + "@ethereumjs/blockchain" "^5.4.0" + "@ethereumjs/common" "^2.4.0" + "@ethereumjs/tx" "^3.3.0" + "@ethereumjs/vm" "^5.5.2" + "@ethersproject/abi" "^5.1.2" + "@sentry/node" "^5.18.1" + "@solidity-parser/parser" "^0.11.0" + "@types/bn.js" "^5.1.0" + "@types/lru-cache" "^5.1.0" + abort-controller "^3.0.0" + adm-zip "^0.4.16" + ansi-escapes "^4.3.0" + chalk "^2.4.2" + chokidar "^3.4.0" + ci-info "^2.0.0" + debug "^4.1.1" + enquirer "^2.3.0" + env-paths "^2.2.0" + eth-sig-util "^2.5.2" + ethereum-cryptography "^0.1.2" + ethereumjs-abi "^0.6.8" + ethereumjs-util "^7.1.0" + find-up "^2.1.0" + fp-ts "1.19.3" + fs-extra "^7.0.1" + glob "^7.1.3" + https-proxy-agent "^5.0.0" + immutable "^4.0.0-rc.12" + io-ts "1.10.4" + lodash "^4.17.11" + merkle-patricia-tree "^4.2.0" + mnemonist "^0.38.0" + mocha "^7.1.2" + node-fetch "^2.6.0" + qs "^6.7.0" + raw-body "^2.4.1" + resolve "1.17.0" + semver "^6.3.0" + slash "^3.0.0" + solc "0.7.3" + source-map-support "^0.5.13" + stacktrace-parser "^0.1.10" + "true-case-path" "^2.2.1" + tsort "0.0.1" + uuid "^3.3.2" + ws "^7.4.6" + +has-bigints@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" + integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + +has-flag@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" + integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= + +has-flag@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" + integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== + +has-symbol-support-x@^1.4.1: + version "1.4.2" + resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" + integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== + +has-symbols@^1.0.0, has-symbols@^1.0.1, has-symbols@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" + integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== + +has-to-string-tag-x@^1.2.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" + integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== + dependencies: + has-symbol-support-x "^1.4.1" + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + +has@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" + integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== + dependencies: + function-bind "^1.1.1" + +hash-base@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" + integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== + dependencies: + inherits "^2.0.4" + readable-stream "^3.6.0" + safe-buffer "^5.2.0" + +hash.js@1.1.7, hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: + version "1.1.7" + resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" + integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== + dependencies: + inherits "^2.0.3" + minimalistic-assert "^1.0.1" + +hasha@^5.0.0: + version "5.2.2" + resolved "https://registry.yarnpkg.com/hasha/-/hasha-5.2.2.tgz#a48477989b3b327aea3c04f53096d816d97522a1" + integrity sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ== + dependencies: + is-stream "^2.0.0" + type-fest "^0.8.0" + +he@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + +hmac-drbg@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" + integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= + dependencies: + hash.js "^1.0.3" + minimalistic-assert "^1.0.0" + minimalistic-crypto-utils "^1.0.1" + +hosted-git-info@^2.1.4: + version "2.8.9" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" + integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== + +html-encoding-sniffer@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" + integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== + dependencies: + whatwg-encoding "^1.0.5" + +html-escaper@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/html-escaper/-/html-escaper-2.0.2.tgz#dfd60027da36a36dfcbe236262c00a5822681453" + integrity sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg== + +http-cache-semantics@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" + integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== + +http-errors@1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" + integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== + dependencies: + depd "~1.1.2" + inherits "2.0.3" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-errors@1.7.3, http-errors@~1.7.2: + version "1.7.3" + resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" + integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== + dependencies: + depd "~1.1.2" + inherits "2.0.4" + setprototypeof "1.1.1" + statuses ">= 1.5.0 < 2" + toidentifier "1.0.0" + +http-https@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" + integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= + +http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + +http-signature@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" + integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= + dependencies: + assert-plus "^1.0.0" + jsprim "^1.2.2" + sshpk "^1.7.0" + +https-proxy-agent@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" + integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + dependencies: + agent-base "6" + debug "4" + +iconv-lite@0.4.24: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== + dependencies: + safer-buffer ">= 2.1.2 < 3" + +idna-uts46-hx@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" + integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== + dependencies: + punycode "2.1.0" + +ieee754@^1.1.13: + version "1.2.1" + resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" + integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== + +ignore@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" + integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== + +ignore@^5.1.4: + version "5.1.8" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" + integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== + +immediate@^3.2.3: + version "3.3.0" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" + integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== + +immediate@~3.2.3: + version "3.2.3" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" + integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= + +immutable@^4.0.0-rc.12: + version "4.0.0-rc.14" + resolved "https://registry.yarnpkg.com/immutable/-/immutable-4.0.0-rc.14.tgz#29ba96631ec10867d1348515ac4e6bdba462f071" + integrity sha512-pfkvmRKJSoW7JFx0QeYlAmT+kNYvn5j0u7bnpNq4N2RCvHSTlLT208G8jgaquNe+Q8kCPHKOSpxJkyvLDpYq0w== + +import-fresh@^3.0.0, import-fresh@^3.2.1: + version "3.3.0" + resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.3.0.tgz#37162c25fcb9ebaa2e6e53d5b4d88ce17d9e0c2b" + integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== + dependencies: + parent-module "^1.0.0" + resolve-from "^4.0.0" + +imurmurhash@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea" + integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= + +indent-string@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-4.0.0.tgz#624f8f4497d619b2d9768531d58f4122854d7251" + integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +inherits@2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= + +install-peers-cli@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/install-peers-cli/-/install-peers-cli-2.2.0.tgz#f76f1ec8ac9fa7f920c05743e011554edad85f8d" + integrity sha512-scSNvF49HDOLNm2xLFwST23g/OvfsceiA087bcGBgZP/ZNCrvpSaCn5IrWNZ2XYmFFykXF/6J1Zgm+D/JgRgtA== + dependencies: + commander "^2.20.0" + executioner "^2.0.1" + +internal-slot@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.3.tgz#7347e307deeea2faac2ac6205d4bc7d34967f59c" + integrity sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA== + dependencies: + get-intrinsic "^1.1.0" + has "^1.0.3" + side-channel "^1.0.4" + +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + +io-ts@1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/io-ts/-/io-ts-1.10.4.tgz#cd5401b138de88e4f920adbcb7026e2d1967e6e2" + integrity sha512-b23PteSnYXSONJ6JQXRAlvJhuw8KOtkqa87W4wDtvMrud/DTJd5X+NpOOI+O/zZwVq6v0VLAaJ+1EDViKEuN9g== + dependencies: + fp-ts "^1.0.0" + +ip-regex@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-4.3.0.tgz#687275ab0f57fa76978ff8f4dddc8a23d5990db5" + integrity sha512-B9ZWJxHHOHUhUjCPrMpLD4xEq35bUTClHM1S6CBU5ixQnkZmwipwgc96vAd7AAGM9TGHvJR+Uss+/Ak6UphK+Q== + +ipaddr.js@1.9.1: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== + +is-arguments@^1.0.4: + version "1.1.1" + resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.1.tgz#15b3f88fda01f2a97fec84ca761a560f123efa9b" + integrity sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= + +is-bigint@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.3.tgz#fc9d9e364210480675653ddaea0518528d49a581" + integrity sha512-ZU538ajmYJmzysE5yU4Y7uIrPQ2j704u+hXFiIPQExpqzzUbpe5jCPdTfmz7jXRxZdvjY3KZ3ZNenoXQovX+Dg== + +is-binary-path@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" + integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== + dependencies: + binary-extensions "^2.0.0" + +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-buffer@~2.0.3: + version "2.0.5" + resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-2.0.5.tgz#ebc252e400d22ff8d77fa09888821a24a658c191" + integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== + +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.3: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + +is-core-module@^2.2.0, is-core-module@^2.4.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.5.0.tgz#f754843617c70bfd29b7bd87327400cda5c18491" + integrity sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg== + dependencies: + has "^1.0.3" + +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== + dependencies: + has-tostringtag "^1.0.0" + +is-extglob@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" + integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= + +is-fullwidth-code-point@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" + integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= + +is-fullwidth-code-point@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" + integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== + +is-function@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" + integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== + +is-generator-function@^1.0.7: + version "1.0.10" + resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.10.tgz#f1558baf1ac17e0deea7c0415c438351ff2b3c72" + integrity sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A== + dependencies: + has-tostringtag "^1.0.0" + +is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" + integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== + dependencies: + is-extglob "^2.1.1" + +is-hex-prefixed@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" + integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= + +is-negative-zero@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" + integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== + +is-number-object@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.6.tgz#6a7aaf838c7f0686a50b4553f7e54a96494e89f0" + integrity sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g== + dependencies: + has-tostringtag "^1.0.0" + +is-number@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" + integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== + +is-object@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" + integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== + +is-plain-obj@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" + integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= + +is-plain-obj@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" + integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== + +is-plain-object@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" + integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== + dependencies: + isobject "^3.0.1" + +is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== + +is-regex@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-retry-allowed@^1.0.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" + integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== + +is-stream@^1.0.0, is-stream@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" + integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= + +is-stream@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" + integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== + +is-string@^1.0.5, is-string@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + +is-typed-array@^1.1.3, is-typed-array@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.6.tgz#5887fdc44a7342da94f21ddd22ebad06c7dff69c" + integrity sha512-cDIgneTBa/TueUY6AWd7Tyj3jcFF5GAzFd50x3IB9bcjRSfjxkTfGYeD8YUDnrXQ10Q+2Y6rT+ZDwseIX9CI5A== + dependencies: + available-typed-arrays "^1.0.4" + call-bind "^1.0.2" + es-abstract "^1.18.5" + foreach "^2.0.5" + has-tostringtag "^1.0.0" + +is-typedarray@^1.0.0, is-typedarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" + integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= + +is-windows@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" + integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= + +isexe@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" + integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= + +isobject@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" + integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= + +isstream@~0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" + integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= + +istanbul-lib-coverage@^3.0.0, istanbul-lib-coverage@^3.0.0-alpha.1: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-3.0.0.tgz#f5944a37c70b550b02a78a5c3b2055b280cec8ec" + integrity sha512-UiUIqxMgRDET6eR+o5HbfRYP1l0hqkWOs7vNxC/mggutCMUIhWMm8gAHb8tHlyfD3/l6rlgNA5cKdDzEAf6hEg== + +istanbul-lib-hook@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz#8f84c9434888cc6b1d0a9d7092a76d239ebf0cc6" + integrity sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ== + dependencies: + append-transform "^2.0.0" + +istanbul-lib-instrument@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz#873c6fff897450118222774696a3f28902d77c1d" + integrity sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ== + dependencies: + "@babel/core" "^7.7.5" + "@istanbuljs/schema" "^0.1.2" + istanbul-lib-coverage "^3.0.0" + semver "^6.3.0" + +istanbul-lib-processinfo@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.2.tgz#e1426514662244b2f25df728e8fd1ba35fe53b9c" + integrity sha512-kOwpa7z9hme+IBPZMzQ5vdQj8srYgAtaRqeI48NGmAQ+/5yKiHLV0QbYqQpxsdEF0+w14SoB8YbnHKcXE2KnYw== + dependencies: + archy "^1.0.0" + cross-spawn "^7.0.0" + istanbul-lib-coverage "^3.0.0-alpha.1" + make-dir "^3.0.0" + p-map "^3.0.0" + rimraf "^3.0.0" + uuid "^3.3.3" + +istanbul-lib-report@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz#7518fe52ea44de372f460a76b5ecda9ffb73d8a6" + integrity sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw== + dependencies: + istanbul-lib-coverage "^3.0.0" + make-dir "^3.0.0" + supports-color "^7.1.0" + +istanbul-lib-source-maps@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz#75743ce6d96bb86dc7ee4352cf6366a23f0b1ad9" + integrity sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg== + dependencies: + debug "^4.1.1" + istanbul-lib-coverage "^3.0.0" + source-map "^0.6.1" + +istanbul-reports@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-3.0.2.tgz#d593210e5000683750cb09fc0644e4b6e27fd53b" + integrity sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw== + dependencies: + html-escaper "^2.0.0" + istanbul-lib-report "^3.0.0" + +isurl@^1.0.0-alpha5: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" + integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== + dependencies: + has-to-string-tag-x "^1.2.0" + is-object "^1.0.1" + +js-sha3@0.5.7, js-sha3@^0.5.7: + version "0.5.7" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" + integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= + +js-sha3@0.8.0, js-sha3@^0.8.0: + version "0.8.0" + resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" + integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== + +js-tokens@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" + integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== + +js-yaml@3.13.1: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +js-yaml@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" + integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== + dependencies: + argparse "^2.0.1" + +js-yaml@^3.13.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" + integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + +jsbn@~0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" + integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= + +jsdom-global@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/jsdom-global/-/jsdom-global-3.0.2.tgz#6bd299c13b0c4626b2da2c0393cd4385d606acb9" + integrity sha1-a9KZwTsMRiay2iwDk81DhdYGrLk= + +jsdom@^16.2.2: + version "16.7.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" + integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== + dependencies: + abab "^2.0.5" + acorn "^8.2.4" + acorn-globals "^6.0.0" + cssom "^0.4.4" + cssstyle "^2.3.0" + data-urls "^2.0.0" + decimal.js "^10.2.1" + domexception "^2.0.1" + escodegen "^2.0.0" + form-data "^3.0.0" + html-encoding-sniffer "^2.0.1" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.0" + parse5 "6.0.1" + saxes "^5.0.1" + symbol-tree "^3.2.4" + tough-cookie "^4.0.0" + w3c-hr-time "^1.0.2" + w3c-xmlserializer "^2.0.0" + webidl-conversions "^6.1.0" + whatwg-encoding "^1.0.5" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.5.0" + ws "^7.4.6" + xml-name-validator "^3.0.0" + +jsesc@^2.5.1: + version "2.5.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" + integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== + +json-buffer@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" + integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= + +json-parse-better-errors@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" + integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== + +json-schema-traverse@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" + integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== + +json-schema-traverse@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" + integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== + +json-schema@0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" + integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= + +json-stable-stringify-without-jsonify@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" + integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= + +json-stringify-safe@~5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" + integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= + +json5@^2.1.2, json5@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3" + integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA== + dependencies: + minimist "^1.2.5" + +jsonfile@^2.1.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" + integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= + optionalDependencies: + graceful-fs "^4.1.6" + +jsonfile@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" + integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= + optionalDependencies: + graceful-fs "^4.1.6" + +jsprim@^1.2.2: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" + integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.2.3" + verror "1.10.0" + +keccak@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff" + integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== + dependencies: + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +keyv@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" + integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== + dependencies: + json-buffer "3.0.0" + +kind-of@^6.0.2: + version "6.0.3" + resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" + integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== + +klaw@^1.0.0: + version "1.3.1" + resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" + integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= + optionalDependencies: + graceful-fs "^4.1.9" + +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + +level-codec@^9.0.0: + version "9.0.2" + resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.2.tgz#fd60df8c64786a80d44e63423096ffead63d8cbc" + integrity sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ== + dependencies: + buffer "^5.6.0" + +level-concat-iterator@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz#1d1009cf108340252cb38c51f9727311193e6263" + integrity sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw== + +level-errors@^2.0.0, level-errors@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8" + integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== + dependencies: + errno "~0.1.1" + +level-iterator-stream@~4.0.0: + version "4.0.2" + resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz#7ceba69b713b0d7e22fcc0d1f128ccdc8a24f79c" + integrity sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q== + dependencies: + inherits "^2.0.4" + readable-stream "^3.4.0" + xtend "^4.0.2" + +level-mem@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/level-mem/-/level-mem-5.0.1.tgz#c345126b74f5b8aa376dc77d36813a177ef8251d" + integrity sha512-qd+qUJHXsGSFoHTziptAKXoLX87QjR7v2KMbqncDXPxQuCdsQlzmyX+gwrEHhlzn08vkf8TyipYyMmiC6Gobzg== + dependencies: + level-packager "^5.0.3" + memdown "^5.0.0" + +level-packager@^5.0.3: + version "5.1.1" + resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-5.1.1.tgz#323ec842d6babe7336f70299c14df2e329c18939" + integrity sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ== + dependencies: + encoding-down "^6.3.0" + levelup "^4.3.2" + +level-supports@~1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/level-supports/-/level-supports-1.0.1.tgz#2f530a596834c7301622521988e2c36bb77d122d" + integrity sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg== + dependencies: + xtend "^4.0.2" + +level-ws@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-2.0.0.tgz#207a07bcd0164a0ec5d62c304b4615c54436d339" + integrity sha512-1iv7VXx0G9ec1isqQZ7y5LmoZo/ewAsyDHNA8EFDW5hqH2Kqovm33nSFkSdnLLAK+I5FlT+lo5Cw9itGe+CpQA== + dependencies: + inherits "^2.0.3" + readable-stream "^3.1.0" + xtend "^4.0.1" + +levelup@^4.3.2: + version "4.4.0" + resolved "https://registry.yarnpkg.com/levelup/-/levelup-4.4.0.tgz#f89da3a228c38deb49c48f88a70fb71f01cafed6" + integrity sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ== + dependencies: + deferred-leveldown "~5.3.0" + level-errors "~2.0.0" + level-iterator-stream "~4.0.0" + level-supports "~1.0.0" + xtend "~4.0.0" + +levn@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" + integrity sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ== + dependencies: + prelude-ls "^1.2.1" + type-check "~0.4.0" + +levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + +load-json-file@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b" + integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs= + dependencies: + graceful-fs "^4.1.2" + parse-json "^4.0.0" + pify "^3.0.0" + strip-bom "^3.0.0" + +locate-path@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e" + integrity sha1-K1aLJl7slExtnA3pw9u7ygNUzY4= + dependencies: + p-locate "^2.0.0" + path-exists "^3.0.0" + +locate-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" + integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== + dependencies: + p-locate "^3.0.0" + path-exists "^3.0.0" + +locate-path@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-5.0.0.tgz#1afba396afd676a6d42504d0a67a3a7eb9f62aa0" + integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== + dependencies: + p-locate "^4.1.0" + +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + +lodash.clonedeep@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef" + integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8= + +lodash.flattendeep@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2" + integrity sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= + +lodash.merge@^4.6.2: + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" + integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== + +lodash.truncate@^4.4.2: + version "4.4.2" + resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" + integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM= + +lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.21, lodash@^4.7.0: + version "4.17.21" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" + integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== + +log-symbols@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-3.0.0.tgz#f3a08516a5dea893336a7dee14d18a1cfdab77c4" + integrity sha512-dSkNGuI7iG3mfvDzUuYZyvk5dD9ocYCYzNU6CYDE6+Xqd+gwme6Z00NS3dUh8mq/73HaEtT7m6W+yUPtU6BZnQ== + dependencies: + chalk "^2.4.2" + +log-symbols@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" + integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== + dependencies: + chalk "^4.0.0" + +lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" + integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== + +lowercase-keys@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" + integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== + +lru-cache@^5.1.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" + integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== + dependencies: + yallist "^3.0.2" + +lru-cache@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" + integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== + dependencies: + yallist "^4.0.0" + +lru_map@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd" + integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0= + +ltgt@~2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" + integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= + +make-dir@^2.0.0, make-dir@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5" + integrity sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA== + dependencies: + pify "^4.0.1" + semver "^5.6.0" + +make-dir@^3.0.0, make-dir@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-3.1.0.tgz#415e967046b3a7f1d185277d84aa58203726a13f" + integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== + dependencies: + semver "^6.0.0" + +make-error@^1.1.1: + version "1.3.6" + resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" + integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== + +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + +mcl-wasm@^0.7.1: + version "0.7.8" + resolved "https://registry.yarnpkg.com/mcl-wasm/-/mcl-wasm-0.7.8.tgz#4d0dc5a92f7bd20892fd3fcd41764acf86fd1e6e" + integrity sha512-qNHlYO6wuEtSoH5A8TcZfCEHtw8gGPqF6hLZpQn2SVd/Mck0ELIKOkmj072D98S9B9CI/jZybTUC96q1P2/ZDw== + dependencies: + typescript "^4.3.4" + +md5.js@^1.3.4: + version "1.3.5" + resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" + integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + safe-buffer "^5.1.2" + +media-typer@0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" + integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= + +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== + dependencies: + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" + +memdown@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/memdown/-/memdown-5.1.0.tgz#608e91a9f10f37f5b5fe767667a8674129a833cb" + integrity sha512-B3J+UizMRAlEArDjWHTMmadet+UKwHd3UjMgGBkZcKAxAYVPS9o0Yeiha4qvz7iGiL2Sb3igUft6p7nbFWctpw== + dependencies: + abstract-leveldown "~6.2.1" + functional-red-black-tree "~1.0.1" + immediate "~3.2.3" + inherits "~2.0.1" + ltgt "~2.2.0" + safe-buffer "~5.2.0" + +memorystream@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" + integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= + +merge-descriptors@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" + integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= + +merge2@^1.3.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" + integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== + +merkle-patricia-tree@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-4.2.0.tgz#a204b9041be5c25e8d14f0ff47021de090e811a1" + integrity sha512-0sBVXs7z1Q1/kxzWZ3nPnxSPiaHKF/f497UQzt9O7isRcS10tel9jM/4TivF6Jv7V1yFq4bWyoATxbDUOen5vQ== + dependencies: + "@types/levelup" "^4.3.0" + ethereumjs-util "^7.0.10" + level-mem "^5.0.1" + level-ws "^2.0.0" + readable-stream "^3.6.0" + rlp "^2.2.4" + semaphore-async-await "^1.5.1" + +methods@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" + integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= + +micromatch@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" + integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== + dependencies: + braces "^3.0.1" + picomatch "^2.2.3" + +miller-rabin@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" + integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== + dependencies: + bn.js "^4.0.0" + brorand "^1.0.1" + +mime-db@1.49.0: + version "1.49.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.49.0.tgz#f3dfde60c99e9cf3bc9701d687778f537001cbed" + integrity sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA== + +mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: + version "2.1.32" + resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.32.tgz#1d00e89e7de7fe02008db61001d9e02852670fd5" + integrity sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A== + dependencies: + mime-db "1.49.0" + +mime@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" + integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== + +mimic-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + +mimic-response@^1.0.0, mimic-response@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" + integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== + +min-document@^2.19.0: + version "2.19.0" + resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" + integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= + dependencies: + dom-walk "^0.1.0" + +minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" + integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== + +minimalistic-crypto-utils@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" + integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= + +minimatch@3.0.4, minimatch@^3.0.3, minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== + +minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" + integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== + dependencies: + safe-buffer "^5.1.2" + yallist "^3.0.0" + +minizlib@^1.2.1: + version "1.3.3" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" + integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== + dependencies: + minipass "^2.9.0" + +mixly@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mixly/-/mixly-1.0.0.tgz#9b5a2e1f63e6dfba0d30e6797ffae62ab1dc24ef" + integrity sha1-m1ouH2Pm37oNMOZ5f/rmKrHcJO8= + dependencies: + fulcon "^1.0.1" + +mkdirp-promise@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" + integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= + dependencies: + mkdirp "*" + +mkdirp@*, mkdirp@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +mkdirp@0.5.5, mkdirp@^0.5.0, mkdirp@^0.5.1: + version "0.5.5" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" + integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== + dependencies: + minimist "^1.2.5" + +mnemonist@^0.38.0: + version "0.38.3" + resolved "https://registry.yarnpkg.com/mnemonist/-/mnemonist-0.38.3.tgz#35ec79c1c1f4357cfda2fe264659c2775ccd7d9d" + integrity sha512-2K9QYubXx/NAjv4VLq1d1Ly8pWNC5L3BrixtdkyTegXWJIqY+zLNDhhX/A+ZwWt70tB1S8H4BE8FLYEFyNoOBw== + dependencies: + obliterator "^1.6.1" + +mocha@^7.1.2: + version "7.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-7.2.0.tgz#01cc227b00d875ab1eed03a75106689cfed5a604" + integrity sha512-O9CIypScywTVpNaRrCAgoUnJgozpIofjKUYmJhiCIJMiuYnLI6otcb1/kpW9/n/tJODHGZ7i8aLQoDVsMtOKQQ== + dependencies: + ansi-colors "3.2.3" + browser-stdout "1.3.1" + chokidar "3.3.0" + debug "3.2.6" + diff "3.5.0" + escape-string-regexp "1.0.5" + find-up "3.0.0" + glob "7.1.3" + growl "1.10.5" + he "1.2.0" + js-yaml "3.13.1" + log-symbols "3.0.0" + minimatch "3.0.4" + mkdirp "0.5.5" + ms "2.1.1" + node-environment-flags "1.0.6" + object.assign "4.1.0" + strip-json-comments "2.0.1" + supports-color "6.0.0" + which "1.3.1" + wide-align "1.1.3" + yargs "13.3.2" + yargs-parser "13.1.2" + yargs-unparser "1.6.0" + +mocha@^8.2.1: + version "8.4.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.4.0.tgz#677be88bf15980a3cae03a73e10a0fc3997f0cff" + integrity sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ== + dependencies: + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.1" + debug "4.3.1" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.1.6" + growl "1.10.5" + he "1.2.0" + js-yaml "4.0.0" + log-symbols "4.0.0" + minimatch "3.0.4" + ms "2.1.3" + nanoid "3.1.20" + serialize-javascript "5.0.1" + strip-json-comments "3.1.1" + supports-color "8.1.1" + which "2.0.2" + wide-align "1.1.3" + workerpool "6.1.0" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + +mock-fs@^4.1.0: + version "4.14.0" + resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" + integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== + +moment@^2.29.1: + version "2.29.1" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3" + integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ== + +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= + +ms@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" + integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== + +ms@2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + +ms@2.1.3, ms@^2.1.1: + version "2.1.3" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" + integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== + +multibase@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" + integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multibase@~0.6.0: + version "0.6.1" + resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" + integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== + dependencies: + base-x "^3.0.8" + buffer "^5.5.0" + +multicodec@^0.5.5: + version "0.5.7" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" + integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== + dependencies: + varint "^5.0.0" + +multicodec@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" + integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== + dependencies: + buffer "^5.6.0" + varint "^5.0.0" + +multihashes@^0.4.15, multihashes@~0.4.15: + version "0.4.21" + resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" + integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== + dependencies: + buffer "^5.5.0" + multibase "^0.7.0" + varint "^5.0.0" + +nano-json-stream-parser@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" + integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= + +nanoid@3.1.20: + version "3.1.20" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" + integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== + +natural-compare@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" + integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= + +negotiator@0.6.2: + version "0.6.2" + resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" + integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== + +next-tick@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" + integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= + +nice-try@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" + integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== + +node-addon-api@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" + integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== + +node-environment-flags@1.0.6: + version "1.0.6" + resolved "https://registry.yarnpkg.com/node-environment-flags/-/node-environment-flags-1.0.6.tgz#a30ac13621f6f7d674260a54dede048c3982c088" + integrity sha512-5Evy2epuL+6TM0lCQGpFIj6KwiEsGh1SrHUhTbNX+sLbBtjidPZFAnVK9y5yU1+h//RitLbRHTIMyxQPtxMdHw== + dependencies: + object.getownpropertydescriptors "^2.0.3" + semver "^5.7.0" + +node-fetch@^2.6.0, node-fetch@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" + integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== + +node-fetch@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.2.tgz#986996818b73785e47b1965cc34eb093a1d464d0" + integrity sha512-aLoxToI6RfZ+0NOjmWAgn9+LEd30YCkJKFSyWacNZdEKTit/ZMcKjGkTRo8uWEsnIb/hfKecNPEbln02PdWbcA== + +node-gyp-build@^4.2.0: + version "4.2.3" + resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" + integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== + +node-modules-regexp@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/node-modules-regexp/-/node-modules-regexp-1.0.0.tgz#8d9dbe28964a4ac5712e9131642107c71e90ec40" + integrity sha1-jZ2+KJZKSsVxLpExZCEHxx6Q7EA= + +node-preload@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/node-preload/-/node-preload-0.2.1.tgz#c03043bb327f417a18fee7ab7ee57b408a144301" + integrity sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ== + dependencies: + process-on-spawn "^1.0.0" + +node-releases@^1.1.73: + version "1.1.73" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.1.73.tgz#dd4e81ddd5277ff846b80b52bb40c49edf7a7b20" + integrity sha512-uW7fodD6pyW2FZNZnp/Z3hvWKeEW1Y8R1+1CnErE8cXFXzl5blBOoVB41CvMer6P6Q0S5FXDwcHgFd1Wj0U9zg== + +noms@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859" + integrity sha1-2o69nzr51nYJGbJ9nNyAkqczKFk= + dependencies: + inherits "^2.0.1" + readable-stream "~1.0.31" + +normalize-package-data@^2.3.2: + version "2.5.0" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" + integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== + dependencies: + hosted-git-info "^2.1.4" + resolve "^1.10.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +normalize-path@^3.0.0, normalize-path@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + +normalize-url@^4.1.0: + version "4.5.1" + resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a" + integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== + +npm-run-path@^2.0.0: + version "2.0.2" + resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" + integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= + dependencies: + path-key "^2.0.0" + +number-to-bn@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" + integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA= + dependencies: + bn.js "4.11.6" + strip-hex-prefix "1.0.0" + +nwsapi@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7" + integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ== + +nyc@^15.1.0: + version "15.1.0" + resolved "https://registry.yarnpkg.com/nyc/-/nyc-15.1.0.tgz#1335dae12ddc87b6e249d5a1994ca4bdaea75f02" + integrity sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A== + dependencies: + "@istanbuljs/load-nyc-config" "^1.0.0" + "@istanbuljs/schema" "^0.1.2" + caching-transform "^4.0.0" + convert-source-map "^1.7.0" + decamelize "^1.2.0" + find-cache-dir "^3.2.0" + find-up "^4.1.0" + foreground-child "^2.0.0" + get-package-type "^0.1.0" + glob "^7.1.6" + istanbul-lib-coverage "^3.0.0" + istanbul-lib-hook "^3.0.0" + istanbul-lib-instrument "^4.0.0" + istanbul-lib-processinfo "^2.0.2" + istanbul-lib-report "^3.0.0" + istanbul-lib-source-maps "^4.0.0" + istanbul-reports "^3.0.2" + make-dir "^3.0.0" + node-preload "^0.2.1" + p-map "^3.0.0" + process-on-spawn "^1.0.0" + resolve-from "^5.0.0" + rimraf "^3.0.0" + signal-exit "^3.0.2" + spawn-wrap "^2.0.0" + test-exclude "^6.0.0" + yargs "^15.0.2" + +oauth-sign@~0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" + integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== + +object-assign@^4, object-assign@^4.1.0, object-assign@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= + +object-inspect@^1.11.0, object-inspect@^1.9.0: + version "1.11.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" + integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== + +object-keys@^1.0.11, object-keys@^1.0.12, object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + +object.assign@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da" + integrity sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w== + dependencies: + define-properties "^1.1.2" + function-bind "^1.1.1" + has-symbols "^1.0.0" + object-keys "^1.0.11" + +object.assign@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" + integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + has-symbols "^1.0.1" + object-keys "^1.1.1" + +object.entries@^1.1.2: + version "1.1.4" + resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.4.tgz#43ccf9a50bc5fd5b649d45ab1a579f24e088cafd" + integrity sha512-h4LWKWE+wKQGhtMjZEBud7uLGhqyLwj8fpHOarZhD2uY3C9cRtk57VQ89ke3moByLXMedqs3XCHzyb4AmA2DjA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.2" + +object.getownpropertydescriptors@^2.0.3, object.getownpropertydescriptors@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7" + integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.0-next.2" + +object.values@^1.1.3: + version "1.1.4" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.4.tgz#0d273762833e816b693a637d30073e7051535b30" + integrity sha512-TnGo7j4XSnKQoK3MfvkzqKCi0nVe/D9I9IjwTNYdb/fxYHpjrluHVOgw0AF6jrRFGMPHdfuidR09tIDiIvnaSg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.18.2" + +obliterator@^1.6.1: + version "1.6.1" + resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-1.6.1.tgz#dea03e8ab821f6c4d96a299e17aef6a3af994ef3" + integrity sha512-9WXswnqINnnhOG/5SLimUlzuU1hFJUc8zkwyD59Sd+dPOMf05PmnYG/d6Q7HZ+KmgkZJa1PxRso6QdM3sTNHig== + +oboe@2.1.5: + version "2.1.5" + resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" + integrity sha1-VVQoTFQ6ImbXo48X4HOCH73jk80= + dependencies: + http-https "^1.0.0" + +on-finished@~2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" + integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= + dependencies: + ee-first "1.1.1" + +once@^1.3.0, once@^1.3.1, once@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +optionator@^0.8.1: + version "0.8.3" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" + integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== + dependencies: + deep-is "~0.1.3" + fast-levenshtein "~2.0.6" + levn "~0.3.0" + prelude-ls "~1.1.2" + type-check "~0.3.2" + word-wrap "~1.2.3" + +optionator@^0.9.1: + version "0.9.1" + resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.1.tgz#4f236a6373dae0566a6d43e1326674f50c291499" + integrity sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw== + dependencies: + deep-is "^0.1.3" + fast-levenshtein "^2.0.6" + levn "^0.4.1" + prelude-ls "^1.2.1" + type-check "^0.4.0" + word-wrap "^1.2.3" + +os-locale@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== + dependencies: + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" + +os-tmpdir@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" + integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= + +p-cancelable@^0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" + integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== + +p-cancelable@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" + integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== + +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + +p-finally@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" + integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= + +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + +p-limit@^1.1.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" + integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== + dependencies: + p-try "^1.0.0" + +p-limit@^2.0.0, p-limit@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-2.3.0.tgz#3dd33c647a214fdfffd835933eb086da0dc21db1" + integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== + dependencies: + p-try "^2.0.0" + +p-limit@^3.0.2: + version "3.1.0" + resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" + integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== + dependencies: + yocto-queue "^0.1.0" + +p-locate@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-2.0.0.tgz#20a0103b222a70c8fd39cc2e580680f3dde5ec43" + integrity sha1-IKAQOyIqcMj9OcwuWAaA893l7EM= + dependencies: + p-limit "^1.1.0" + +p-locate@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-3.0.0.tgz#322d69a05c0264b25997d9f40cd8a891ab0064a4" + integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== + dependencies: + p-limit "^2.0.0" + +p-locate@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-4.1.0.tgz#a3428bb7088b3a60292f66919278b7c297ad4f07" + integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== + dependencies: + p-limit "^2.2.0" + +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + +p-map@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-3.0.0.tgz#d704d9af8a2ba684e2600d9a215983d4141a979d" + integrity sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ== + dependencies: + aggregate-error "^3.0.0" + +p-timeout@^1.1.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" + integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= + dependencies: + p-finally "^1.0.0" + +p-try@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-1.0.0.tgz#cbc79cdbaf8fd4228e13f621f2b1a237c1b207b3" + integrity sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M= + +p-try@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/p-try/-/p-try-2.2.0.tgz#cb2868540e313d61de58fafbe35ce9004d5540e6" + integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== + +package-hash@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/package-hash/-/package-hash-4.0.0.tgz#3537f654665ec3cc38827387fc904c163c54f506" + integrity sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ== + dependencies: + graceful-fs "^4.1.15" + hasha "^5.0.0" + lodash.flattendeep "^4.4.0" + release-zalgo "^1.0.0" + +packet-reader@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/packet-reader/-/packet-reader-1.0.0.tgz#9238e5480dedabacfe1fe3f2771063f164157d74" + integrity sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ== + +parent-module@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.1.tgz#691d2709e78c79fae3a156622452d00762caaaa2" + integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== + dependencies: + callsites "^3.0.0" + +parse-asn1@^5.0.0, parse-asn1@^5.1.5: + version "5.1.6" + resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" + integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== + dependencies: + asn1.js "^5.2.0" + browserify-aes "^1.0.0" + evp_bytestokey "^1.0.0" + pbkdf2 "^3.0.3" + safe-buffer "^5.1.1" + +parse-headers@^2.0.0: + version "2.0.4" + resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.4.tgz#9eaf2d02bed2d1eff494331ce3df36d7924760bf" + integrity sha512-psZ9iZoCNFLrgRjZ1d8mn0h9WRqJwFxM9q3x7iUjN/YT2OksthDJ5TiPCu2F38kS4zutqfW+YdVVkBZZx3/1aw== + +parse-json@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-4.0.0.tgz#be35f5425be1f7f6c747184f98a788cb99477ee0" + integrity sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA= + dependencies: + error-ex "^1.3.1" + json-parse-better-errors "^1.0.1" + +parse5@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + +parseurl@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" + integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== + +path-exists@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-3.0.0.tgz#ce0ebeaa5f78cb18925ea7d810d7b59b010fd515" + integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= + +path-exists@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" + integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +path-key@^2.0.0, path-key@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" + integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= + +path-key@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" + integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== + +path-parse@^1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" + integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== + +path-to-regexp@0.1.7: + version "0.1.7" + resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" + integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= + +path-type@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-3.0.0.tgz#cef31dc8e0a1a3bb0d105c0cd97cf3bf47f4e36f" + integrity sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg== + dependencies: + pify "^3.0.0" + +path-type@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-4.0.0.tgz#84ed01c0a7ba380afe09d90a8c180dcd9d03043b" + integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== + +pathval@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" + integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== + +pbkdf2@^3.0.17, pbkdf2@^3.0.3: + version "3.1.2" + resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" + integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== + dependencies: + create-hash "^1.1.2" + create-hmac "^1.1.4" + ripemd160 "^2.0.1" + safe-buffer "^5.0.1" + sha.js "^2.4.8" + +performance-now@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" + integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= + +pg-connection-string@^2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-2.5.0.tgz#538cadd0f7e603fc09a12590f3b8a452c2c0cf34" + integrity sha512-r5o/V/ORTA6TmUnyWZR9nCj1klXCO2CEKNRlVuJptZe85QuhFayC7WeMic7ndayT5IRIR0S0xFxFi2ousartlQ== + +pg-format@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/pg-format/-/pg-format-1.0.4.tgz#27734236c2ad3f4e5064915a59334e20040a828e" + integrity sha1-J3NCNsKtP05QZJFaWTNOIAQKgo4= + +pg-int8@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/pg-int8/-/pg-int8-1.0.1.tgz#943bd463bf5b71b4170115f80f8efc9a0c0eb78c" + integrity sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw== + +pg-pool@^3.4.1: + version "3.4.1" + resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-3.4.1.tgz#0e71ce2c67b442a5e862a9c182172c37eda71e9c" + integrity sha512-TVHxR/gf3MeJRvchgNHxsYsTCHQ+4wm3VIHSS19z8NC0+gioEhq1okDY1sm/TYbfoP6JLFx01s0ShvZ3puP/iQ== + +pg-protocol@^1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/pg-protocol/-/pg-protocol-1.5.0.tgz#b5dd452257314565e2d54ab3c132adc46565a6a0" + integrity sha512-muRttij7H8TqRNu/DxrAJQITO4Ac7RmX3Klyr/9mJEOBeIpgnF8f9jAfRz5d3XwQZl5qBjF9gLsUtMPJE0vezQ== + +pg-types@^2.1.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-2.2.0.tgz#2d0250d636454f7cfa3b6ae0382fdfa8063254a3" + integrity sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA== + dependencies: + pg-int8 "1.0.1" + postgres-array "~2.0.0" + postgres-bytea "~1.0.0" + postgres-date "~1.0.4" + postgres-interval "^1.1.0" + +pg@^8.6.0: + version "8.7.1" + resolved "https://registry.yarnpkg.com/pg/-/pg-8.7.1.tgz#9ea9d1ec225980c36f94e181d009ab9f4ce4c471" + integrity sha512-7bdYcv7V6U3KAtWjpQJJBww0UEsWuh4yQ/EjNf2HeO/NnvKjpvhEIe/A/TleP6wtmSKnUnghs5A9jUoK6iDdkA== + dependencies: + buffer-writer "2.0.0" + packet-reader "1.0.0" + pg-connection-string "^2.5.0" + pg-pool "^3.4.1" + pg-protocol "^1.5.0" + pg-types "^2.1.0" + pgpass "1.x" + +pgpass@1.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/pgpass/-/pgpass-1.0.4.tgz#85eb93a83800b20f8057a2b029bf05abaf94ea9c" + integrity sha512-YmuA56alyBq7M59vxVBfPJrGSozru8QAdoNlWuW3cz8l+UX3cWge0vTvjKhsSHSJpo3Bom8/Mm6hf0TR5GY0+w== + dependencies: + split2 "^3.1.1" + +picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" + integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== + +pify@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176" + integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY= + +pify@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" + integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== + +pirates@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.1.tgz#643a92caf894566f91b2b986d2c66950a8e2fb87" + integrity sha512-WuNqLTbMI3tmfef2TKxlQmAiLHKtFhlsCZnPIpuv2Ow0RDVO8lfy1Opf4NUzlMXLjPl+Men7AuVdX6TA+s+uGA== + dependencies: + node-modules-regexp "^1.0.0" + +pkg-dir@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" + integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= + dependencies: + find-up "^2.1.0" + +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + +pkg-dir@^4.1.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" + integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== + dependencies: + find-up "^4.0.0" + +pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-2.0.0.tgz#c819ac728059a461cab1c3889a2be3c49a004d7f" + integrity sha1-yBmscoBZpGHKscOImivjxJoATX8= + dependencies: + find-up "^2.1.0" + +postgres-array@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-2.0.0.tgz#48f8fce054fbc69671999329b8834b772652d82e" + integrity sha512-VpZrUqU5A69eQyW2c5CA1jtLecCsN2U/bD6VilrFDWq5+5UIEVO7nazS3TEcHf1zuPYO/sqGvUvW62g86RXZuA== + +postgres-bytea@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/postgres-bytea/-/postgres-bytea-1.0.0.tgz#027b533c0aa890e26d172d47cf9ccecc521acd35" + integrity sha1-AntTPAqokOJtFy1Hz5zOzFIazTU= + +postgres-date@~1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/postgres-date/-/postgres-date-1.0.7.tgz#51bc086006005e5061c591cee727f2531bf641a8" + integrity sha512-suDmjLVQg78nMK2UZ454hAG+OAW+HQPZ6n++TNDUX+L0+uUlLywnoxJKDou51Zm+zTCjrCl0Nq6J9C5hP9vK/Q== + +postgres-interval@^1.1.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/postgres-interval/-/postgres-interval-1.2.0.tgz#b460c82cb1587507788819a06aa0fffdb3544695" + integrity sha512-9ZhXKM/rw350N1ovuWHbGxnGh/SNJ4cnxHiM0rxE4VN41wsg8P8zWn9hv/buK00RP4WvlOyr/RBDiptyxVbkZQ== + dependencies: + xtend "^4.0.0" + +prelude-ls@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" + integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== + +prelude-ls@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" + integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= + +prepend-http@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" + integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= + +prepend-http@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" + integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= + +prettier-linter-helpers@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b" + integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w== + dependencies: + fast-diff "^1.1.2" + +prettier@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.2.tgz#1ba8f3eb92231e769b7fcd7cb73ae1b6b74ade08" + integrity sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg== + +prettier@^2.1.2: + version "2.3.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.2.tgz#ef280a05ec253712e486233db5c6f23441e7342d" + integrity sha512-lnJzDfJ66zkMy58OL5/NY5zp70S7Nz6KqcKkXYzn2tMVrNxvbqaBpg7H3qHaLxCJ5lNMsGuM8+ohS7cZrthdLQ== + +printj@~1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/printj/-/printj-1.1.2.tgz#d90deb2975a8b9f600fb3a1c94e3f4c53c78a222" + integrity sha512-zA2SmoLaxZyArQTOPj5LXecR+RagfPSU5Kw1qP+jkWeNlrq+eJZyY2oS68SU1Z/7/myXM4lo9716laOFAVStCQ== + +process-nextick-args@~2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" + integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== + +process-on-spawn@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/process-on-spawn/-/process-on-spawn-1.0.0.tgz#95b05a23073d30a17acfdc92a440efd2baefdc93" + integrity sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg== + dependencies: + fromentries "^1.2.0" + +process@^0.11.10: + version "0.11.10" + resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" + integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= + +progress@^2.0.0: + version "2.0.3" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" + integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== + +proxy-addr@~2.0.5: + version "2.0.7" + resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.7.tgz#f19fe69ceab311eeb94b42e70e8c2070f9ba1025" + integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== + dependencies: + forwarded "0.2.0" + ipaddr.js "1.9.1" + +prr@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" + integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= + +psl@^1.1.28, psl@^1.1.33: + version "1.8.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" + integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== + +public-encrypt@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" + integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== + dependencies: + bn.js "^4.1.0" + browserify-rsa "^4.0.0" + create-hash "^1.1.0" + parse-asn1 "^5.0.0" + randombytes "^2.0.1" + safe-buffer "^5.1.2" + +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + +punycode@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" + integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= + +punycode@^2.1.0, punycode@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" + integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== + +qs@6.7.0: + version "6.7.0" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" + integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== + +qs@^6.7.0: + version "6.10.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.10.1.tgz#4931482fa8d647a5aab799c5271d2133b981fb6a" + integrity sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg== + dependencies: + side-channel "^1.0.4" + +qs@~6.5.2: + version "6.5.2" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" + integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== + +query-string@^5.0.1: + version "5.1.1" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" + integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== + dependencies: + decode-uri-component "^0.2.0" + object-assign "^4.1.0" + strict-uri-encode "^1.0.0" + +queue-microtask@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243" + integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== + +randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + +randomfill@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" + integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== + dependencies: + randombytes "^2.0.5" + safe-buffer "^5.1.0" + +range-parser@~1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" + integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== + +raw-body@2.4.0: + version "2.4.0" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" + integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== + dependencies: + bytes "3.1.0" + http-errors "1.7.2" + iconv-lite "0.4.24" + unpipe "1.0.0" + +raw-body@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.1.tgz#30ac82f98bb5ae8c152e67149dac8d55153b168c" + integrity sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA== + dependencies: + bytes "3.1.0" + http-errors "1.7.3" + iconv-lite "0.4.24" + unpipe "1.0.0" + +read-pkg-up@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07" + integrity sha1-PtSWaF26D4/hGNBpHcUfSh/5bwc= + dependencies: + find-up "^2.0.0" + read-pkg "^3.0.0" + +read-pkg@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-3.0.0.tgz#9cbc686978fee65d16c00e2b19c237fcf6e38389" + integrity sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k= + dependencies: + load-json-file "^4.0.0" + normalize-package-data "^2.3.2" + path-type "^3.0.0" + +readable-stream@^3.0.0, readable-stream@^3.1.0, readable-stream@^3.4.0, readable-stream@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" + integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + +readable-stream@~1.0.31: + version "1.0.34" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" + integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@~2.3.6: + version "2.3.7" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" + integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.3" + isarray "~1.0.0" + process-nextick-args "~2.0.0" + safe-buffer "~5.1.1" + string_decoder "~1.1.1" + util-deprecate "~1.0.1" + +readdirp@~3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.2.0.tgz#c30c33352b12c96dfb4b895421a49fd5a9593839" + integrity sha512-crk4Qu3pmXwgxdSgGhgA/eXiJAPQiX4GMOZZMXnqKxHX7TaoL+3gQVo/WeuAiogr07DpnfjIMpXXa+PAIvwPGQ== + dependencies: + picomatch "^2.0.4" + +readdirp@~3.5.0: + version "3.5.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" + integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== + dependencies: + picomatch "^2.2.1" + +readdirp@~3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7" + integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== + dependencies: + picomatch "^2.2.1" + +regenerator-runtime@^0.13.4: + version "0.13.9" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" + integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== + +regexpp@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" + integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== + +release-zalgo@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/release-zalgo/-/release-zalgo-1.0.0.tgz#09700b7e5074329739330e535c5a90fb67851730" + integrity sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA= + dependencies: + es6-error "^4.0.1" + +request@^2.79.0: + version "2.88.2" + resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" + integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + har-validator "~5.1.3" + http-signature "~1.2.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + oauth-sign "~0.9.0" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^3.3.2" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= + +require-from-string@^2.0.0, require-from-string@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" + integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== + +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + +resolve-from@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6" + integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== + +resolve-from@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" + integrity sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw== + +resolve@1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + +resolve@^1.10.0, resolve@^1.13.1, resolve@^1.20.0, resolve@^1.8.1: + version "1.20.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" + integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== + dependencies: + is-core-module "^2.2.0" + path-parse "^1.0.6" + +responselike@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" + integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= + dependencies: + lowercase-keys "^1.0.0" + +reusify@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" + integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== + +rimraf@^2.2.8: + version "2.7.1" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" + integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== + dependencies: + glob "^7.1.3" + +rimraf@^3.0.0, rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +ripemd160@^2.0.0, ripemd160@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" + integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== + dependencies: + hash-base "^3.0.0" + inherits "^2.0.1" + +rlp@^2.0.0, rlp@^2.2.3, rlp@^2.2.4: + version "2.2.6" + resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.6.tgz#c80ba6266ac7a483ef1e69e8e2f056656de2fb2c" + integrity sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg== + dependencies: + bn.js "^4.11.1" + +run-parallel@^1.1.9: + version "1.2.0" + resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee" + integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== + dependencies: + queue-microtask "^1.2.2" + +rustbn.js@~0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" + integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== + +rxjs@^7.3.0: + version "7.3.0" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.3.0.tgz#39fe4f3461dc1e50be1475b2b85a0a88c1e938c6" + integrity sha512-p2yuGIg9S1epc3vrjKf6iVb3RCaAYjYskkO+jHIaV0IjOPlJop4UnodOoFb2xeNwlguqLYvGw1b1McillYb5Gw== + dependencies: + tslib "~2.1.0" + +safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" + integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== + +safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" + integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== + +"safer-buffer@>= 2.1.2 < 3", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: + version "2.1.2" + resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" + integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== + +saxes@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" + integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== + dependencies: + xmlchars "^2.2.0" + +scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" + integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== + +scryptsy@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-2.1.0.tgz#8d1e8d0c025b58fdd25b6fa9a0dc905ee8faa790" + integrity sha512-1CdSqHQowJBnMAFyPEBRfqag/YP9OF394FV+4YREIJX4ljD7OxvQRDayyoyyCk+senRjSkP6VnUNQmVQqB6g7w== + +secp256k1@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz#15dd57d0f0b9fdb54ac1fa1694f40e5e9a54f4a1" + integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg== + dependencies: + elliptic "^6.5.2" + node-addon-api "^2.0.0" + node-gyp-build "^4.2.0" + +semaphore-async-await@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa" + integrity sha1-hXvvXjZEYBykuVcLh+nfXKEpdPo= + +"semver@2 || 3 || 4 || 5", semver@^5.5.0, semver@^5.6.0, semver@^5.7.0: + version "5.7.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" + integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== + +semver@^6.0.0, semver@^6.3.0: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + +semver@^7.2.1, semver@^7.3.5: + version "7.3.5" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" + integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== + dependencies: + lru-cache "^6.0.0" + +send@0.17.1: + version "0.17.1" + resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" + integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== + dependencies: + debug "2.6.9" + depd "~1.1.2" + destroy "~1.0.4" + encodeurl "~1.0.2" + escape-html "~1.0.3" + etag "~1.8.1" + fresh "0.5.2" + http-errors "~1.7.2" + mime "1.6.0" + ms "2.1.1" + on-finished "~2.3.0" + range-parser "~1.2.1" + statuses "~1.5.0" + +serialize-javascript@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + +serve-static@1.14.1: + version "1.14.1" + resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" + integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" + +servify@^0.1.12: + version "0.1.12" + resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" + integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== + dependencies: + body-parser "^1.16.0" + cors "^2.8.1" + express "^4.14.0" + request "^2.79.0" + xhr "^2.3.3" + +set-blocking@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= + +setimmediate@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" + integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= + +setprototypeof@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" + integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== + +sha.js@^2.4.0, sha.js@^2.4.8: + version "2.4.11" + resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" + integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== + dependencies: + inherits "^2.0.1" + safe-buffer "^5.0.1" + +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" + integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= + dependencies: + shebang-regex "^1.0.0" + +shebang-command@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" + integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== + dependencies: + shebang-regex "^3.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" + integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= + +shebang-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" + integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== + +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + +signal-exit@^3.0.0, signal-exit@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" + integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== + +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^2.7.0: + version "2.8.1" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz#0e22e91d4575d87620620bc91308d57a77f44b5d" + integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== + dependencies: + decompress-response "^3.3.0" + once "^1.3.1" + simple-concat "^1.0.0" + +slash@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" + integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== + +sleep-promise@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/sleep-promise/-/sleep-promise-8.0.1.tgz#8d795a27ea23953df6b52b91081e5e22665993c5" + integrity sha1-jXlaJ+ojlT32tSuRCB5eImZZk8U= + +slice-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" + integrity sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + +solc@0.7.3: + version "0.7.3" + resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.3.tgz#04646961bd867a744f63d2b4e3c0701ffdc7d78a" + integrity sha512-GAsWNAjGzIDg7VxzP6mPjdurby3IkGCjQcM8GFYZT6RyaoUZKmMU6Y7YwG+tFGhv7dwZ8rmR4iwFDrrD99JwqA== + dependencies: + command-exists "^1.2.8" + commander "3.0.2" + follow-redirects "^1.12.1" + fs-extra "^0.30.0" + js-sha3 "0.8.0" + memorystream "^0.3.1" + require-from-string "^2.0.0" + semver "^5.5.0" + tmp "0.0.33" + +source-map-support@0.5.12: + version "0.5.12" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" + integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map-support@^0.5.13, source-map-support@^0.5.16, source-map-support@^0.5.17, source-map-support@^0.5.6: + version "0.5.19" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" + integrity sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + +source-map@0.5.6: + version "0.5.6" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.6.tgz#75ce38f52bf0733c5a7f0c118d81334a2bb5f412" + integrity sha1-dc449SvwczxafwwRjYEzSiu19BI= + +source-map@^0.5.0: + version "0.5.7" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" + integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= + +source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" + integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== + +spawn-wrap@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-2.0.0.tgz#103685b8b8f9b79771318827aa78650a610d457e" + integrity sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg== + dependencies: + foreground-child "^2.0.0" + is-windows "^1.0.2" + make-dir "^3.0.0" + rimraf "^3.0.0" + signal-exit "^3.0.2" + which "^2.0.1" + +spdx-correct@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" + integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== + dependencies: + spdx-expression-parse "^3.0.0" + spdx-license-ids "^3.0.0" + +spdx-exceptions@^2.1.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" + integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== + +spdx-expression-parse@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" + integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== + dependencies: + spdx-exceptions "^2.1.0" + spdx-license-ids "^3.0.0" + +spdx-license-ids@^3.0.0: + version "3.0.9" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.9.tgz#8a595135def9592bda69709474f1cbeea7c2467f" + integrity sha512-Ki212dKK4ogX+xDo4CtOZBVIwhsKBEfsEEcwmJfLQzirgc2jIWdzg40Unxz/HzEUqM1WFzVlQSMF9kZZ2HboLQ== + +split2@^3.1.1: + version "3.2.2" + resolved "https://registry.yarnpkg.com/split2/-/split2-3.2.2.tgz#bf2cf2a37d838312c249c89206fd7a17dd12365f" + integrity sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg== + dependencies: + readable-stream "^3.0.0" + +sprintf-js@~1.0.2: + version "1.0.3" + resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" + integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= + +sshpk@^1.7.0: + version "1.16.1" + resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" + integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== + dependencies: + asn1 "~0.2.3" + assert-plus "^1.0.0" + bcrypt-pbkdf "^1.0.0" + dashdash "^1.12.0" + ecc-jsbn "~0.1.1" + getpass "^0.1.1" + jsbn "~0.1.0" + safer-buffer "^2.0.2" + tweetnacl "~0.14.0" + +stack-generator@^1.0.7: + version "1.1.0" + resolved "https://registry.yarnpkg.com/stack-generator/-/stack-generator-1.1.0.tgz#36f6a920751a6c10f499a13c32cbb5f51a0b8b25" + integrity sha1-NvapIHUabBD0maE8Msu19RoLiyU= + dependencies: + stackframe "^1.0.2" + +stackframe@^0.3.1, stackframe@~0.3: + version "0.3.1" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-0.3.1.tgz#33aa84f1177a5548c8935533cbfeb3420975f5a4" + integrity sha1-M6qE8Rd6VUjIk1Uzy/6zQgl19aQ= + +stackframe@^1.0.2: + version "1.2.0" + resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-1.2.0.tgz#52429492d63c62eb989804c11552e3d22e779303" + integrity sha512-GrdeshiRmS1YLMYgzF16olf2jJ/IzxXY9lhKOskuVziubpTYcYqyOwYeJKzQkwy7uN0fYSsbsC4RQaXf9LCrYA== + +stacktrace-gps@^2.4.3: + version "2.4.4" + resolved "https://registry.yarnpkg.com/stacktrace-gps/-/stacktrace-gps-2.4.4.tgz#69c827e9d6d6f41cf438d7f195e2e3cbfcf28c44" + integrity sha1-acgn6dbW9Bz0ONfxleLjy/zyjEQ= + dependencies: + source-map "0.5.6" + stackframe "~0.3" + +stacktrace-js@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/stacktrace-js/-/stacktrace-js-1.3.1.tgz#67cab2589af5c417b962f7369940277bb3b6a18b" + integrity sha1-Z8qyWJr1xBe5Yvc2mUAne7O2oYs= + dependencies: + error-stack-parser "^1.3.6" + stack-generator "^1.0.7" + stacktrace-gps "^2.4.3" + +stacktrace-parser@^0.1.10: + version "0.1.10" + resolved "https://registry.yarnpkg.com/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz#29fb0cae4e0d0b85155879402857a1639eb6051a" + integrity sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg== + dependencies: + type-fest "^0.7.1" + +"statuses@>= 1.5.0 < 2", statuses@~1.5.0: + version "1.5.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" + integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= + +strict-uri-encode@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" + integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= + +"string-width@^1.0.2 || 2": + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" + integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== + dependencies: + is-fullwidth-code-point "^2.0.0" + strip-ansi "^4.0.0" + +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + +string-width@^4.1.0, string-width@^4.2.0: + version "4.2.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" + integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== + dependencies: + emoji-regex "^8.0.0" + is-fullwidth-code-point "^3.0.0" + strip-ansi "^6.0.0" + +string.prototype.trimend@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" + integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string.prototype.trimstart@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" + integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + +string_decoder@^1.1.1: + version "1.3.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" + integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== + dependencies: + safe-buffer "~5.2.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= + +string_decoder@~1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" + integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== + dependencies: + safe-buffer "~5.1.0" + +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= + dependencies: + ansi-regex "^3.0.0" + +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + +strip-ansi@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" + integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== + dependencies: + ansi-regex "^5.0.0" + +strip-bom@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" + integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM= + +strip-bom@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878" + integrity sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w== + +strip-eof@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf" + integrity sha1-u0P/VZim6wXYm1n80SnJgzE2Br8= + +strip-hex-prefix@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" + integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= + dependencies: + is-hex-prefixed "1.0.0" + +strip-json-comments@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a" + integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= + +strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" + integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== + +supports-color@6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.0.0.tgz#76cfe742cf1f41bb9b1c29ad03068c05b4c0e40a" + integrity sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg== + dependencies: + has-flag "^3.0.0" + +supports-color@8.1.1: + version "8.1.1" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + +supports-color@^5.3.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" + integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== + dependencies: + has-flag "^3.0.0" + +supports-color@^7.1.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" + integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== + dependencies: + has-flag "^4.0.0" + +swarm-js@^0.1.40: + version "0.1.40" + resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" + integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== + dependencies: + bluebird "^3.5.0" + buffer "^5.0.5" + eth-lib "^0.1.26" + fs-extra "^4.0.2" + got "^7.1.0" + mime-types "^2.1.16" + mkdirp-promise "^5.0.1" + mock-fs "^4.1.0" + setimmediate "^1.0.5" + tar "^4.0.2" + xhr-request "^1.0.1" + +symbol-tree@^3.2.4: + version "3.2.4" + resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2" + integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== + +table@^6.0.9: + version "6.7.1" + resolved "https://registry.yarnpkg.com/table/-/table-6.7.1.tgz#ee05592b7143831a8c94f3cee6aae4c1ccef33e2" + integrity sha512-ZGum47Yi6KOOFDE8m223td53ath2enHcYLgOCjGr5ngu8bdIARQk6mN/wRMv4yMRcHnCSnHbCEha4sobQx5yWg== + dependencies: + ajv "^8.0.1" + lodash.clonedeep "^4.5.0" + lodash.truncate "^4.4.2" + slice-ansi "^4.0.0" + string-width "^4.2.0" + strip-ansi "^6.0.0" + +tar@^4.0.2: + version "4.4.15" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.15.tgz#3caced4f39ebd46ddda4d6203d48493a919697f8" + integrity sha512-ItbufpujXkry7bHH9NpQyTXPbJ72iTlXgkBAYsAjDXk3Ds8t/3NfO5P4xZGy7u+sYuQUbimgzswX4uQIEeNVOA== + dependencies: + chownr "^1.1.1" + fs-minipass "^1.2.5" + minipass "^2.8.6" + minizlib "^1.2.1" + mkdirp "^0.5.0" + safe-buffer "^5.1.2" + yallist "^3.0.3" + +test-exclude@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-6.0.0.tgz#04a8698661d805ea6fa293b6cb9e63ac044ef15e" + integrity sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w== + dependencies: + "@istanbuljs/schema" "^0.1.2" + glob "^7.1.4" + minimatch "^3.0.4" + +test-value@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" + integrity sha1-Edpv9nDzRxpztiXKTz/c97t0gpE= + dependencies: + array-back "^1.0.3" + typical "^2.6.0" + +text-table@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" + integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= + +through2@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" + integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== + dependencies: + readable-stream "~2.3.6" + xtend "~4.0.1" + +timed-out@^4.0.0, timed-out@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" + integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= + +tmp-promise@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/tmp-promise/-/tmp-promise-3.0.2.tgz#6e933782abff8b00c3119d63589ca1fb9caaa62a" + integrity sha512-OyCLAKU1HzBjL6Ev3gxUeraJNlbNingmi8IrHHEsYH8LTmEuhvYfqvhn2F/je+mjf4N58UmZ96OMEy1JanSCpA== + dependencies: + tmp "^0.2.0" + +tmp@0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== + dependencies: + os-tmpdir "~1.0.2" + +tmp@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== + dependencies: + rimraf "^3.0.0" + +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= + +to-readable-stream@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" + integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== + +to-regex-range@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" + integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== + dependencies: + is-number "^7.0.0" + +toidentifier@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" + integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== + +tough-cookie@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" + integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.1.2" + +tough-cookie@~2.5.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" + integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== + dependencies: + psl "^1.1.28" + punycode "^2.1.1" + +tr46@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" + integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== + dependencies: + punycode "^2.1.1" + +"true-case-path@^2.2.1": + version "2.2.1" + resolved "https://registry.yarnpkg.com/true-case-path/-/true-case-path-2.2.1.tgz#c5bf04a5bbec3fd118be4084461b3a27c4d796bf" + integrity sha512-0z3j8R7MCjy10kc/g+qg7Ln3alJTodw9aDuVWZa3uiWqfuBMKeAeP2ocWcxoyM3D73yz3Jt/Pu4qPr4wHSdB/Q== + +ts-essentials@^1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-1.0.4.tgz#ce3b5dade5f5d97cf69889c11bf7d2da8555b15a" + integrity sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ== + +ts-essentials@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-7.0.3.tgz#686fd155a02133eedcc5362dc8b5056cde3e5a38" + integrity sha512-8+gr5+lqO3G84KdiTSMRLtuyJ+nTBVRKuCrK4lidMPdVeEp0uqC875uE5NMcaA7YYMN7XsNiFQuMvasF8HT/xQ== + +ts-generator@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/ts-generator/-/ts-generator-0.1.1.tgz#af46f2fb88a6db1f9785977e9590e7bcd79220ab" + integrity sha512-N+ahhZxTLYu1HNTQetwWcx3so8hcYbkKBHTr4b4/YgObFTIKkOSSsaa+nal12w8mfrJAyzJfETXawbNjSfP2gQ== + dependencies: + "@types/mkdirp" "^0.5.2" + "@types/prettier" "^2.1.1" + "@types/resolve" "^0.0.8" + chalk "^2.4.1" + glob "^7.1.2" + mkdirp "^0.5.1" + prettier "^2.1.2" + resolve "^1.8.1" + ts-essentials "^1.0.0" + +ts-mocha@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-8.0.0.tgz#962d0fa12eeb6468aa1a6b594bb3bbc818da3ef0" + integrity sha512-Kou1yxTlubLnD5C3unlCVO7nh0HERTezjoVhVw/M5S1SqoUec0WgllQvPk3vzPMc6by8m6xD1uR1yRf8lnVUbA== + dependencies: + ts-node "7.0.1" + optionalDependencies: + tsconfig-paths "^3.5.0" + +ts-node@7.0.1: + version "7.0.1" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-7.0.1.tgz#9562dc2d1e6d248d24bc55f773e3f614337d9baf" + integrity sha512-BVwVbPJRspzNh2yfslyT1PSbl5uIk03EZlb493RKHN4qej/D06n1cEhjlOJG69oFsE7OT8XjpTUcYf6pKTLMhw== + dependencies: + arrify "^1.0.0" + buffer-from "^1.1.0" + diff "^3.1.0" + make-error "^1.1.1" + minimist "^1.2.0" + mkdirp "^0.5.1" + source-map-support "^0.5.6" + yn "^2.0.0" + +ts-node@^8.10.2: + version "8.10.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d" + integrity sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA== + dependencies: + arg "^4.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + +tsconfig-paths@^3.5.0, tsconfig-paths@^3.9.0: + version "3.10.1" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz#79ae67a68c15289fdf5c51cb74f397522d795ed7" + integrity sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q== + dependencies: + json5 "^2.2.0" + minimist "^1.2.0" + strip-bom "^3.0.0" + +tslib@^1.8.1, tslib@^1.9.3: + version "1.14.1" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" + integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== + +tslib@~2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" + integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== + +tsort@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/tsort/-/tsort-0.0.1.tgz#e2280f5e817f8bf4275657fd0f9aebd44f5a2786" + integrity sha1-4igPXoF/i/QnVlf9D5rr1E9aJ4Y= + +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + +tunnel-agent@^0.6.0: + version "0.6.0" + resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" + integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= + dependencies: + safe-buffer "^5.0.1" + +tweetnacl-util@^0.15.0: + version "0.15.1" + resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" + integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== + +tweetnacl@1.x.x, tweetnacl@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" + integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== + +tweetnacl@^0.14.3, tweetnacl@~0.14.0: + version "0.14.5" + resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" + integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= + +type-check@^0.4.0, type-check@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" + integrity sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew== + dependencies: + prelude-ls "^1.2.1" + +type-check@~0.3.2: + version "0.3.2" + resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.3.2.tgz#5884cab512cf1d355e3fb784f30804b2b520db72" + integrity sha1-WITKtRLPHTVeP7eE8wgEsrUg23I= + dependencies: + prelude-ls "~1.1.2" + +type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5: + version "4.0.8" + resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" + integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== + +type-fest@^0.20.2: + version "0.20.2" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" + integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== + +type-fest@^0.21.3: + version "0.21.3" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37" + integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w== + +type-fest@^0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48" + integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg== + +type-fest@^0.8.0: + version "0.8.1" + resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" + integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== + +type-is@~1.6.17, type-is@~1.6.18: + version "1.6.18" + resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" + integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== + dependencies: + media-typer "0.3.0" + mime-types "~2.1.24" + +type@^1.0.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" + integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== + +type@^2.0.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/type/-/type-2.5.0.tgz#0a2e78c2e77907b252abe5f298c1b01c63f0db3d" + integrity sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw== + +typechain@^4.0.1: + version "4.0.3" + resolved "https://registry.yarnpkg.com/typechain/-/typechain-4.0.3.tgz#e8fcd6c984676858c64eeeb155ea783a10b73779" + integrity sha512-tmoHQeXZWHxIdeLK+i6dU0CU0vOd9Cndr3jFTZIMzak5/YpFZ8XoiYpTZcngygGBqZo+Z1EUmttLbW9KkFZLgQ== + dependencies: + command-line-args "^4.0.7" + debug "^4.1.1" + fs-extra "^7.0.0" + js-sha3 "^0.8.0" + lodash "^4.17.15" + ts-essentials "^7.0.1" + ts-generator "^0.1.1" + +typedarray-to-buffer@^3.1.5: + version "3.1.5" + resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" + integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== + dependencies: + is-typedarray "^1.0.0" + +typescript-logging@^0.6.4: + version "0.6.4" + resolved "https://registry.yarnpkg.com/typescript-logging/-/typescript-logging-0.6.4.tgz#c752cb3e7c051a32d3636a9b277a0a5e5295051e" + integrity sha512-jXISCGFyp4Q1uKLKi3zF0o8rwjeEipcIO7+C+jRttks3Ci8+8jDi9e87Jmz+8xuzZq+OcKJhDkiyHriqaWb+4A== + dependencies: + stacktrace-js "1.3.1" + +typescript@^4.3.4: + version "4.3.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.5.tgz#4d1c37cc16e893973c45a06886b7113234f119f4" + integrity sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA== + +typical@^2.6.0, typical@^2.6.1: + version "2.6.1" + resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" + integrity sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0= + +ultron@~1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" + integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== + +unbox-primitive@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" + integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== + dependencies: + function-bind "^1.1.1" + has-bigints "^1.0.1" + has-symbols "^1.0.2" + which-boxed-primitive "^1.0.2" + +underscore@^1.10.2: + version "1.13.1" + resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.13.1.tgz#0c1c6bd2df54b6b69f2314066d65b6cde6fcf9d1" + integrity sha512-hzSoAVtJF+3ZtiFX0VgfFPHEDRm7Y/QPjGyNo4TVdnDTdft3tr8hEkD25a1jC+TjTuE7tkHGKkhwCgs9dgBB2g== + +universalify@^0.1.0, universalify@^0.1.2: + version "0.1.2" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" + integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== + +unpipe@1.0.0, unpipe@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" + integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= + +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== + +uri-js@^4.2.2: + version "4.4.1" + resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" + integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== + dependencies: + punycode "^2.1.0" + +url-parse-lax@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" + integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= + dependencies: + prepend-http "^1.0.1" + +url-parse-lax@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" + integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= + dependencies: + prepend-http "^2.0.0" + +url-set-query@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" + integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk= + +url-to-options@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" + integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= + +utf-8-validate@^5.0.2: + version "5.0.5" + resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.5.tgz#dd32c2e82c72002dc9f02eb67ba6761f43456ca1" + integrity sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ== + dependencies: + node-gyp-build "^4.2.0" + +utf8@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" + integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== + +util-deprecate@^1.0.1, util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= + +util.promisify@^1.0.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.1.1.tgz#77832f57ced2c9478174149cae9b96e9918cd54b" + integrity sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw== + dependencies: + call-bind "^1.0.0" + define-properties "^1.1.3" + for-each "^0.3.3" + has-symbols "^1.0.1" + object.getownpropertydescriptors "^2.1.1" + +util@^0.12.0: + version "0.12.4" + resolved "https://registry.yarnpkg.com/util/-/util-0.12.4.tgz#66121a31420df8f01ca0c464be15dfa1d1850253" + integrity sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw== + dependencies: + inherits "^2.0.3" + is-arguments "^1.0.4" + is-generator-function "^1.0.7" + is-typed-array "^1.1.3" + safe-buffer "^5.1.2" + which-typed-array "^1.1.2" + +utils-merge@1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" + integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= + +uuid@3.3.2: + version "3.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" + integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== + +uuid@^3.3.2, uuid@^3.3.3: + version "3.4.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" + integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== + +v8-compile-cache@^2.0.3: + version "2.3.0" + resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" + integrity sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA== + +validate-npm-package-license@^3.0.1: + version "3.0.4" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" + integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== + dependencies: + spdx-correct "^3.0.0" + spdx-expression-parse "^3.0.0" + +varint@^5.0.0: + version "5.0.2" + resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" + integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== + +vary@^1, vary@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" + integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= + +verror@1.10.0: + version "1.10.0" + resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" + integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= + dependencies: + assert-plus "^1.0.0" + core-util-is "1.0.2" + extsprintf "^1.2.0" + +w3c-hr-time@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz#0a89cdf5cc15822df9c360543676963e0cc308cd" + integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== + dependencies: + browser-process-hrtime "^1.0.0" + +w3c-xmlserializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" + integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== + dependencies: + xml-name-validator "^3.0.0" + +web3-bzz@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.5.1.tgz#e7f3cab584cfa363d1cf42457e2ece13f9e75617" + integrity sha512-Xi3H1PFHZ7d8FJypEuQzOA7y1O00lSgAQxFyMgSyP4RKq+kLxpb7Z4lRxZ4N7EXVdKmS0S23iDAPa1GCnyJJpQ== + dependencies: + "@types/node" "^12.12.6" + got "9.6.0" + swarm-js "^0.1.40" + +web3-core-helpers@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.5.1.tgz#bfb656e33f4b296c654688764385c0b2606237cf" + integrity sha512-7K4hykJLMaUEtVztPhQ9JDNjMPwDynky15nqCaph/ozOU9q57BaCJJorhmpRrh1bM9Rx6dJz4nGruE4KfZbk0w== + dependencies: + web3-eth-iban "1.5.1" + web3-utils "1.5.1" + +web3-core-method@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.5.1.tgz#ab27efd53e0cedfde8e4ae69bb664a24247695f3" + integrity sha512-qNGmI/nRywpV4aRQPm1JqdE9fGtvJE3YOTcS+Ju7FVA3HT+/z0wwhjMwcVkkDeFryB6rGdKtUfnLvwm0O1/66A== + dependencies: + "@ethereumjs/common" "^2.4.0" + "@ethersproject/transactions" "^5.0.0-beta.135" + web3-core-helpers "1.5.1" + web3-core-promievent "1.5.1" + web3-core-subscriptions "1.5.1" + web3-utils "1.5.1" + +web3-core-promievent@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.5.1.tgz#4edc19a37d84fc63e18b27dcaa817342c3d23e87" + integrity sha512-IElKxtZaUS3+T9TXO6mz1SUaEwOt9D3ng2B8HtPA1gcJ6bC4gIIE9g52CDVT2hgtC9QHX2hsvvEVvFJC4IMvJQ== + dependencies: + eventemitter3 "4.0.4" + +web3-core-requestmanager@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.5.1.tgz#00b6c0740f5ce41f0bf069ee7b8acef7b11e7a4c" + integrity sha512-AniBbDmcsm4somBkUQvAk7p3wzKYsea9ZP8oj4S34bYauVW0CFGiOyS9yRNmSwj36NVbwtYL3npVoc4+W8Lusg== + dependencies: + util "^0.12.0" + web3-core-helpers "1.5.1" + web3-providers-http "1.5.1" + web3-providers-ipc "1.5.1" + web3-providers-ws "1.5.1" + +web3-core-subscriptions@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.5.1.tgz#bceff03c05350bfc3df22da1c68cbb5a3a94b831" + integrity sha512-CYinu+uU6DI938Tk13N7o1cJQpUHCU74AWIYVN9x5dJ1m1L+yxpuQ3cmDxuXsTMKAJGcj+ok+sk9zmpsNLq66w== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.5.1" + +web3-core@1.5.1, web3-core@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.5.1.tgz#df511e6bbae5aac18561aa5c64aa68fb16eef608" + integrity sha512-k+X1yDnoVmbTHTcACZfpC+dkZTVt/+Lr6N8a3Y/6CXM8d7Oq9APfin4ZlU8kRE4DMMQsWJSU2tdBzQfxtmwXkA== + dependencies: + "@types/bn.js" "^4.11.5" + "@types/node" "^12.12.6" + bignumber.js "^9.0.0" + web3-core-helpers "1.5.1" + web3-core-method "1.5.1" + web3-core-requestmanager "1.5.1" + web3-utils "1.5.1" + +web3-eth-abi@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.5.1.tgz#9e8f108db9025ce0611c19fb2777f7d49148cf51" + integrity sha512-D+WjeVYW8mxL0GpuJVWc8FLfmHMaiJQesu2Lagx/Ul9A+VxnXrjGIzve/QY+YIINKrljUE1KiN0OV6EyLAd5Hw== + dependencies: + "@ethersproject/abi" "5.0.7" + web3-utils "1.5.1" + +web3-eth-accounts@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.5.1.tgz#1beb1d66dead8a9008c4e14e50e1ad1ba4498554" + integrity sha512-TuHdMKHMfIWVEF18dvuS8VmgMRasGylTwjVlrxQm1aVoZ7g9PKNJY5fCUKq8ymj8na/YzCE4iYZr/CylGchzWg== + dependencies: + "@ethereumjs/common" "^2.3.0" + "@ethereumjs/tx" "^3.2.1" + crypto-browserify "3.12.0" + eth-lib "0.2.8" + ethereumjs-util "^7.0.10" + scrypt-js "^3.0.1" + uuid "3.3.2" + web3-core "1.5.1" + web3-core-helpers "1.5.1" + web3-core-method "1.5.1" + web3-utils "1.5.1" + +web3-eth-contract@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.5.1.tgz#4c59abe3e575920e83e8f8c1bc0bf8a18f975623" + integrity sha512-LRzFnogxeZagxHVpJ9cDK5Y8oQFUNtNL8s5w4IjvZ/JDoBQXPJuwhySwjftL3Hlk3znziMFqAH6snoxjvHnoag== + dependencies: + "@types/bn.js" "^4.11.5" + web3-core "1.5.1" + web3-core-helpers "1.5.1" + web3-core-method "1.5.1" + web3-core-promievent "1.5.1" + web3-core-subscriptions "1.5.1" + web3-eth-abi "1.5.1" + web3-utils "1.5.1" + +web3-eth-ens@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.5.1.tgz#bedc65487835d3ca43a18ca573627d764492e554" + integrity sha512-SFK1HpXAiBWlsAuuia8G02MCJfaE16NZkOL7lpVhOvXmJeSDUxQLI8+PKSKJvP3+yyTKhnyYDu5B5TGEZDCVtg== + dependencies: + content-hash "^2.5.2" + eth-ens-namehash "2.0.8" + web3-core "1.5.1" + web3-core-helpers "1.5.1" + web3-core-promievent "1.5.1" + web3-eth-abi "1.5.1" + web3-eth-contract "1.5.1" + web3-utils "1.5.1" + +web3-eth-iban@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.5.1.tgz#5a8313506bc8bf92511659ae6c0cb29fbf3161a4" + integrity sha512-jPM0L11A8AhywTwpKfbrFYW4lT7+bZ3Jcuy2xw2K2QH/1WjK07OKBAu9rLFnAwRyHO/rDqje3xDf3+jcfA4Yvw== + dependencies: + bn.js "^4.11.9" + web3-utils "1.5.1" + +web3-eth-personal@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.5.1.tgz#0202dac4cf4b58648942bc930eb9631e83fec421" + integrity sha512-8mTvRSabsYvYZYRKR9a2lNZNyLE8fnTFLnWhdbgB8Mgp+vAxMvgzUYdR+zHRezkuSxQwRjAexKqo/Do3nK05XQ== + dependencies: + "@types/node" "^12.12.6" + web3-core "1.5.1" + web3-core-helpers "1.5.1" + web3-core-method "1.5.1" + web3-net "1.5.1" + web3-utils "1.5.1" + +web3-eth@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.5.1.tgz#2b9ef9427b46cc864d967e619e8020c130b2112f" + integrity sha512-mkYWc5nQwNpweW6FY7ZCfQEB09/Z8Cu+MmDFVPSwdYAAs838LoF+/+1QIqGSP4qBePPwGN225p3ic58LF9QZEA== + dependencies: + web3-core "1.5.1" + web3-core-helpers "1.5.1" + web3-core-method "1.5.1" + web3-core-subscriptions "1.5.1" + web3-eth-abi "1.5.1" + web3-eth-accounts "1.5.1" + web3-eth-contract "1.5.1" + web3-eth-ens "1.5.1" + web3-eth-iban "1.5.1" + web3-eth-personal "1.5.1" + web3-net "1.5.1" + web3-utils "1.5.1" + +web3-net@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.5.1.tgz#eff1e735874d9106449b30f890d8d8ab56cd5ac9" + integrity sha512-4R5Lb+1QnlrxcL9ex0se/MZcogZ8tMdVd9LPB1mEaIyszTwaEESn2LvPi9WbLrpqxrxwoaj2CNpmxdGyh/gG/g== + dependencies: + web3-core "1.5.1" + web3-core-method "1.5.1" + web3-utils "1.5.1" + +web3-providers-http@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.5.1.tgz#ddf2038d0308775c02cc4fa5e4e6c817b1ffead9" + integrity sha512-EJetb+XA+fv2Fvl/2+t0DtgL6Fk8+BAcKxSRh+RcgFO83C1xWtKFTLPaTphHylmc1xo9eNtf3DCzLoxljGu4lw== + dependencies: + web3-core-helpers "1.5.1" + xhr2-cookies "1.1.0" + +web3-providers-ipc@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.5.1.tgz#3667116d58ae1d124b187e154e4d400e4e5e4056" + integrity sha512-NHuyHE3HAuuzb3sEE02zgvA+XTaM0CN9IMbW8U4Bi3tk5/dk1ve4DgsoRA71/NhU2M5Q0BigV0tscZ6jnjVF0Q== + dependencies: + oboe "2.1.5" + web3-core-helpers "1.5.1" + +web3-providers-ws@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.5.1.tgz#7bad480704edc519a3e10c8045db7fdea85e0865" + integrity sha512-sCnznbJ6lp+dxMBhL9Ksj7+cmD8w+MIqEs3UWpfcJxxx1jLiO6VOIPBoQ2+NNb1L37m3TcLv/pAIf7dDDCGnJg== + dependencies: + eventemitter3 "4.0.4" + web3-core-helpers "1.5.1" + websocket "^1.0.32" + +web3-shh@1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.5.1.tgz#ed3fe688d381afd2c9a14096716d7e1bd8e5f90d" + integrity sha512-lu2N5YkffVYBEmMAqoNqRCecBzFXPXEc13meVrS0L0/qLRtwDyZ1nm2x/fYO50bAtw5gLj2AZ6tBe57X9pzvhg== + dependencies: + web3-core "1.5.1" + web3-core-method "1.5.1" + web3-core-subscriptions "1.5.1" + web3-net "1.5.1" + +web3-utils@1.5.1, web3-utils@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.5.1.tgz#d82087b43c0c0777dec5c44d375afcf1424417f4" + integrity sha512-U8ULaMBwjkp9Rn+kRLjUmgAUHwPqDrM5/Q9tPKgvuDKtMWUggTLC33/KF8RY+PyAhSAlnD+lmNGfZnbjmVKBxQ== + dependencies: + bn.js "^4.11.9" + eth-lib "0.2.8" + ethereum-bloom-filters "^1.0.6" + ethjs-unit "0.1.6" + number-to-bn "1.7.0" + randombytes "^2.1.0" + utf8 "3.0.0" + +web3@^1.3.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/web3/-/web3-1.5.1.tgz#a69d8913a57f6fcbe13daf15412f83224eb3002e" + integrity sha512-qoXFBcnannngLR/BOgDvRcR1HxeG+fZPXaB2nle9xFUCdT7FjSBQcFG6LxZy+M2vHId7ONlbqSPLd2BbVLWVgA== + dependencies: + web3-bzz "1.5.1" + web3-core "1.5.1" + web3-eth "1.5.1" + web3-eth-personal "1.5.1" + web3-net "1.5.1" + web3-shh "1.5.1" + web3-utils "1.5.1" + +webidl-conversions@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" + integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== + +webidl-conversions@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" + integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== + +websocket@^1.0.32, websocket@^1.0.34: + version "1.0.34" + resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" + integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== + dependencies: + bufferutil "^4.0.1" + debug "^2.2.0" + es5-ext "^0.10.50" + typedarray-to-buffer "^3.1.5" + utf-8-validate "^5.0.2" + yaeti "^0.0.6" + +whatwg-encoding@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0" + integrity sha512-b5lim54JOPN9HtzvK9HFXvBma/rnfFeqsic0hSpjtDbVxR3dJKLc+KB4V6GgiGOvl7CY/KNh8rxSo9DKQrnUEw== + dependencies: + iconv-lite "0.4.24" + +whatwg-mimetype@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf" + integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g== + +whatwg-url@^8.0.0, whatwg-url@^8.5.0: + version "8.7.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" + integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== + dependencies: + lodash "^4.7.0" + tr46 "^2.1.0" + webidl-conversions "^6.1.0" + +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-module@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" + integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= + +which-typed-array@^1.1.2: + version "1.1.6" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.6.tgz#f3713d801da0720a7f26f50c596980a9f5c8b383" + integrity sha512-DdY984dGD5sQ7Tf+x1CkXzdg85b9uEel6nr4UkFg1LoE9OXv3uRuZhe5CoWdawhGACeFpEZXH8fFLQnDhbpm/Q== + dependencies: + available-typed-arrays "^1.0.4" + call-bind "^1.0.2" + es-abstract "^1.18.5" + foreach "^2.0.5" + has-tostringtag "^1.0.0" + is-typed-array "^1.1.6" + +which@1.3.1, which@^1.2.9: + version "1.3.1" + resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" + integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== + dependencies: + isexe "^2.0.0" + +which@2.0.2, which@^2.0.1: + version "2.0.2" + resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" + integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== + dependencies: + isexe "^2.0.0" + +wide-align@1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" + integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== + dependencies: + string-width "^1.0.2 || 2" + +word-wrap@^1.2.3, word-wrap@~1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" + integrity sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + +workerpool@6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" + integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== + +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrap-ansi@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" + integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +write-file-atomic@^3.0.0: + version "3.0.3" + resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-3.0.3.tgz#56bd5c5a5c70481cd19c571bd39ab965a5de56e8" + integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== + dependencies: + imurmurhash "^0.1.4" + is-typedarray "^1.0.0" + signal-exit "^3.0.2" + typedarray-to-buffer "^3.1.5" + +ws@7.4.6: + version "7.4.6" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.4.6.tgz#5654ca8ecdeee47c33a9a4bf6d28e2be2980377c" + integrity sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A== + +ws@^3.0.0: + version "3.3.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" + integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== + dependencies: + async-limiter "~1.0.0" + safe-buffer "~5.1.0" + ultron "~1.1.0" + +ws@^7.4.6: + version "7.5.3" + resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.3.tgz#160835b63c7d97bfab418fc1b8a9fced2ac01a74" + integrity sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg== + +xhr-request-promise@^0.1.2: + version "0.1.3" + resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" + integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== + dependencies: + xhr-request "^1.1.0" + +xhr-request@^1.0.1, xhr-request@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" + integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== + dependencies: + buffer-to-arraybuffer "^0.0.5" + object-assign "^4.1.1" + query-string "^5.0.1" + simple-get "^2.7.0" + timed-out "^4.0.1" + url-set-query "^1.0.0" + xhr "^2.0.4" + +xhr2-cookies@1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz#7d77449d0999197f155cb73b23df72505ed89d48" + integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg= + dependencies: + cookiejar "^2.1.1" + +xhr@^2.0.4, xhr@^2.3.3: + version "2.6.0" + resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" + integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== + dependencies: + global "~4.4.0" + is-function "^1.0.1" + parse-headers "^2.0.0" + xtend "^4.0.0" + +xml-name-validator@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a" + integrity sha512-A5CUptxDsvxKJEU3yO6DuWBSJz/qizqzJKOMIfUJHETbBw/sFaDxgd6fxm1ewUaM0jZ444Fc5vC5ROYurg/4Pw== + +xmlchars@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/xmlchars/-/xmlchars-2.2.0.tgz#060fe1bcb7f9c76fe2a17db86a9bc3ab894210cb" + integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== + +xtend@^4.0.0, xtend@^4.0.1, xtend@^4.0.2, xtend@~4.0.0, xtend@~4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" + integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== + +xxhashjs@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/xxhashjs/-/xxhashjs-0.2.2.tgz#8a6251567621a1c46a5ae204da0249c7f8caa9d8" + integrity sha512-AkTuIuVTET12tpsVIQo+ZU6f/qDmKuRUcjaqR+OIvm+aCBsZ95i7UVY5WJ9TMsSaZ0DA2WxoZ4acu0sPH+OKAw== + dependencies: + cuint "^0.2.2" + +y18n@^4.0.0: + version "4.0.3" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-4.0.3.tgz#b5f259c82cd6e336921efd7bfd8bf560de9eeedf" + integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== + +y18n@^5.0.5: + version "5.0.8" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" + integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== + +yaeti@^0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" + integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= + +yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" + integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + +yargs-parser@13.1.2, yargs-parser@^13.1.0, yargs-parser@^13.1.2: + version "13.1.2" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.2.tgz#130f09702ebaeef2650d54ce6e3e5706f7a4fb38" + integrity sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@20.2.4: + version "20.2.4" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" + integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== + +yargs-parser@^18.1.2: + version "18.1.3" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-18.1.3.tgz#be68c4975c6b2abf469236b0c870362fab09a7b0" + integrity sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^20.2.2: + version "20.2.9" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" + integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== + +yargs-unparser@1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-1.6.0.tgz#ef25c2c769ff6bd09e4b0f9d7c605fb27846ea9f" + integrity sha512-W9tKgmSn0DpSatfri0nx52Joq5hVXgeLiqR/5G0sZNDoLZFOr/xjBUDcShCOGNsBnEMNo1KAMBkTej1Hm62HTw== + dependencies: + flat "^4.1.0" + lodash "^4.17.15" + yargs "^13.3.0" + +yargs-unparser@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" + integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== + dependencies: + camelcase "^6.0.0" + decamelize "^4.0.0" + flat "^5.0.2" + is-plain-obj "^2.1.0" + +yargs@13.2.4: + version "13.2.4" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.2.4.tgz#0b562b794016eb9651b98bd37acf364aa5d6dc83" + integrity sha512-HG/DWAJa1PAnHT9JAhNa8AbAv3FPaiLzioSjCcmuXXhP8MlpHO5vwls4g4j6n30Z74GVQj8Xa62dWVx1QCGklg== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + os-locale "^3.1.0" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.0" + +yargs@13.3.2, yargs@^13.3.0: + version "13.3.2" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd" + integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw== + dependencies: + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^3.0.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^13.1.2" + +yargs@16.2.0, yargs@^16.1.0: + version "16.2.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" + integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== + dependencies: + cliui "^7.0.2" + escalade "^3.1.1" + get-caller-file "^2.0.5" + require-directory "^2.1.1" + string-width "^4.2.0" + y18n "^5.0.5" + yargs-parser "^20.2.2" + +yargs@^15.0.2: + version "15.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" + integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== + dependencies: + cliui "^6.0.0" + decamelize "^1.2.0" + find-up "^4.1.0" + get-caller-file "^2.0.1" + require-directory "^2.1.1" + require-main-filename "^2.0.0" + set-blocking "^2.0.0" + string-width "^4.2.0" + which-module "^2.0.0" + y18n "^4.0.0" + yargs-parser "^18.1.2" + +yn@3.1.1: + version "3.1.1" + resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" + integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yn@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" + integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= + +yocto-queue@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" + integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/packages/commonwealth/client/scripts/controllers/chain/ethereum/aave/adapter.ts b/packages/commonwealth/client/scripts/controllers/chain/ethereum/aave/adapter.ts index 96ea47da320..1985826909b 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/ethereum/aave/adapter.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/ethereum/aave/adapter.ts @@ -9,7 +9,7 @@ import ChainEntityController from 'controllers/server/chain_entities'; import { IApp } from 'state'; import { notifyError } from 'controllers/app/notifications'; -import { AaveTypes } from '@commonwealth/chain-events'; +import { AaveTypes } from 'chain-events/src'; import AaveChain from './chain'; import AaveGovernance from './governance'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/ethereum/aave/governance.ts b/packages/commonwealth/client/scripts/controllers/chain/ethereum/aave/governance.ts index 518b632d866..a57210bd3a5 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/ethereum/aave/governance.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/ethereum/aave/governance.ts @@ -1,7 +1,7 @@ import { ProposalModule, ITXModalData } from 'models'; import { IApp } from 'state'; import { IAaveProposalResponse } from 'adapters/chain/aave/types'; -import { AaveEvents, AaveTypes } from '@commonwealth/chain-events'; +import { AaveEvents, AaveTypes } from 'chain-events/src'; import { Executor } from 'common-common/src/eth/types'; import { chainToEventNetwork, EntityRefreshOption } from 'controllers/server/chain_entities'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/ethereum/aave/proposal.ts b/packages/commonwealth/client/scripts/controllers/chain/ethereum/aave/proposal.ts index 273d6736730..996580ea4f8 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/ethereum/aave/proposal.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/ethereum/aave/proposal.ts @@ -3,7 +3,7 @@ import BN from 'bn.js'; import Web3 from 'web3'; import $ from 'jquery'; import bs58 from 'bs58'; -import { AaveTypes } from '@commonwealth/chain-events'; +import { AaveTypes } from 'chain-events/src'; import { ProposalType } from 'common-common/src/types'; import { EthereumCoin } from 'adapters/chain/ethereum/types'; import { IAaveProposalResponse } from 'adapters/chain/aave/types'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/ethereum/commonwealth/governance.ts b/packages/commonwealth/client/scripts/controllers/chain/ethereum/commonwealth/governance.ts index 9b0caf942c3..0768b65c93f 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/ethereum/commonwealth/governance.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/ethereum/commonwealth/governance.ts @@ -7,7 +7,7 @@ import { ERC20Token, EthereumCoin } from 'adapters/chain/ethereum/types'; // import { ICommonwealthProposalResponse } from 'adapters/chain/moloch/types'; import { EntityRefreshOption } from 'controllers/server/chain_entities'; -// import { CommonwealthEvents } from '@commonwealth/chain-events'; +// import { CommonwealthEvents } from 'chain-events/src'; import { IApp } from 'state'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/ethereum/compound/adapter.ts b/packages/commonwealth/client/scripts/controllers/chain/ethereum/compound/adapter.ts index 3915461c2ba..e266d831c4a 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/ethereum/compound/adapter.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/ethereum/compound/adapter.ts @@ -1,4 +1,4 @@ -// import { CompoundTypes } from '@commonwealth/chain-events'; +// import { CompoundTypes } from 'chain-events/src'; import { EthereumCoin } from 'adapters/chain/ethereum/types'; import EthereumAccount from 'controllers/chain/ethereum/account'; @@ -10,7 +10,7 @@ import ChainEntityController from 'controllers/server/chain_entities'; import { IApp } from 'state'; import { notifyError } from 'controllers/app/notifications'; -import { CompoundTypes } from '@commonwealth/chain-events'; +import { CompoundTypes } from 'chain-events/src'; import CompoundChain from './chain'; import CompoundGovernance from './governance'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/ethereum/compound/governance.ts b/packages/commonwealth/client/scripts/controllers/chain/ethereum/compound/governance.ts index b37a3556012..ce214c37652 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/ethereum/compound/governance.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/ethereum/compound/governance.ts @@ -1,7 +1,7 @@ import BN from 'bn.js'; import { ProposalModule, ITXModalData } from 'models'; import { ICompoundProposalResponse } from 'adapters/chain/compound/types'; -import { CompoundEvents, CompoundTypes } from '@commonwealth/chain-events'; +import { CompoundEvents, CompoundTypes } from 'chain-events/src'; import { IApp } from 'state'; import { chainToEventNetwork, EntityRefreshOption } from 'controllers/server/chain_entities'; import { BigNumber, BigNumberish, ContractTransaction } from 'ethers'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/ethereum/compound/proposal.ts b/packages/commonwealth/client/scripts/controllers/chain/ethereum/compound/proposal.ts index 449e3040417..2ed30e51a07 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/ethereum/compound/proposal.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/ethereum/compound/proposal.ts @@ -4,7 +4,7 @@ import { capitalize } from 'lodash'; import { ContractTransaction, utils } from 'ethers'; import { GovernorCompatibilityBravo, GovernorMock, GovernorMock__factory } from 'common-common/src/eth/types'; -import { CompoundTypes } from '@commonwealth/chain-events'; +import { CompoundTypes } from 'chain-events/src'; import { ProposalType } from 'common-common/src/types'; import { EthereumCoin } from 'adapters/chain/ethereum/types'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/ethereum/moloch/governance.ts b/packages/commonwealth/client/scripts/controllers/chain/ethereum/moloch/governance.ts index 4d4f4cfaa4a..573485ec37b 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/ethereum/moloch/governance.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/ethereum/moloch/governance.ts @@ -7,7 +7,7 @@ import { ERC20Token, EthereumCoin } from 'adapters/chain/ethereum/types'; import { IMolochProposalResponse } from 'adapters/chain/moloch/types'; import { chainToEventNetwork, EntityRefreshOption } from 'controllers/server/chain_entities'; -import { MolochEvents } from '@commonwealth/chain-events'; +import { MolochEvents } from 'chain-events/src'; import { IApp } from 'state'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/ethereum/moloch/proposal.ts b/packages/commonwealth/client/scripts/controllers/chain/ethereum/moloch/proposal.ts index d05846f2587..a3e69a926d8 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/ethereum/moloch/proposal.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/ethereum/moloch/proposal.ts @@ -3,7 +3,7 @@ import moment from 'moment'; import { MolochShares, EthereumCoin } from 'adapters/chain/ethereum/types'; import { IMolochProposalResponse } from 'adapters/chain/moloch/types'; -import { MolochTypes } from '@commonwealth/chain-events'; +import { MolochTypes } from 'chain-events/src'; import { ProposalType } from 'common-common/src/types'; import { diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/bounty.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/bounty.ts index d303b871ce1..c4cba6370d1 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/bounty.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/bounty.ts @@ -7,7 +7,7 @@ import { VotingType, VotingUnit, ChainEntity, ChainEvent, } from 'models'; import { ProposalType } from 'common-common/src/types'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import SubstrateChain from './shared'; import SubstrateAccounts, { SubstrateAccount } from './account'; import SubstrateBountyTreasury from './bountyTreasury'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/bountyTreasury.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/bountyTreasury.ts index b92dffbd62c..3de1a6886a9 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/bountyTreasury.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/bountyTreasury.ts @@ -6,7 +6,7 @@ import { SubstrateCoin } from 'adapters/chain/substrate/types'; import { ProposalModule } from 'models'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import SubstrateChain from './shared'; import SubstrateAccounts, { SubstrateAccount } from './account'; import { SubstrateBounty } from './bounty'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/collective.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/collective.ts index 3284012f101..5dab8ec91fd 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/collective.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/collective.ts @@ -2,7 +2,7 @@ import { ApiPromise } from '@polkadot/api'; import { Call, AccountId } from '@polkadot/types/interfaces'; import { Vec } from '@polkadot/types'; import { ISubstrateCollectiveProposal } from 'adapters/chain/substrate/types'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import { ProposalModule } from 'models'; import { IApp } from 'state'; import SubstrateChain from './shared'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/collective_proposal.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/collective_proposal.ts index c96d3bd2698..c67c19ddf3d 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/collective_proposal.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/collective_proposal.ts @@ -1,6 +1,6 @@ import _ from 'underscore'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import { ApiPromise } from '@polkadot/api'; import { Votes } from '@polkadot/types/interfaces'; import { Option } from '@polkadot/types'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy.ts index 5042a7f8021..6bc6fdd83e6 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy.ts @@ -2,7 +2,7 @@ import { ApiPromise } from '@polkadot/api'; import { BlockNumber } from '@polkadot/types/interfaces'; import { ISubstrateDemocracyReferendum, SubstrateCoin } from 'adapters/chain/substrate/types'; import { ITXModalData, ProposalModule } from 'models'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import { IApp } from 'state'; import SubstrateChain from './shared'; import SubstrateAccounts, { SubstrateAccount } from './account'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy_proposal.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy_proposal.ts index 72dfa922a01..004f911877b 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy_proposal.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy_proposal.ts @@ -1,7 +1,7 @@ import _ from 'underscore'; import BN from 'bn.js'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import { ApiPromise } from '@polkadot/api'; import { Vec } from '@polkadot/types'; import { ITuple } from '@polkadot/types/types'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy_proposals.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy_proposals.ts index 242e58c911c..263f3d88985 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy_proposals.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy_proposals.ts @@ -1,7 +1,7 @@ import { BlockNumber, Call, Balance, VoteThreshold, Hash } from '@polkadot/types/interfaces'; import { ApiPromise } from '@polkadot/api'; import { ISubstrateDemocracyProposal, SubstrateCoin } from 'adapters/chain/substrate/types'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import { ProposalModule } from 'models'; import { IApp } from 'state'; import SubstrateChain from './shared'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy_referendum.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy_referendum.ts index 47ec0e3bd7b..8e0a4964ce2 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy_referendum.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/democracy_referendum.ts @@ -12,7 +12,7 @@ import { Proposal, ProposalStatus, ProposalEndTime, BinaryVote, VotingType, VotingUnit, Account, ChainEntity, ChainEvent } from 'models'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import { Coin } from 'adapters/currency'; import SubstrateChain from './shared'; import SubstrateAccounts, { SubstrateAccount } from './account'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/shared.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/shared.ts index 22db5fad21c..0417b458d6e 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/shared.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/shared.ts @@ -29,7 +29,7 @@ import { ITXData, } from 'models'; -import { SubstrateEvents } from '@commonwealth/chain-events'; +import { SubstrateEvents } from 'chain-events/src'; import { EventEmitter } from 'events'; import { notifySuccess, notifyError, notifyInfo } from 'controllers/app/notifications'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury.ts index 1e5016bdaa0..eb7aec34238 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury.ts @@ -7,7 +7,7 @@ import { SubstrateCoin } from 'adapters/chain/substrate/types'; import { ProposalModule } from 'models'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import SubstrateChain from './shared'; import SubstrateAccounts, { SubstrateAccount } from './account'; import { formatAddressShort } from '../../../../../shared/utils'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury_proposal.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury_proposal.ts index d8c25bfa588..9ecffdcf84f 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury_proposal.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury_proposal.ts @@ -6,7 +6,7 @@ import { VotingType, VotingUnit, ChainEntity, ChainEvent } from 'models'; import { ProposalType } from 'common-common/src/types'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import { chainEntityTypeToProposalSlug } from 'identifiers'; import SubstrateChain from './shared'; import SubstrateAccounts, { SubstrateAccount } from './account'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury_tip.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury_tip.ts index 23ee54bbe59..237e4ef87be 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury_tip.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury_tip.ts @@ -5,7 +5,7 @@ import { Proposal, ProposalStatus, ProposalEndTime, ITXModalData, VotingType, VotingUnit, ChainEntity, ChainEvent, DepositVote, } from 'models'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import { chainEntityTypeToProposalSlug } from 'identifiers'; import { ProposalType } from 'common-common/src/types'; import SubstrateChain from './shared'; diff --git a/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury_tips.ts b/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury_tips.ts index 5ee16f2ceb9..aee3e60bce9 100644 --- a/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury_tips.ts +++ b/packages/commonwealth/client/scripts/controllers/chain/substrate/treasury_tips.ts @@ -2,7 +2,7 @@ import { ApiPromise } from '@polkadot/api'; import { AccountId } from '@polkadot/types/interfaces'; import { Vec } from '@polkadot/types'; import { ISubstrateTreasuryTip, SubstrateCoin } from 'adapters/chain/substrate/types'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import { ProposalModule } from 'models'; import { IApp } from 'state'; import { formatAddressShort } from 'utils'; diff --git a/packages/commonwealth/client/scripts/controllers/server/chain_entities.ts b/packages/commonwealth/client/scripts/controllers/server/chain_entities.ts index e2f353243c6..6bcd938ea86 100644 --- a/packages/commonwealth/client/scripts/controllers/server/chain_entities.ts +++ b/packages/commonwealth/client/scripts/controllers/server/chain_entities.ts @@ -15,7 +15,7 @@ import { SubstrateTypes, IChainEntityKind, SupportedNetwork, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { notifyError } from '../app/notifications'; export enum EntityRefreshOption { diff --git a/packages/commonwealth/client/scripts/identifiers.ts b/packages/commonwealth/client/scripts/identifiers.ts index 3ffd9ffc37c..146391b5e6b 100644 --- a/packages/commonwealth/client/scripts/identifiers.ts +++ b/packages/commonwealth/client/scripts/identifiers.ts @@ -1,5 +1,5 @@ import { StorageModule, ProposalModule, ChainInfo } from 'models'; -import { SubstrateTypes, IChainEntityKind } from '@commonwealth/chain-events'; +import { SubstrateTypes, IChainEntityKind } from 'chain-events/src'; import { ProposalStore } from 'stores'; import { ProposalType, ChainBase, ChainNetwork } from 'common-common/src/types'; import { requiresTypeSlug } from 'utils'; diff --git a/packages/commonwealth/client/scripts/models/ChainEntity.ts b/packages/commonwealth/client/scripts/models/ChainEntity.ts index 40693d14e0d..e77f1d3780b 100644 --- a/packages/commonwealth/client/scripts/models/ChainEntity.ts +++ b/packages/commonwealth/client/scripts/models/ChainEntity.ts @@ -1,6 +1,6 @@ import moment from 'moment'; -import { IChainEntityKind } from '@commonwealth/chain-events'; +import { IChainEntityKind } from 'chain-events/src'; import ChainEvent from './ChainEvent'; class ChainEntity { diff --git a/packages/commonwealth/client/scripts/models/ChainEvent.ts b/packages/commonwealth/client/scripts/models/ChainEvent.ts index 25713f1d4bc..b25ddd67513 100644 --- a/packages/commonwealth/client/scripts/models/ChainEvent.ts +++ b/packages/commonwealth/client/scripts/models/ChainEvent.ts @@ -1,5 +1,5 @@ import _ from 'underscore'; -import { IChainEventData } from '@commonwealth/chain-events'; +import { IChainEventData } from 'chain-events/src'; import ChainEventType from './ChainEventType'; class ChainEvent { diff --git a/packages/commonwealth/client/scripts/models/ChainEventType.ts b/packages/commonwealth/client/scripts/models/ChainEventType.ts index 7cb825b6e9c..faea480eec3 100644 --- a/packages/commonwealth/client/scripts/models/ChainEventType.ts +++ b/packages/commonwealth/client/scripts/models/ChainEventType.ts @@ -1,4 +1,4 @@ -import { IChainEventKind, SupportedNetwork } from '@commonwealth/chain-events'; +import { IChainEventKind, SupportedNetwork } from 'chain-events/src'; class ChainEventType { public readonly id: string; diff --git a/packages/commonwealth/client/scripts/models/DashboardActivityNotification.ts b/packages/commonwealth/client/scripts/models/DashboardActivityNotification.ts index a1329bc8248..bed6fa53fa2 100644 --- a/packages/commonwealth/client/scripts/models/DashboardActivityNotification.ts +++ b/packages/commonwealth/client/scripts/models/DashboardActivityNotification.ts @@ -1,4 +1,4 @@ -import { IChainEventData, SupportedNetwork } from '@commonwealth/chain-events'; +import { IChainEventData, SupportedNetwork } from 'chain-events/src'; import { NodeInfo, Notification, diff --git a/packages/commonwealth/client/scripts/models/OffchainThread.ts b/packages/commonwealth/client/scripts/models/OffchainThread.ts index 42c58ae3dac..82e835b759c 100644 --- a/packages/commonwealth/client/scripts/models/OffchainThread.ts +++ b/packages/commonwealth/client/scripts/models/OffchainThread.ts @@ -3,7 +3,7 @@ import m from 'mithril'; import app from 'state'; import moment from 'moment'; import { ProposalType } from 'common-common/src/types'; -import { IChainEntityKind } from '@commonwealth/chain-events'; +import { IChainEntityKind } from 'chain-events/src'; import { IUniqueId } from './interfaces'; import { OffchainThreadKind, OffchainThreadStage } from './types'; import OffchainAttachment from './OffchainAttachment'; diff --git a/packages/commonwealth/client/scripts/stores/ChainEntityStore.ts b/packages/commonwealth/client/scripts/stores/ChainEntityStore.ts index 9f6abcc5ebb..9dbbe4cbfcd 100644 --- a/packages/commonwealth/client/scripts/stores/ChainEntityStore.ts +++ b/packages/commonwealth/client/scripts/stores/ChainEntityStore.ts @@ -1,4 +1,4 @@ -import { IChainEntityKind } from '@commonwealth/chain-events'; +import { IChainEntityKind } from 'chain-events/src'; import { ChainEntity } from '../models'; import Store from './Store'; diff --git a/packages/commonwealth/client/scripts/views/components/notification_row.ts b/packages/commonwealth/client/scripts/views/components/notification_row.ts index ee06b25a805..d609c3273d8 100644 --- a/packages/commonwealth/client/scripts/views/components/notification_row.ts +++ b/packages/commonwealth/client/scripts/views/components/notification_row.ts @@ -4,7 +4,7 @@ import { Spinner } from 'construct-ui'; import _ from 'lodash'; import m from 'mithril'; import moment from 'moment'; -import { CWEvent, Label as ChainEventLabel } from '@commonwealth/chain-events'; +import { CWEvent, Label as ChainEventLabel } from 'chain-events/src'; import app from 'state'; import { IPostNotificationData } from 'types'; diff --git a/packages/commonwealth/client/scripts/views/components/proposal_card/helpers.tsx b/packages/commonwealth/client/scripts/views/components/proposal_card/helpers.tsx index a014dabec5d..8e81b5703e9 100644 --- a/packages/commonwealth/client/scripts/views/components/proposal_card/helpers.tsx +++ b/packages/commonwealth/client/scripts/views/components/proposal_card/helpers.tsx @@ -3,7 +3,7 @@ // eslint-disable-next-line @typescript-eslint/no-unused-vars import m from 'mithril'; // required for getStatusText import moment from 'moment'; -import { AaveTypes, CompoundTypes } from '@commonwealth/chain-events'; +import { AaveTypes, CompoundTypes } from 'chain-events/src'; import 'components/proposal_card.scss'; diff --git a/packages/commonwealth/client/scripts/views/components/proposals/helpers.ts b/packages/commonwealth/client/scripts/views/components/proposals/helpers.ts index 7cfdb12f168..6b5a06f5019 100644 --- a/packages/commonwealth/client/scripts/views/components/proposals/helpers.ts +++ b/packages/commonwealth/client/scripts/views/components/proposals/helpers.ts @@ -16,7 +16,7 @@ import CompoundProposal, { CompoundProposalVote, } from 'controllers/chain/ethereum/compound/proposal'; import { notifyError } from 'controllers/app/notifications'; -import { CompoundTypes } from '@commonwealth/chain-events'; +import { CompoundTypes } from 'chain-events/src'; import NearSputnikProposal from 'controllers/chain/near/sputnik/proposal'; import { NearSputnikProposalStatus, diff --git a/packages/commonwealth/client/scripts/views/components/user_dashboard_row.ts b/packages/commonwealth/client/scripts/views/components/user_dashboard_row.ts index f93471b6bec..db2dd06b5b6 100644 --- a/packages/commonwealth/client/scripts/views/components/user_dashboard_row.ts +++ b/packages/commonwealth/client/scripts/views/components/user_dashboard_row.ts @@ -7,7 +7,7 @@ import { CWEvent, Label as ChainEventLabel, // CompoundEvents -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import moment from 'moment'; import app from 'state'; diff --git a/packages/commonwealth/package.json b/packages/commonwealth/package.json index 1f24fa6dec8..863622588a6 100644 --- a/packages/commonwealth/package.json +++ b/packages/commonwealth/package.json @@ -63,7 +63,6 @@ "@babel/polyfill": "^7.2.5", "@babel/preset-env": "^7.2.3", "@babel/register": "^7.4.0", - "@commonwealth/chain-events": "^0.13.3", "@cosmjs/amino": "^0.26.1", "@cosmjs/proto-signing": "^0.26.1", "@ethersproject/abi": "^5.0.1", diff --git a/packages/commonwealth/server.ts b/packages/commonwealth/server.ts index 623f8e0e916..47244db9d26 100644 --- a/packages/commonwealth/server.ts +++ b/packages/commonwealth/server.ts @@ -1,4 +1,4 @@ -import { SubstrateEvents } from '@commonwealth/chain-events'; +import { SubstrateEvents } from 'chain-events/src'; import session from 'express-session'; import express from 'express'; import webpack from 'webpack'; diff --git a/packages/commonwealth/server/eventHandlers/entityArchival.ts b/packages/commonwealth/server/eventHandlers/entityArchival.ts index f3b7ac81b71..ae73c29b8d1 100644 --- a/packages/commonwealth/server/eventHandlers/entityArchival.ts +++ b/packages/commonwealth/server/eventHandlers/entityArchival.ts @@ -11,7 +11,7 @@ import { IChainEntityKind, IChainEventData, SubstrateTypes, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { factory, addPrefix } from 'common-common/src/logging'; diff --git a/packages/commonwealth/server/eventHandlers/identity.ts b/packages/commonwealth/server/eventHandlers/identity.ts index e9eda927e41..af3381136c0 100644 --- a/packages/commonwealth/server/eventHandlers/identity.ts +++ b/packages/commonwealth/server/eventHandlers/identity.ts @@ -4,7 +4,7 @@ import { CWEvent, IChainEventData, SubstrateTypes, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { OffchainProfileInstance } from '../models/offchain_profile'; import { addPrefix, factory } from 'common-common/src/logging'; diff --git a/packages/commonwealth/server/eventHandlers/migration.ts b/packages/commonwealth/server/eventHandlers/migration.ts index 63e22fcf43a..eac761e7f1e 100644 --- a/packages/commonwealth/server/eventHandlers/migration.ts +++ b/packages/commonwealth/server/eventHandlers/migration.ts @@ -8,7 +8,7 @@ import { entityToFieldName, IChainEventData, EntityEventKind, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { WhereOptions } from 'sequelize'; import { DB } from '../database'; diff --git a/packages/commonwealth/server/eventHandlers/notifications.ts b/packages/commonwealth/server/eventHandlers/notifications.ts index 8efbd82640f..63199c99bef 100644 --- a/packages/commonwealth/server/eventHandlers/notifications.ts +++ b/packages/commonwealth/server/eventHandlers/notifications.ts @@ -6,7 +6,7 @@ import { IEventHandler, CWEvent, IChainEventKind, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { NotificationCategories } from 'common-common/src/types'; import { addPrefix, factory, formatFilename } from 'common-common/src/logging'; import { RabbitMQController } from '../util/rabbitmq/rabbitMQController'; diff --git a/packages/commonwealth/server/eventHandlers/profileCreation.ts b/packages/commonwealth/server/eventHandlers/profileCreation.ts index 050b29f64bb..dc36b54ea35 100644 --- a/packages/commonwealth/server/eventHandlers/profileCreation.ts +++ b/packages/commonwealth/server/eventHandlers/profileCreation.ts @@ -6,7 +6,7 @@ import { IEventHandler, CWEvent, SubstrateTypes, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import Sequelize from 'sequelize'; const Op = Sequelize.Op; diff --git a/packages/commonwealth/server/eventHandlers/rabbitMQ.ts b/packages/commonwealth/server/eventHandlers/rabbitMQ.ts index 5d0dfb298e8..7e9f3a991b1 100644 --- a/packages/commonwealth/server/eventHandlers/rabbitMQ.ts +++ b/packages/commonwealth/server/eventHandlers/rabbitMQ.ts @@ -1,4 +1,4 @@ -import { CWEvent, IEventHandler } from '@commonwealth/chain-events'; +import { CWEvent, IEventHandler } from 'chain-events/src'; import Rascal from 'rascal'; import { RabbitMQController } from '../util/rabbitmq/rabbitMQController'; diff --git a/packages/commonwealth/server/eventHandlers/storage.ts b/packages/commonwealth/server/eventHandlers/storage.ts index 5b7ee0025dc..29050e10d2c 100644 --- a/packages/commonwealth/server/eventHandlers/storage.ts +++ b/packages/commonwealth/server/eventHandlers/storage.ts @@ -7,7 +7,7 @@ import { IChainEventKind, SubstrateTypes, Erc20Types, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import Sequelize from 'sequelize'; import { addPrefix, factory, formatFilename } from 'common-common/src/logging'; const log = factory.getLogger(formatFilename(__filename)); diff --git a/packages/commonwealth/server/eventHandlers/userFlags.ts b/packages/commonwealth/server/eventHandlers/userFlags.ts index 62bcf57e56c..ff7ce0cd578 100644 --- a/packages/commonwealth/server/eventHandlers/userFlags.ts +++ b/packages/commonwealth/server/eventHandlers/userFlags.ts @@ -2,7 +2,7 @@ * Event handler that processes changes in validator and councillor sets * and updates user-related flags in the database accordingly. */ -import { IEventHandler, CWEvent, IChainEventKind, SubstrateTypes } from '@commonwealth/chain-events'; +import { IEventHandler, CWEvent, IChainEventKind, SubstrateTypes } from 'chain-events/src'; import Sequelize from 'sequelize'; const Op = Sequelize.Op; diff --git a/packages/commonwealth/server/models/offchain_profile.ts b/packages/commonwealth/server/models/offchain_profile.ts index 6477aa3ba18..9b14b54c128 100644 --- a/packages/commonwealth/server/models/offchain_profile.ts +++ b/packages/commonwealth/server/models/offchain_profile.ts @@ -1,7 +1,7 @@ import * as Sequelize from 'sequelize'; import { Model, DataTypes } from 'sequelize'; -import { SubstrateTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes } from 'chain-events/src'; import { AddressAttributes } from './address'; import { ModelStatic, ModelInstance } from './types'; diff --git a/packages/commonwealth/server/scripts/chainEventsConsumer.ts b/packages/commonwealth/server/scripts/chainEventsConsumer.ts index 44fb9b48268..36134591bd6 100644 --- a/packages/commonwealth/server/scripts/chainEventsConsumer.ts +++ b/packages/commonwealth/server/scripts/chainEventsConsumer.ts @@ -1,4 +1,4 @@ -import { SubstrateTypes, CWEvent } from '@commonwealth/chain-events'; +import { SubstrateTypes, CWEvent } from 'chain-events/src'; import * as WebSocket from 'ws'; import { BrokerConfig, SubscriberSessionAsPromised } from 'rascal'; import RabbitMQConfig from '../util/rabbitmq/RabbitMQConfig'; diff --git a/packages/commonwealth/server/scripts/dbNode.ts b/packages/commonwealth/server/scripts/dbNode.ts index ea9f8378e57..891c10690ca 100644 --- a/packages/commonwealth/server/scripts/dbNode.ts +++ b/packages/commonwealth/server/scripts/dbNode.ts @@ -11,7 +11,7 @@ import { CWEvent, LoggingHandler, SupportedNetwork, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { BrokerConfig } from 'rascal'; import { ChainBase, ChainNetwork, ChainType } from 'common-common/src/types'; diff --git a/packages/commonwealth/server/scripts/emails.ts b/packages/commonwealth/server/scripts/emails.ts index cd71934a71b..d810af06cce 100644 --- a/packages/commonwealth/server/scripts/emails.ts +++ b/packages/commonwealth/server/scripts/emails.ts @@ -3,7 +3,7 @@ import moment from 'moment'; import { capitalize } from 'lodash'; import { Label as ChainEventLabel, CWEvent, IEventLabel, SupportedNetwork, IChainEventData -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { factory, formatFilename } from 'common-common/src/logging'; import { NotificationCategories } from 'common-common/src/types'; diff --git a/packages/commonwealth/server/scripts/emitChainEvents.ts b/packages/commonwealth/server/scripts/emitChainEvents.ts index c8ee3191840..9e1d1d8098b 100644 --- a/packages/commonwealth/server/scripts/emitChainEvents.ts +++ b/packages/commonwealth/server/scripts/emitChainEvents.ts @@ -1,5 +1,5 @@ import fs from 'fs'; -import { IEventHandler, CWEvent } from '@commonwealth/chain-events'; +import { IEventHandler, CWEvent } from 'chain-events/src'; import { generateHandlers } from './setupChainEventListeners'; import { default as models, sequelize } from '../database'; diff --git a/packages/commonwealth/server/scripts/migrateChainEntities.ts b/packages/commonwealth/server/scripts/migrateChainEntities.ts index 6a148803fdb..bd391f3ebae 100644 --- a/packages/commonwealth/server/scripts/migrateChainEntities.ts +++ b/packages/commonwealth/server/scripts/migrateChainEntities.ts @@ -11,7 +11,7 @@ import { CompoundEvents, AaveEvents, IDisconnectedRange, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import models from '../database'; import MigrationHandler from '../eventHandlers/migration'; diff --git a/packages/commonwealth/server/scripts/migrateCouncillorValidatorFlags.ts b/packages/commonwealth/server/scripts/migrateCouncillorValidatorFlags.ts index e66e4c76cb3..f20863c02ff 100644 --- a/packages/commonwealth/server/scripts/migrateCouncillorValidatorFlags.ts +++ b/packages/commonwealth/server/scripts/migrateCouncillorValidatorFlags.ts @@ -3,7 +3,7 @@ */ import _ from 'underscore'; -import { SubstrateEvents } from '@commonwealth/chain-events'; +import { SubstrateEvents } from 'chain-events/src'; import { AccountId, Balance } from '@polkadot/types/interfaces'; import { Vec } from '@polkadot/types'; import { Codec } from '@polkadot/types/types'; diff --git a/packages/commonwealth/server/scripts/migrateIdentities.ts b/packages/commonwealth/server/scripts/migrateIdentities.ts index 59c70a09f70..89a5d32c0da 100644 --- a/packages/commonwealth/server/scripts/migrateIdentities.ts +++ b/packages/commonwealth/server/scripts/migrateIdentities.ts @@ -6,7 +6,7 @@ */ import _ from 'underscore'; -import { SubstrateEvents } from '@commonwealth/chain-events'; +import { SubstrateEvents } from 'chain-events/src'; import { OffchainProfileInstance } from '../models/offchain_profile'; import IdentityEventHandler from '../eventHandlers/identity'; import { ChainBase } from 'common-common/src/types'; diff --git a/packages/commonwealth/server/scripts/setupChainEventListeners.ts b/packages/commonwealth/server/scripts/setupChainEventListeners.ts index 5df36804f6a..3d9c5780a3a 100644 --- a/packages/commonwealth/server/scripts/setupChainEventListeners.ts +++ b/packages/commonwealth/server/scripts/setupChainEventListeners.ts @@ -10,7 +10,7 @@ import { MolochEvents, CompoundEvents, AaveEvents, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { ChainAttributes, ChainInstance } from '../models/chain'; import EventStorageHandler, { diff --git a/packages/commonwealth/server/util/identityFetchCache.ts b/packages/commonwealth/server/util/identityFetchCache.ts index cbc2fd617f1..b8febc1f67c 100644 --- a/packages/commonwealth/server/util/identityFetchCache.ts +++ b/packages/commonwealth/server/util/identityFetchCache.ts @@ -1,4 +1,4 @@ -import { SubstrateEvents } from '@commonwealth/chain-events'; +import { SubstrateEvents } from 'chain-events/src'; import JobRunner from 'common-common/src/cacheJobRunner'; import { factory, formatFilename } from 'common-common/src/logging'; import models from '../database'; diff --git a/packages/commonwealth/server/util/proposalIdToEntity.ts b/packages/commonwealth/server/util/proposalIdToEntity.ts index 79717e7cb5b..b2b05c68b30 100644 --- a/packages/commonwealth/server/util/proposalIdToEntity.ts +++ b/packages/commonwealth/server/util/proposalIdToEntity.ts @@ -1,5 +1,5 @@ import { ProposalType } from 'common-common/src/types'; -import { SubstrateTypes, MolochTypes, CompoundTypes, AaveTypes } from '@commonwealth/chain-events'; +import { SubstrateTypes, MolochTypes, CompoundTypes, AaveTypes } from 'chain-events/src'; // this function takes an "old style" identifier such as treasuryproposal_4 and attempts // fetch the corresponding chain entity from the database diff --git a/packages/commonwealth/server/webhookNotifier.ts b/packages/commonwealth/server/webhookNotifier.ts index eb63bb8eeea..8dc683099b2 100644 --- a/packages/commonwealth/server/webhookNotifier.ts +++ b/packages/commonwealth/server/webhookNotifier.ts @@ -1,7 +1,7 @@ import request from 'superagent'; import { Op } from 'sequelize'; import { capitalize } from 'lodash'; -import { Label as ChainEventLabel, CWEvent } from '@commonwealth/chain-events'; +import { Label as ChainEventLabel, CWEvent } from 'chain-events/src'; import { NotificationCategories } from 'common-common/src/types'; import { smartTrim, validURL, renderQuillDeltaToText } from '../shared/utils'; diff --git a/packages/commonwealth/shared/adapters/chain/aave/types.ts b/packages/commonwealth/shared/adapters/chain/aave/types.ts index d4f7fb0beb2..189adee2bc9 100644 --- a/packages/commonwealth/shared/adapters/chain/aave/types.ts +++ b/packages/commonwealth/shared/adapters/chain/aave/types.ts @@ -1,4 +1,4 @@ -import { AaveTypes } from '@commonwealth/chain-events'; +import { AaveTypes } from 'chain-events/src'; import { ICompletable } from '../../shared'; export type IAaveProposalResponse = Omit & ICompletable & { diff --git a/packages/commonwealth/shared/adapters/chain/compound/types.ts b/packages/commonwealth/shared/adapters/chain/compound/types.ts index 2f1b5c4c194..5abfb05316a 100644 --- a/packages/commonwealth/shared/adapters/chain/compound/types.ts +++ b/packages/commonwealth/shared/adapters/chain/compound/types.ts @@ -1,4 +1,4 @@ -import { CompoundTypes } from '@commonwealth/chain-events'; +import { CompoundTypes } from 'chain-events/src'; import { ICompletable } from '../../shared'; export type ICompoundProposalResponse = Omit< diff --git a/packages/commonwealth/test/tsconfig.node.json b/packages/commonwealth/test/tsconfig.node.json index 8a47e76609b..112fe974744 100644 --- a/packages/commonwealth/test/tsconfig.node.json +++ b/packages/commonwealth/test/tsconfig.node.json @@ -10,6 +10,8 @@ "paths": { "common-common": ["../../../packages/common-common"], "common-common/*": ["../../../packages/common-common/*"], + "chain-events": ["../../packages/chain-events"], + "chain-events/*": ["../../packages/chain-events/*"], "token-balance-cache": ["../../../packages/token-balance-cache"], "token-balance-cache/*": ["../../../packages/token-balance-cache/*"], "*": ["../*", "../shared/*", "../client/scripts/*"] diff --git a/packages/commonwealth/test/unit/events/entityArchivalHandler.spec.ts b/packages/commonwealth/test/unit/events/entityArchivalHandler.spec.ts index c987e7b606a..74182385efa 100644 --- a/packages/commonwealth/test/unit/events/entityArchivalHandler.spec.ts +++ b/packages/commonwealth/test/unit/events/entityArchivalHandler.spec.ts @@ -8,7 +8,7 @@ import { CWEvent, SubstrateTypes, SupportedNetwork, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { resetDatabase } from '../../../server-test'; import models from '../../../server/database'; diff --git a/packages/commonwealth/test/unit/events/identityHandler.spec.ts b/packages/commonwealth/test/unit/events/identityHandler.spec.ts index 8d720030b6c..7c48736dfa6 100644 --- a/packages/commonwealth/test/unit/events/identityHandler.spec.ts +++ b/packages/commonwealth/test/unit/events/identityHandler.spec.ts @@ -9,7 +9,7 @@ import { CWEvent, SubstrateTypes, SupportedNetwork, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import * as modelUtils from '../../util/modelUtils'; import { resetDatabase, getIdentityFetchCache } from '../../../server-test'; diff --git a/packages/commonwealth/test/unit/events/migrationHandler.spec.ts b/packages/commonwealth/test/unit/events/migrationHandler.spec.ts index 9f0cf1d244f..14a1efbf351 100644 --- a/packages/commonwealth/test/unit/events/migrationHandler.spec.ts +++ b/packages/commonwealth/test/unit/events/migrationHandler.spec.ts @@ -8,7 +8,7 @@ import { CWEvent, SubstrateTypes, SupportedNetwork, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { resetDatabase } from '../../../server-test'; import models from '../../../server/database'; diff --git a/packages/commonwealth/test/unit/events/notificationHandler.spec.ts b/packages/commonwealth/test/unit/events/notificationHandler.spec.ts index 2526e6d2f6a..b2a510d93bf 100644 --- a/packages/commonwealth/test/unit/events/notificationHandler.spec.ts +++ b/packages/commonwealth/test/unit/events/notificationHandler.spec.ts @@ -8,7 +8,7 @@ import { CWEvent, SubstrateTypes, SupportedNetwork, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { resetDatabase } from '../../../server-test'; import models from '../../../server/database'; diff --git a/packages/commonwealth/test/unit/events/rabbitmqProducer.spec.ts b/packages/commonwealth/test/unit/events/rabbitmqProducer.spec.ts index c2cccbb8ccd..3ac4dbf4b28 100644 --- a/packages/commonwealth/test/unit/events/rabbitmqProducer.spec.ts +++ b/packages/commonwealth/test/unit/events/rabbitmqProducer.spec.ts @@ -1,6 +1,6 @@ import { BrokerConfig } from 'rascal'; import { assert } from 'chai'; -import { CWEvent } from '@commonwealth/chain-events'; +import { CWEvent } from 'chain-events/src'; import { RabbitMqHandler } from '../../../server/eventHandlers/rabbitMQ'; import RabbitMQConfig from '../../../server/util/rabbitmq/RabbitMQConfig'; diff --git a/packages/commonwealth/test/unit/events/storageHandler.spec.ts b/packages/commonwealth/test/unit/events/storageHandler.spec.ts index a365d3eef99..13ea70d3550 100644 --- a/packages/commonwealth/test/unit/events/storageHandler.spec.ts +++ b/packages/commonwealth/test/unit/events/storageHandler.spec.ts @@ -8,7 +8,7 @@ import { CWEvent, SubstrateTypes, SupportedNetwork, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { resetDatabase } from '../../../server-test'; import models from '../../../server/database'; diff --git a/packages/commonwealth/test/unit/events/userFlagsHandler.spec.ts b/packages/commonwealth/test/unit/events/userFlagsHandler.spec.ts index ae6150b809f..2a80f68a83c 100644 --- a/packages/commonwealth/test/unit/events/userFlagsHandler.spec.ts +++ b/packages/commonwealth/test/unit/events/userFlagsHandler.spec.ts @@ -7,7 +7,7 @@ import { CWEvent, SubstrateTypes, SupportedNetwork, -} from '@commonwealth/chain-events'; +} from 'chain-events/src'; import { resetDatabase } from '../../../server-test'; import models from '../../../server/database'; diff --git a/packages/commonwealth/tsconfig.json b/packages/commonwealth/tsconfig.json index ca9169d1ae3..46481e90ff9 100644 --- a/packages/commonwealth/tsconfig.json +++ b/packages/commonwealth/tsconfig.json @@ -11,6 +11,8 @@ "paths": { "common-common": ["../../packages/common-common"], "common-common/*": ["../../packages/common-common/*"], + "chain-events": ["../../packages/chain-events"], + "chain-events/*": ["../../packages/chain-events/*"], "token-balance-cache": ["../../packages/token-balance-cache"], "token-balance-cache/*": ["../../packages/token-balance-cache/*"], "*": ["./*", "shared/*", "client/scripts/*"] diff --git a/packages/commonwealth/webpack/webpack.common.js b/packages/commonwealth/webpack/webpack.common.js index b820fa7702f..bed8040b0f8 100644 --- a/packages/commonwealth/webpack/webpack.common.js +++ b/packages/commonwealth/webpack/webpack.common.js @@ -85,6 +85,7 @@ module.exports = { ], alias: { "common-common": path.resolve(__dirname, '../../common-common'), + "chain-events": path.resolve(__dirname, '../../chain-events'), "token-balance-cache": path.resolve(__dirname, '../../token-balance-cache'), } }, @@ -120,6 +121,7 @@ module.exports = { path.resolve(__dirname, '../client'), path.resolve(__dirname, '../shared'), path.resolve(__dirname, '../../common-common'), + path.resolve(__dirname, '../../chain-events'), path.resolve(__dirname, '../../token-balance-cache'), ], loader: 'esbuild-loader', @@ -142,6 +144,9 @@ module.exports = { include: [ path.resolve(__dirname, '../client'), path.resolve(__dirname, '../shared'), + path.resolve(__dirname, '../../common-common'), + path.resolve(__dirname, '../../chain-events'), + path.resolve(__dirname, '../../token-balance-cache'), ], exclude: /\/node_modules\//, use: { diff --git a/yarn.lock b/yarn.lock index d60db55f3e1..695308ed773 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9,6 +9,14 @@ dependencies: tmp-promise "^3.0.2" +"@ampproject/remapping@^2.1.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d" + integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w== + dependencies: + "@jridgewell/gen-mapping" "^0.1.0" + "@jridgewell/trace-mapping" "^0.3.9" + "@apollo/client@^3.3.18": version "3.3.21" resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.3.21.tgz#2862baa4e1ced8c5e89ebe6fc52877fc64a726aa" @@ -49,11 +57,23 @@ dependencies: "@babel/highlight" "^7.12.13" +"@babel/code-frame@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a" + integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== + dependencies: + "@babel/highlight" "^7.18.6" + "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.13.15", "@babel/compat-data@^7.13.8", "@babel/compat-data@^7.14.0": version "7.14.0" resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.0.tgz" integrity sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q== +"@babel/compat-data@^7.18.8": + version "7.18.8" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.8.tgz#2483f565faca607b8535590e84e7de323f27764d" + integrity sha512-HSmX4WZPPK3FUxYp7g2T6EyO8j96HlZJlxmKPSh6KAcqwyDrfx7hKjXpAW/0FhFfTJsR0Yt4lAjLI2coMptIHQ== + "@babel/core@>=7.2.2": version "7.8.7" resolved "https://registry.npmjs.org/@babel/core/-/core-7.8.7.tgz" @@ -75,6 +95,27 @@ semver "^5.4.1" source-map "^0.5.0" +"@babel/core@^7.10.3": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.9.tgz#805461f967c77ff46c74ca0460ccf4fe933ddd59" + integrity sha512-1LIb1eL8APMy91/IMW+31ckrfBM4yCoLaVzoDhZUKSM4cu1L1nIidyxkCgzPAgrC5WEz36IPEr/eSeSF9pIn+g== + dependencies: + "@ampproject/remapping" "^2.1.0" + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.9" + "@babel/helper-compilation-targets" "^7.18.9" + "@babel/helper-module-transforms" "^7.18.9" + "@babel/helpers" "^7.18.9" + "@babel/parser" "^7.18.9" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.2" + json5 "^2.2.1" + semver "^6.3.0" + "@babel/core@^7.2.2": version "7.14.0" resolved "https://registry.npmjs.org/@babel/core/-/core-7.14.0.tgz" @@ -135,6 +176,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.9.tgz#68337e9ea8044d6ddc690fb29acae39359cca0a5" + integrity sha512-wt5Naw6lJrL1/SGkipMiFxJjtyczUWTP38deiP1PO60HsBjDeKk08CGC3S8iVuvf0FmTdgKwU1KIXzSKL1G0Ug== + dependencies: + "@babel/types" "^7.18.9" + "@jridgewell/gen-mapping" "^0.3.2" + jsesc "^2.5.1" + "@babel/helper-annotate-as-pure@^7.12.13": version "7.12.13" resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz" @@ -167,6 +217,16 @@ browserslist "^4.14.5" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz#69e64f57b524cde3e5ff6cc5a9f4a387ee5563bf" + integrity sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg== + dependencies: + "@babel/compat-data" "^7.18.8" + "@babel/helper-validator-option" "^7.18.6" + browserslist "^4.20.2" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.13.0", "@babel/helper-create-class-features-plugin@^7.14.0": version "7.14.1" resolved "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.1.tgz" @@ -213,6 +273,11 @@ resolve "^1.14.2" semver "^6.1.2" +"@babel/helper-environment-visitor@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be" + integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== + "@babel/helper-explode-assignable-expression@^7.12.13": version "7.13.0" resolved "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.13.0.tgz" @@ -238,6 +303,14 @@ "@babel/template" "^7.12.13" "@babel/types" "^7.12.13" +"@babel/helper-function-name@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz#940e6084a55dee867d33b4e487da2676365e86b0" + integrity sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A== + dependencies: + "@babel/template" "^7.18.6" + "@babel/types" "^7.18.9" + "@babel/helper-get-function-arity@^7.12.10": version "7.12.10" resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.10.tgz" @@ -260,6 +333,13 @@ "@babel/traverse" "^7.13.15" "@babel/types" "^7.13.16" +"@babel/helper-hoist-variables@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678" + integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-member-expression-to-functions@^7.12.7": version "7.12.7" resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.7.tgz" @@ -295,6 +375,13 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-module-imports@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e" + integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-module-transforms@^7.12.1": version "7.12.1" resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.12.1.tgz" @@ -324,6 +411,20 @@ "@babel/traverse" "^7.14.0" "@babel/types" "^7.14.0" +"@babel/helper-module-transforms@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz#5a1079c005135ed627442df31a42887e80fcb712" + integrity sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g== + dependencies: + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-module-imports" "^7.18.6" + "@babel/helper-simple-access" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/helper-validator-identifier" "^7.18.6" + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" + "@babel/helper-optimise-call-expression@^7.12.10": version "7.12.10" resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.10.tgz" @@ -391,6 +492,13 @@ dependencies: "@babel/types" "^7.13.12" +"@babel/helper-simple-access@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea" + integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-skip-transparent-expression-wrappers@^7.12.1": version "7.12.1" resolved "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.12.1.tgz" @@ -412,6 +520,13 @@ dependencies: "@babel/types" "^7.12.13" +"@babel/helper-split-export-declaration@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075" + integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== + dependencies: + "@babel/types" "^7.18.6" + "@babel/helper-validator-identifier@^7.10.4", "@babel/helper-validator-identifier@^7.12.11": version "7.12.11" resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz" @@ -427,11 +542,21 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== +"@babel/helper-validator-identifier@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076" + integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g== + "@babel/helper-validator-option@^7.12.17": version "7.12.17" resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz" integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== +"@babel/helper-validator-option@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8" + integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== + "@babel/helper-wrap-function@^7.13.0": version "7.13.0" resolved "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.13.0.tgz" @@ -460,6 +585,15 @@ "@babel/traverse" "^7.14.0" "@babel/types" "^7.14.0" +"@babel/helpers@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.9.tgz#4bef3b893f253a1eced04516824ede94dcfe7ff9" + integrity sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ== + dependencies: + "@babel/template" "^7.18.6" + "@babel/traverse" "^7.18.9" + "@babel/types" "^7.18.9" + "@babel/highlight@^7.10.4": version "7.10.4" resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz" @@ -478,6 +612,15 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf" + integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/parser@^7.12.10", "@babel/parser@^7.12.11", "@babel/parser@^7.12.7": version "7.12.11" resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.12.11.tgz" @@ -488,6 +631,11 @@ resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.14.1.tgz" integrity sha512-muUGEKu8E/ftMTPlNp+mc6zL3E9zKWmF5sDHZ5MSsoTP9Wyz64AhEf9kD08xYJ7w6Hdcu8H550ircnPyWSIF0Q== +"@babel/parser@^7.18.6", "@babel/parser@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.9.tgz#f2dde0c682ccc264a9a8595efd030a5cc8fd2539" + integrity sha512-9uJveS9eY9DJ0t64YbIBZICtJy8a5QrDEVdiLCG97fVLpDTpGX7t8mMSb6OWw6Lrnjqj4O8zwjELX3dhoMgiBg== + "@babel/parser@^7.7.0": version "7.8.7" resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.8.7.tgz" @@ -1022,6 +1170,14 @@ "@babel/helper-create-regexp-features-plugin" "^7.12.13" "@babel/helper-plugin-utils" "^7.12.13" +"@babel/polyfill@^7.10.1": + version "7.12.1" + resolved "https://registry.yarnpkg.com/@babel/polyfill/-/polyfill-7.12.1.tgz#1f2d6371d1261bbd961f3c5d5909150e12d0bd96" + integrity sha512-X0pi0V6gxLi6lFZpGmeNa4zxtwEmCs42isWLNjZZDE0Y8yVfgu0T2OAHlzBbdYlqbW/YXVvoBHpATEM+goCj8g== + dependencies: + core-js "^2.6.5" + regenerator-runtime "^0.13.4" + "@babel/polyfill@^7.2.5": version "7.8.7" resolved "https://registry.npmjs.org/@babel/polyfill/-/polyfill-7.8.7.tgz" @@ -1120,6 +1276,17 @@ "@babel/types" "^7.4.4" esutils "^2.0.2" +"@babel/register@^7.10.3": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/register/-/register-7.18.9.tgz#1888b24bc28d5cc41c412feb015e9ff6b96e439c" + integrity sha512-ZlbnXDcNYHMR25ITwwNKT88JiaukkdVj/nG7r3wnuXkOTHc60Uy05PwMCPre0hSkY68E6zK3xz+vUJSP2jWmcw== + dependencies: + clone-deep "^4.0.1" + find-cache-dir "^2.0.0" + make-dir "^2.1.0" + pirates "^4.0.5" + source-map-support "^0.5.16" + "@babel/register@^7.4.0": version "7.8.6" resolved "https://registry.npmjs.org/@babel/register/-/register-7.8.6.tgz" @@ -1193,6 +1360,15 @@ "@babel/parser" "^7.12.13" "@babel/types" "^7.12.13" +"@babel/template@^7.18.6": + version "7.18.6" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.6.tgz#1283f4993e00b929d6e2d3c72fdc9168a2977a31" + integrity sha512-JoDWzPe+wgBsTTgdnIma3iHNFC7YVJoPssVBDjiHfNlyt4YcunDtcDOUmfVDfCK5MfdsaIoX9PkijPhjH3nYUw== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/parser" "^7.18.6" + "@babel/types" "^7.18.6" + "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5": version "7.12.12" resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.12.12.tgz" @@ -1222,6 +1398,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.9.tgz#deeff3e8f1bad9786874cb2feda7a2d77a904f98" + integrity sha512-LcPAnujXGwBgv3/WHv01pHtb2tihcyW1XuL9wd7jqh1Z8AQkTd+QVjMrMijrln0T7ED3UXLIy36P9Ao7W75rYg== + dependencies: + "@babel/code-frame" "^7.18.6" + "@babel/generator" "^7.18.9" + "@babel/helper-environment-visitor" "^7.18.9" + "@babel/helper-function-name" "^7.18.9" + "@babel/helper-hoist-variables" "^7.18.6" + "@babel/helper-split-export-declaration" "^7.18.6" + "@babel/parser" "^7.18.9" + "@babel/types" "^7.18.9" + debug "^4.1.0" + globals "^11.1.0" + "@babel/traverse@^7.7.0": version "7.8.6" resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.8.6.tgz" @@ -1270,6 +1462,14 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.18.6", "@babel/types@^7.18.9": + version "7.18.9" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.9.tgz#7148d64ba133d8d73a41b3172ac4b83a1452205f" + integrity sha512-WwMLAg2MvJmt/rKEVQBBhIVffMmnilX4oe0sRe7iPOHIGsqpruFHHdrfj4O1CMMtgMtCU4oPafZjDPCRgO57Wg== + dependencies: + "@babel/helper-validator-identifier" "^7.18.6" + to-fast-properties "^2.0.0" + "@babel/types@^7.7.0": version "7.8.7" resolved "https://registry.npmjs.org/@babel/types/-/types-7.8.7.tgz" @@ -1279,34 +1479,6 @@ lodash "^4.17.13" to-fast-properties "^2.0.0" -"@commonwealth/chain-events@^0.13.3": - version "0.13.3" - resolved "https://registry.yarnpkg.com/@commonwealth/chain-events/-/chain-events-0.13.3.tgz#62194b2e0292c039c7f153b8419152a48b145282" - integrity sha512-J42+U+hKR3eKyBgjhshy4ysR5PLxDuczwnRrLL6B72eiKIGZ0siVNT3i5VfsgC23CRHPiDI2sPUEFddexYp1lQ== - dependencies: - "@ethersproject/abi" "^5.0.0" - "@ethersproject/bytes" "^5.0.0" - "@ethersproject/providers" "^5.0.0" - "@nomiclabs/hardhat-ethers" "^2.0.2" - "@polkadot/api" "6.0.5" - "@polkadot/api-derive" "6.0.5" - "@polkadot/types" "6.0.5" - "@polkadot/util" "7.4.1" - bn.js "^5.1.3" - ethereum-block-by-date "^1.4.0" - ethers "^5.0.0" - lodash "^4.17.21" - moment "^2.29.1" - node-fetch "^2.6.1" - pg "^8.6.0" - pg-format "^1.0.4" - sleep-promise "^8.0.1" - typescript-logging "^0.6.4" - underscore "^1.10.2" - web3 "^1.3.1" - web3-core "^1.3.1" - web3-utils "^1.3.1" - "@confio/ics23@^0.6.3": version "0.6.5" resolved "https://registry.yarnpkg.com/@confio/ics23/-/ics23-0.6.5.tgz#9c21a61089d4c3c2429875a69d6d9cd8c87512aa" @@ -1540,6 +1712,21 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" +"@eslint/eslintrc@^0.4.3": + version "0.4.3" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" + integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== + dependencies: + ajv "^6.12.4" + debug "^4.1.1" + espree "^7.3.0" + globals "^13.9.0" + ignore "^4.0.6" + import-fresh "^3.2.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + strip-json-comments "^3.1.1" + "@ethereumjs/block@^3.5.0", "@ethereumjs/block@^3.6.2", "@ethereumjs/block@^3.6.3": version "3.6.3" resolved "https://registry.yarnpkg.com/@ethereumjs/block/-/block-3.6.3.tgz#d96cbd7af38b92ebb3424223dbf773f5ccd27f84" @@ -2807,6 +2994,20 @@ resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.1.0.tgz#0eee6373e11418bfe0b5638f654df7a4ca6a3950" integrity sha512-wYn6r8zVZyQJ6rQaALBEln5B1pzxb9shV5Ef97kTvn6yVGrqyXVnDqnU24MXnFubR+rZjBY9NWuxX3FB2sTsjg== +"@humanwhocodes/config-array@^0.5.0": + version "0.5.0" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" + integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== + dependencies: + "@humanwhocodes/object-schema" "^1.2.0" + debug "^4.1.1" + minimatch "^3.0.4" + +"@humanwhocodes/object-schema@^1.2.0": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" + integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== + "@improbable-eng/grpc-web@^0.14.1": version "0.14.1" resolved "https://registry.yarnpkg.com/@improbable-eng/grpc-web/-/grpc-web-0.14.1.tgz#f4662f64dc89c0f956a94bb8a3b576556c74589c" @@ -2877,6 +3078,46 @@ resolved "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.2.tgz" integrity sha512-tsAQNx32a8CoFhjhijUIhI4kccIAgmGhy8LZMZgGfmXcpMbPRUqn5LWmgRttILi6yeGmBJd2xsPkFMs0PzgPCw== +"@jridgewell/gen-mapping@^0.1.0": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996" + integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w== + dependencies: + "@jridgewell/set-array" "^1.0.0" + "@jridgewell/sourcemap-codec" "^1.4.10" + +"@jridgewell/gen-mapping@^0.3.2": + version "0.3.2" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9" + integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== + dependencies: + "@jridgewell/set-array" "^1.0.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + +"@jridgewell/resolve-uri@^3.0.3": + version "3.1.0" + resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" + integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== + +"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" + integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== + +"@jridgewell/sourcemap-codec@^1.4.10": + version "1.4.14" + resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" + integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== + +"@jridgewell/trace-mapping@^0.3.9": + version "0.3.14" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz#b231a081d8f66796e475ad588a1ef473112701ed" + integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@keplr-wallet/types@^0.9.10": version "0.9.10" resolved "https://registry.yarnpkg.com/@keplr-wallet/types/-/types-0.9.10.tgz#3b7f8bdb96edffd73bcd5b65f6fe0aef1c9d1f98" @@ -3052,6 +3293,14 @@ resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-ethers/-/hardhat-ethers-2.0.2.tgz#c472abcba0c5185aaa4ad4070146e95213c68511" integrity sha512-6quxWe8wwS4X5v3Au8q1jOvXYEPkS1Fh+cME5u6AwNdnI4uERvPlVjlgRWzpnb+Rrt1l/cEqiNRH9GlsBMSDQg== +"@nomiclabs/hardhat-waffle@^2.0.1": + version "2.0.3" + resolved "https://registry.yarnpkg.com/@nomiclabs/hardhat-waffle/-/hardhat-waffle-2.0.3.tgz#9c538a09c5ed89f68f5fd2dc3f78f16ed1d6e0b1" + integrity sha512-049PHSnI1CZq6+XTbrMbMv5NaL7cednTfPenx02k3cEh8wBMLa6ys++dBETJa6JjfwgA9nBhhHQ173LJv6k2Pg== + dependencies: + "@types/sinon-chai" "^3.2.3" + "@types/web3" "1.0.19" + "@openzeppelin/contracts-governance@npm:@openzeppelin/contracts@^4.3.2": version "4.3.2" resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.3.2.tgz#ff80affd6d352dbe1bbc5b4e1833c41afd6283b6" @@ -3594,6 +3843,11 @@ long "^4.0.0" protobufjs "~6.11.2" +"@tootallnate/once@1": + version "1.1.2" + resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-1.1.2.tgz#ccb91445360179a04e7fe6aff78c00ffc1eeaf82" + integrity sha512-RbzJvlNzmRq5c3O09UipeuXno4tA1FE6ikOjxZK0tuxVv3412l64l5t1W5pj4+rJq9vpkm/kwiR07aZXnsKPxw== + "@typechain/ethers-v5@^6.0.0": version "6.0.5" resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-6.0.5.tgz#39bbf9baadd0e8d9efad9d16c60152b7cd9a467b" @@ -3622,6 +3876,13 @@ resolved "https://registry.yarnpkg.com/@types/bluebird/-/bluebird-3.5.36.tgz#00d9301d4dc35c2f6465a8aec634bb533674c652" integrity sha512-HBNx4lhkxN7bx6P0++W8E289foSu8kO8GCk2unhuVggO+cE7rh9DhZUyPhUxNRG9m+5B5BTKxZQ5ZP92x/mx9Q== +"@types/bn.js@*", "@types/bn.js@^5.1.0": + version "5.1.0" + resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" + integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA== + dependencies: + "@types/node" "*" + "@types/bn.js@^4.11.3", "@types/bn.js@^4.11.5", "@types/bn.js@^4.11.6": version "4.11.6" resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" @@ -3629,13 +3890,6 @@ dependencies: "@types/node" "*" -"@types/bn.js@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" - integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA== - dependencies: - "@types/node" "*" - "@types/body-parser@*": version "1.19.0" resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.0.tgz" @@ -3656,6 +3910,11 @@ resolved "https://registry.npmjs.org/@types/caseless/-/caseless-0.12.2.tgz" integrity sha512-6ckxMjBBD8URvjB6J3NcnuAn5Pkl7t3TizAg+xdlzzQGSPSmBcXf8KoIH0ua/i+tio+ZRUHEXp0HEmvaR4kt0w== +"@types/chai@*": + version "4.3.1" + resolved "https://registry.yarnpkg.com/@types/chai/-/chai-4.3.1.tgz#e2c6e73e0bdeb2521d00756d099218e9f5d90a04" + integrity sha512-/zPMqDkzSZ8t3VtxOa4KPq7uzzW978M9Tvh+j7GHKuo6k6GTLxPJ4J5gE5cjfJ26pnXst0N5Hax8Sr0T2Mi9zQ== + "@types/chai@4": version "4.2.10" resolved "https://registry.npmjs.org/@types/chai/-/chai-4.2.10.tgz" @@ -3812,6 +4071,11 @@ resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz" integrity sha512-cxWFQVseBm6O9Gbw1IWb8r6OS4OhSt3hPZLkFApLjM8TEXROBuQGLAH2i2gZpcXdLBIrpXuTDhH7Vbm1iXmNGA== +"@types/json-schema@^7.0.7": + version "7.0.11" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" + integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + "@types/json5@^0.0.29": version "0.0.29" resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz" @@ -3974,6 +4238,11 @@ resolved "https://registry.npmjs.org/@types/node/-/node-13.13.51.tgz" integrity sha512-66/xg5I5Te4oGi5Jws11PtNmKkZbOPZWyBZZ/l5AOrWj1Dyw+6Ge/JhYTq/2/Yvdqyhrue8RL+DGI298OJ0xcg== +"@types/node@^14.0.14": + version "14.18.22" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.22.tgz#fd2a15dca290fc9ad565b672fde746191cd0c6e6" + integrity sha512-qzaYbXVzin6EPjghf/hTdIbnVW1ErMx8rPzwRNJhlbyJhu2SyqlvjGOY/tbUt6VFyzg56lROcOeSQRInpt63Yw== + "@types/node@^8.0.0": version "8.10.66" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" @@ -4094,6 +4363,26 @@ "@types/express-serve-static-core" "*" "@types/mime" "*" +"@types/sinon-chai@^3.2.3": + version "3.2.8" + resolved "https://registry.yarnpkg.com/@types/sinon-chai/-/sinon-chai-3.2.8.tgz#5871d09ab50d671d8e6dd72e9073f8e738ac61dc" + integrity sha512-d4ImIQbT/rKMG8+AXpmcan5T2/PNeSjrYhvkwet6z0p8kzYtfgA32xzOBlbU0yqJfq+/0Ml805iFoODO0LP5/g== + dependencies: + "@types/chai" "*" + "@types/sinon" "*" + +"@types/sinon@*": + version "10.0.13" + resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-10.0.13.tgz#60a7a87a70d9372d0b7b38cc03e825f46981fb83" + integrity sha512-UVjDqJblVNQYvVNUsj0PuYYw0ELRmgt1Nt5Vk0pT5f16ROGfcKJY8o1HVuMOJOpD727RrGB9EGvoaTQE5tgxZQ== + dependencies: + "@types/sinonjs__fake-timers" "*" + +"@types/sinonjs__fake-timers@*": + version "8.1.2" + resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.2.tgz#bf2e02a3dbd4aecaf95942ecd99b7402e03fad5e" + integrity sha512-9GcLXF0/v3t80caGs5p2rRfkB+a8VBGLJZVih6CNFkx8IZ994wiKKLSRs9nuFwk1HevWs/1mnUmkApGrSGsShA== + "@types/sizzle@*": version "2.3.2" resolved "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.2.tgz" @@ -4112,6 +4401,11 @@ resolved "https://registry.npmjs.org/@types/tough-cookie/-/tough-cookie-2.3.6.tgz" integrity sha512-wHNBMnkoEBiRAd3s8KTKwIuO9biFtTf0LehITzBhSco+HQI0xkXZbLOD55SW3Aqw3oUkHstkm5SPv58yaAdFPQ== +"@types/underscore@*", "@types/underscore@^1.10.1": + version "1.11.4" + resolved "https://registry.yarnpkg.com/@types/underscore/-/underscore-1.11.4.tgz#62e393f8bc4bd8a06154d110c7d042a93751def3" + integrity sha512-uO4CD2ELOjw8tasUrAhvnn2W4A0ZECOvMjCivJr4gA9pGgjv+qxKWY9GLTMVEK8ej85BxQOocUyE7hImmSQYcg== + "@types/underscore@^1.9.4": version "1.9.4" resolved "https://registry.npmjs.org/@types/underscore/-/underscore-1.9.4.tgz" @@ -4138,6 +4432,14 @@ "@types/unist" "*" "@types/vfile-message" "*" +"@types/web3@1.0.19": + version "1.0.19" + resolved "https://registry.yarnpkg.com/@types/web3/-/web3-1.0.19.tgz#46b85d91d398ded9ab7c85a5dd57cb33ac558924" + integrity sha512-fhZ9DyvDYDwHZUp5/STa9XW2re0E8GxoioYJ4pEUZ13YHpApSagixj7IAdoYH5uAK+UalGq6Ml8LYzmgRA/q+A== + dependencies: + "@types/bn.js" "*" + "@types/underscore" "*" + "@types/websocket@^1.0.0": version "1.0.0" resolved "https://registry.npmjs.org/@types/websocket/-/websocket-1.0.0.tgz" @@ -4166,11 +4468,37 @@ dependencies: "@types/node" "*" +"@types/yargs-parser@*": + version "21.0.0" + resolved "https://registry.yarnpkg.com/@types/yargs-parser/-/yargs-parser-21.0.0.tgz#0c60e537fa790f5f9472ed2776c2b71ec117351b" + integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== + +"@types/yargs@^15.0.9": + version "15.0.14" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-15.0.14.tgz#26d821ddb89e70492160b66d10a0eb6df8f6fb06" + integrity sha512-yEJzHoxf6SyQGhBhIYGXQDSCkJjB6HohDShto7m8vaKg9Yp0Yn8+71J9eakh2bnPg6BfsH9PRMhiRTZnd4eXGQ== + dependencies: + "@types/yargs-parser" "*" + "@types/zen-observable@^0.8.0": version "0.8.3" resolved "https://registry.yarnpkg.com/@types/zen-observable/-/zen-observable-0.8.3.tgz#781d360c282436494b32fe7d9f7f8e64b3118aa3" integrity sha512-fbF6oTd4sGGy0xjHPKAt+eS2CrxJ3+6gQ3FGcBoIJR2TLAyCkCyI8JqZNy+FeON0AhVgNJoUumVoZQjBFUqHkw== +"@typescript-eslint/eslint-plugin@^4.22.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" + integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg== + dependencies: + "@typescript-eslint/experimental-utils" "4.33.0" + "@typescript-eslint/scope-manager" "4.33.0" + debug "^4.3.1" + functional-red-black-tree "^1.0.1" + ignore "^5.1.8" + regexpp "^3.1.0" + semver "^7.3.5" + tsutils "^3.21.0" + "@typescript-eslint/eslint-plugin@^4.25.0": version "4.25.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.25.0.tgz#d82657b6ab4caa4c3f888ff923175fadc2f31f2a" @@ -4197,6 +4525,28 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" +"@typescript-eslint/experimental-utils@4.33.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd" + integrity sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q== + dependencies: + "@types/json-schema" "^7.0.7" + "@typescript-eslint/scope-manager" "4.33.0" + "@typescript-eslint/types" "4.33.0" + "@typescript-eslint/typescript-estree" "4.33.0" + eslint-scope "^5.1.1" + eslint-utils "^3.0.0" + +"@typescript-eslint/parser@^4.22.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.33.0.tgz#dfe797570d9694e560528d18eecad86c8c744899" + integrity sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA== + dependencies: + "@typescript-eslint/scope-manager" "4.33.0" + "@typescript-eslint/types" "4.33.0" + "@typescript-eslint/typescript-estree" "4.33.0" + debug "^4.3.1" + "@typescript-eslint/parser@^4.25.0": version "4.25.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.25.0.tgz#6b2cb6285aa3d55bfb263c650739091b0f19aceb" @@ -4215,11 +4565,24 @@ "@typescript-eslint/types" "4.25.0" "@typescript-eslint/visitor-keys" "4.25.0" +"@typescript-eslint/scope-manager@4.33.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" + integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ== + dependencies: + "@typescript-eslint/types" "4.33.0" + "@typescript-eslint/visitor-keys" "4.33.0" + "@typescript-eslint/types@4.25.0": version "4.25.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.25.0.tgz#0e444a5c5e3c22d7ffa5e16e0e60510b3de5af87" integrity sha512-+CNINNvl00OkW6wEsi32wU5MhHti2J25TJsJJqgQmJu3B3dYDBcmOxcE5w9cgoM13TrdE/5ND2HoEnBohasxRQ== +"@typescript-eslint/types@4.33.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" + integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== + "@typescript-eslint/typescript-estree@4.25.0": version "4.25.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.25.0.tgz#942e4e25888736bff5b360d9b0b61e013d0cfa25" @@ -4233,6 +4596,19 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/typescript-estree@4.33.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" + integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== + dependencies: + "@typescript-eslint/types" "4.33.0" + "@typescript-eslint/visitor-keys" "4.33.0" + debug "^4.3.1" + globby "^11.0.3" + is-glob "^4.0.1" + semver "^7.3.5" + tsutils "^3.21.0" + "@typescript-eslint/visitor-keys@4.25.0": version "4.25.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.25.0.tgz#863e7ed23da4287c5b469b13223255d0fde6aaa7" @@ -4241,6 +4617,14 @@ "@typescript-eslint/types" "4.25.0" eslint-visitor-keys "^2.0.0" +"@typescript-eslint/visitor-keys@4.33.0": + version "4.33.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" + integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg== + dependencies: + "@typescript-eslint/types" "4.33.0" + eslint-visitor-keys "^2.0.0" + "@ungap/promise-all-settled@1.1.2": version "1.1.2" resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" @@ -4605,6 +4989,11 @@ abab@^2.0.0: resolved "https://registry.npmjs.org/abab/-/abab-2.0.3.tgz" integrity sha512-tsFzPpcttalNjFBCFMqsKYQcWxxen1pgJR56by//QwvJc4/OUS3kPOOttx2tSIfjsylB0pYu7f5D3K1RCxUnUg== +abab@^2.0.3, abab@^2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== + abbrev@1: version "1.1.1" resolved "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz" @@ -4669,6 +5058,14 @@ acorn-globals@^4.3.2: acorn "^6.0.1" acorn-walk "^6.0.1" +acorn-globals@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/acorn-globals/-/acorn-globals-6.0.0.tgz#46cdd39f0f8ff08a876619b55f5ac8a6dc770b45" + integrity sha512-ZQl7LOWaF5ePqqcX4hLuv/bLXYQNfNWw2c0/yX/TsPRKamzHcTGQnlCjHT3TsmkOUVEPS3crCxiPfdzE/Trlhg== + dependencies: + acorn "^7.1.1" + acorn-walk "^7.1.1" + acorn-jsx@^5.3.1: version "5.3.1" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.1.tgz#fc8661e11b7ac1539c47dbfea2e72b3af34d267b" @@ -4679,6 +5076,11 @@ acorn-walk@^6.0.1: resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.2.0.tgz" integrity sha512-7evsyfH1cLOCdAzZAd43Cic04yKydNx0cF+7tiA19p1XnLLPU4dpCQOqpjqwokFe//vS0QqfqqjCS2JkiIs0cA== +acorn-walk@^7.1.1: + version "7.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-7.2.0.tgz#0de889a601203909b0fbe07b8938dc21d2e967bc" + integrity sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA== + acorn-walk@^8.0.0: version "8.0.2" resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.0.2.tgz" @@ -4699,7 +5101,7 @@ acorn@^7.1.0: resolved "https://registry.npmjs.org/acorn/-/acorn-7.1.1.tgz" integrity sha512-add7dgA5ppRPxCFJoAGfMDi7PIBXq1RtGo7BhbLaxwrXPOmw8gq48Y9ozT01hUKy9byMjlR20EJhu5zlkErEkg== -acorn@^7.4.0: +acorn@^7.1.1, acorn@^7.4.0: version "7.4.1" resolved "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz" integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== @@ -4709,6 +5111,11 @@ acorn@^8.0.4: resolved "https://registry.npmjs.org/acorn/-/acorn-8.1.0.tgz" integrity sha512-LWCF/Wn0nfHOmJ9rzQApGnxnvgfROzGilS8936rqN/lfcYkY9MYZzdMqN+2NJ4SlTc+m5HiSa+kNfDtI64dwUA== +acorn@^8.2.4: + version "8.8.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" + integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== + adm-zip@^0.4.16: version "0.4.16" resolved "https://registry.yarnpkg.com/adm-zip/-/adm-zip-0.4.16.tgz#cf4c508fdffab02c269cbc7f471a875f05570365" @@ -5048,6 +5455,17 @@ array-includes@^3.1.1, array-includes@^3.1.2, array-includes@^3.1.3: get-intrinsic "^1.1.1" is-string "^1.0.5" +array-includes@^3.1.4: + version "3.1.5" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.5.tgz#2c320010db8d31031fd2a5f6b3bbd4b1aad31bdb" + integrity sha512-iSDYZMMyTPkiFasVqfuAQnWAYcvO/SeBSCGKePoEthjp4LEMTe4uLc7b025o4jAZpHhihh8xPo99TNWUWWkGDQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + get-intrinsic "^1.1.1" + is-string "^1.0.7" + array-union@^1.0.1, array-union@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/array-union/-/array-union-1.0.2.tgz" @@ -5079,6 +5497,16 @@ array.prototype.flat@^1.2.4: define-properties "^1.1.3" es-abstract "^1.18.0-next.1" +array.prototype.flat@^1.2.5: + version "1.3.0" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b" + integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" + array.prototype.flatmap@^1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.2.4.tgz#94cfd47cc1556ec0747d97f7c7738c58122004c9" @@ -5750,7 +6178,7 @@ braces@^2.3.1, braces@^2.3.2: split-string "^3.0.2" to-regex "^3.0.1" -braces@^3.0.1, braces@~3.0.2: +braces@^3.0.1, braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== @@ -5856,6 +6284,16 @@ browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.3, browserslist@^ escalade "^3.1.1" node-releases "^1.1.71" +browserslist@^4.20.2: + version "4.21.2" + resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.2.tgz#59a400757465535954946a400b841ed37e2b4ecf" + integrity sha512-MonuOgAtUB46uP5CezYbRaYKBNt2LxP0yX+Pmj4LkcDFGkn9Cbpi83d9sCjwQDErXsIJSzY5oKGDbgOlF/LPAA== + dependencies: + caniuse-lite "^1.0.30001366" + electron-to-chromium "^1.4.188" + node-releases "^2.0.6" + update-browserslist-db "^1.0.4" + bs58@^4.0.0, bs58@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/bs58/-/bs58-4.0.1.tgz" @@ -6216,6 +6654,11 @@ caniuse-lite@^1.0.30001030, caniuse-lite@^1.0.30001219: resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz" integrity sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A== +caniuse-lite@^1.0.30001366: + version "1.0.30001368" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001368.tgz#c5c06381c6051cd863c45021475434e81936f713" + integrity sha512-wgfRYa9DenEomLG/SdWgQxpIyvdtH3NW8Vq+tB6AwR9e56iOIcu1im5F/wNdDf04XlKHXqIx4N8Jo0PemeBenQ== + canvas-renderer@~2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/canvas-renderer/-/canvas-renderer-2.1.1.tgz" @@ -6374,6 +6817,21 @@ cheerio@1.0.0-rc.3: lodash "^4.15.0" parse5 "^3.0.1" +chokidar@3.5.1, chokidar@^3.4.1: + version "3.5.1" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz" + integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== + dependencies: + anymatch "~3.1.1" + braces "~3.0.2" + glob-parent "~5.1.0" + is-binary-path "~2.1.0" + is-glob "~4.0.1" + normalize-path "~3.0.0" + readdirp "~3.5.0" + optionalDependencies: + fsevents "~2.3.1" + chokidar@3.5.3, chokidar@^3.4.0: version "3.5.3" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd" @@ -6408,21 +6866,6 @@ chokidar@^2.1.8: optionalDependencies: fsevents "^1.2.7" -chokidar@^3.4.1: - version "3.5.1" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz" - integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.5.0" - optionalDependencies: - fsevents "~2.3.1" - chownr@^1.0.1, chownr@^1.1.1, chownr@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" @@ -6572,6 +7015,15 @@ cliui@^7.0.2: strip-ansi "^6.0.0" wrap-ansi "^7.0.0" +clone-deep@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-4.0.1.tgz#c19fd9bdbbf85942b4fd979c84dcf7d5f07c2387" + integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== + dependencies: + is-plain-object "^2.0.4" + kind-of "^6.0.2" + shallow-clone "^3.0.0" + clone-regexp@^2.1.0: version "2.2.0" resolved "https://registry.npmjs.org/clone-regexp/-/clone-regexp-2.2.0.tgz" @@ -6967,6 +7419,19 @@ copy-webpack-plugin@^4.6.0: p-limit "^1.0.0" serialize-javascript "^1.4.0" +copyfiles@^2.4.1: + version "2.4.1" + resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.4.1.tgz#d2dcff60aaad1015f09d0b66e7f0f1c5cd3c5da5" + integrity sha512-fereAvAvxDrQDOXybk3Qu3dPbOoKoysFMWtkY3mv5BsL8//OSZVL5DCLYqgRfY5cWirgRzlC+WSrxp6Bo3eNZg== + dependencies: + glob "^7.0.5" + minimatch "^3.0.3" + mkdirp "^1.0.4" + noms "0.0.0" + through2 "^2.0.1" + untildify "^4.0.0" + yargs "^16.1.0" + core-js-compat@^3.9.0: version "3.12.0" resolved "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.12.0.tgz" @@ -7382,7 +7847,7 @@ csso@^4.0.2: dependencies: css-tree "1.0.0-alpha.37" -cssom@^0.4.1: +cssom@^0.4.1, cssom@^0.4.4: version "0.4.4" resolved "https://registry.npmjs.org/cssom/-/cssom-0.4.4.tgz" integrity sha512-p3pvU7r1MyyqbTk+WbNJIgJjG2VmTIaB10rI93LzVPrmDJKkzKYMtxxyAvQXR/NS6otuzveI7+7BBq3SjBS2mw== @@ -7399,6 +7864,13 @@ cssstyle@^2.0.0: dependencies: cssom "~0.3.6" +cssstyle@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/cssstyle/-/cssstyle-2.3.0.tgz#ff665a0ddbdc31864b09647f34163443d90b0852" + integrity sha512-AZL67abkUzIuvcHqk7c09cezpGNcxUxU4Ioi/05xHk4DQeTkWmGYftIE6ctU6AEt+Gn4n1lDStOtj7FKycP71A== + dependencies: + cssom "~0.3.6" + cuint@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/cuint/-/cuint-0.2.2.tgz#408086d409550c2631155619e9fa7bcadc3b991b" @@ -7455,6 +7927,15 @@ data-urls@^1.1.0: whatwg-mimetype "^2.2.0" whatwg-url "^7.0.0" +data-urls@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b" + integrity sha512-X5eWTSXO/BJmpdIKCRuKUgSCgAN0OwliVK3yPKbwIWU1Tdw5BRajxlzMidvh+gwko9AfQ9zIj52pzF91Q3YAvQ== + dependencies: + abab "^2.0.3" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.0.0" + dateformat@1.0.11: version "1.0.11" resolved "https://registry.npmjs.org/dateformat/-/dateformat-1.0.11.tgz" @@ -7477,14 +7958,14 @@ debug@3.2.6, debug@^3.1.0, debug@^3.1.1, debug@^3.2.5, debug@^3.2.6: dependencies: ms "^2.1.1" -debug@4, debug@^4.1.0: +debug@4, debug@4.3.1, debug@^4.1.0: version "4.3.1" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== dependencies: ms "2.1.2" -debug@4.3.4: +debug@4.3.4, debug@^4.3.1: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -7663,6 +8144,14 @@ define-properties@^1.1.2, define-properties@^1.1.3: dependencies: object-keys "^1.0.12" +define-properties@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" + integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== + dependencies: + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + define-property@^0.2.5: version "0.2.5" resolved "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz" @@ -7883,6 +8372,13 @@ domexception@^1.0.1: dependencies: webidl-conversions "^4.0.2" +domexception@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/domexception/-/domexception-2.0.1.tgz#fb44aefba793e1574b0af6aed2801d057529f304" + integrity sha512-yxJ2mFy/sibVQlu5qHjOkf9J3K6zgmCxgJ94u2EdvDOV09H+32LtRswEcUsmUWN72pVLOEnTSRaIVVzVQgS0dg== + dependencies: + webidl-conversions "^5.0.0" + domhandler@^2.3.0: version "2.4.2" resolved "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz" @@ -7949,6 +8445,11 @@ dot-prop@^5.2.0: dependencies: is-obj "^2.0.0" +dotenv@^10.0.0: + version "10.0.0" + resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-10.0.0.tgz#3d4227b8fb95f81096cdd2b66653fb2c7085ba81" + integrity sha512-rlBi9d8jpv9Sf1klPjNfFAuWDjKLwTIJJ/VxtoTwIR6hnZxcEOQCZg2oIL3MWBYw5GpUDKOEnND7LXTbIpQ03Q== + dotenv@^8.2.0: version "8.2.0" resolved "https://registry.npmjs.org/dotenv/-/dotenv-8.2.0.tgz" @@ -8048,6 +8549,11 @@ electron-to-chromium@^1.3.723: resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.728.tgz" integrity sha512-SHv4ziXruBpb1Nz4aTuqEHBYi/9GNCJMYIJgDEXrp/2V01nFXMNFUTli5Z85f5ivSkioLilQatqBYFB44wNJrA== +electron-to-chromium@^1.4.188: + version "1.4.196" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.196.tgz#e18cdc5c1c2c2ebf78da237d0c374cc3b244d4cb" + integrity sha512-uxMa/Dt7PQsLBVXwH+t6JvpHJnrsYBaxWKi/J6HE+/nBtoHENhwBoNkgkm226/Kfxeg0z1eMQLBRPPKcDH8xWA== + elliptic@6.5.2, elliptic@^6.0.0, elliptic@^6.5.2: version "6.5.2" resolved "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz" @@ -8343,6 +8849,35 @@ es-abstract@^1.18.2: string.prototype.trimstart "^1.0.4" unbox-primitive "^1.0.1" +es-abstract@^1.19.0, es-abstract@^1.19.1, es-abstract@^1.19.2, es-abstract@^1.19.5: + version "1.20.1" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.20.1.tgz#027292cd6ef44bd12b1913b828116f54787d1814" + integrity sha512-WEm2oBhfoI2sImeM4OF2zE2V3BYdSF+KnSi9Sidz51fQHd7+JuF8Xgcj9/0o+OWeIeIS/MiuNnlruQrJf16GQA== + dependencies: + call-bind "^1.0.2" + es-to-primitive "^1.2.1" + function-bind "^1.1.1" + function.prototype.name "^1.1.5" + get-intrinsic "^1.1.1" + get-symbol-description "^1.0.0" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-symbols "^1.0.3" + internal-slot "^1.0.3" + is-callable "^1.2.4" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-weakref "^1.0.2" + object-inspect "^1.12.0" + object-keys "^1.1.1" + object.assign "^4.1.2" + regexp.prototype.flags "^1.4.3" + string.prototype.trimend "^1.0.5" + string.prototype.trimstart "^1.0.5" + unbox-primitive "^1.0.2" + es-get-iterator@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/es-get-iterator/-/es-get-iterator-1.1.2.tgz#9234c54aba713486d7ebde0220864af5e2b283f7" @@ -8357,6 +8892,13 @@ es-get-iterator@^1.1.1: is-string "^1.0.5" isarray "^2.0.5" +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz" @@ -8577,7 +9119,19 @@ escodegen@^1.11.1: optionalDependencies: source-map "~0.6.1" -eslint-config-airbnb-base@^14.2.1: +escodegen@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/escodegen/-/escodegen-2.0.0.tgz#5e32b12833e8aa8fa35e1bf0befa89380484c7dd" + integrity sha512-mmHKys/C8BFUGI+MAWNcSYoORYLMdPzjrknd2Vc+bUsjN5bXcr8EhrNB+UTqfL1y3I9c4fw2ihgtMPQLBRiQxw== + dependencies: + esprima "^4.0.1" + estraverse "^5.2.0" + esutils "^2.0.2" + optionator "^0.8.1" + optionalDependencies: + source-map "~0.6.1" + +eslint-config-airbnb-base@^14.0.0, eslint-config-airbnb-base@^14.2.1: version "14.2.1" resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e" integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA== @@ -8595,6 +9149,13 @@ eslint-config-airbnb@18.2.1: object.assign "^4.1.2" object.entries "^1.1.2" +eslint-config-prettier@^6.10.1: + version "6.15.0" + resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz#7f93f6cb7d45a92f1537a70ecc06366e1ac6fed9" + integrity sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw== + dependencies: + get-stdin "^6.0.0" + eslint-config-prettier@^8.3.0: version "8.3.0" resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-8.3.0.tgz#f7471b20b6fe8a9a9254cc684454202886a2dd7a" @@ -8608,6 +9169,14 @@ eslint-import-resolver-node@^0.3.4: debug "^2.6.9" resolve "^1.13.1" +eslint-import-resolver-node@^0.3.6: + version "0.3.6" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.6.tgz#4048b958395da89668252001dbd9eca6b83bacbd" + integrity sha512-0En0w03NRVMn9Uiyn8YRPDKvWjxCWkslUEhGNTdGx15RvPJYQ+lbOlqrlNI2vEAs4pDYK4f/HN2TbDmk5TP0iw== + dependencies: + debug "^3.2.7" + resolve "^1.20.0" + eslint-import-resolver-webpack@^0.12.1: version "0.12.1" resolved "https://registry.npmjs.org/eslint-import-resolver-webpack/-/eslint-import-resolver-webpack-0.12.1.tgz" @@ -8632,6 +9201,33 @@ eslint-module-utils@^2.6.1: debug "^3.2.7" pkg-dir "^2.0.0" +eslint-module-utils@^2.7.3: + version "2.7.3" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.3.tgz#ad7e3a10552fdd0642e1e55292781bd6e34876ee" + integrity sha512-088JEC7O3lDZM9xGe0RerkOMd0EjFl+Yvd1jPWIkMT5u3H9+HC34mWWPnqPrN13gieT9pBOO+Qt07Nb/6TresQ== + dependencies: + debug "^3.2.7" + find-up "^2.1.0" + +eslint-plugin-import@^2.20.0: + version "2.26.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.26.0.tgz#f812dc47be4f2b72b478a021605a59fc6fe8b88b" + integrity sha512-hYfi3FXaM8WPLf4S1cikh/r4IxnO6zrhZbEGz2b660EJRbuxgpDS5gkCuYgGWg2xxh2rBuIr4Pvhve/7c31koA== + dependencies: + array-includes "^3.1.4" + array.prototype.flat "^1.2.5" + debug "^2.6.9" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.6" + eslint-module-utils "^2.7.3" + has "^1.0.3" + is-core-module "^2.8.1" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.values "^1.1.5" + resolve "^1.22.0" + tsconfig-paths "^3.14.1" + eslint-plugin-import@^2.22.1: version "2.23.3" resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.23.3.tgz#8a1b073289fff03c4af0f04b6df956b7d463e191" @@ -8670,7 +9266,7 @@ eslint-plugin-jsx-a11y@^6.4.1: jsx-ast-utils "^3.1.0" language-tags "^1.0.5" -eslint-plugin-prettier@^3.4.0: +eslint-plugin-prettier@^3.1.2, eslint-plugin-prettier@^3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.4.1.tgz#e9ddb200efb6f3d05ffe83b1665a716af4a387e5" integrity sha512-htg25EUYUeIhKHXjOinK4BgCcDwtLHjqaxCDsMy5nbnUMkKFvIhMVCp+5GFUXQ4Nr8lBsPqtGAqBenbpFqAA2g== @@ -8731,6 +9327,13 @@ eslint-utils@^2.0.0, eslint-utils@^2.1.0: dependencies: eslint-visitor-keys "^1.1.0" +eslint-utils@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" + integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== + dependencies: + eslint-visitor-keys "^2.0.0" + eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz" @@ -8746,6 +9349,52 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== +eslint@^7.14.0: + version "7.32.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" + integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== + dependencies: + "@babel/code-frame" "7.12.11" + "@eslint/eslintrc" "^0.4.3" + "@humanwhocodes/config-array" "^0.5.0" + ajv "^6.10.0" + chalk "^4.0.0" + cross-spawn "^7.0.2" + debug "^4.0.1" + doctrine "^3.0.0" + enquirer "^2.3.5" + escape-string-regexp "^4.0.0" + eslint-scope "^5.1.1" + eslint-utils "^2.1.0" + eslint-visitor-keys "^2.0.0" + espree "^7.3.1" + esquery "^1.4.0" + esutils "^2.0.2" + fast-deep-equal "^3.1.3" + file-entry-cache "^6.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.1.2" + globals "^13.6.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.4.1" + lodash.merge "^4.6.2" + minimatch "^3.0.4" + natural-compare "^1.4.0" + optionator "^0.9.1" + progress "^2.0.0" + regexpp "^3.1.0" + semver "^7.2.1" + strip-ansi "^6.0.0" + strip-json-comments "^3.1.0" + table "^6.0.9" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + eslint@^7.2.0: version "7.27.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.27.0.tgz#665a1506d8f95655c9274d84bd78f7166b07e9c7" @@ -9401,6 +10050,13 @@ execall@^2.0.0: dependencies: clone-regexp "^2.1.0" +executioner@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/executioner/-/executioner-2.0.1.tgz#add328e03bc45dd598f358fbb529fc0be0ec6fcd" + integrity sha512-idZAlKsxEZASjaIqP4PQ1txyS1bOcDwWCHy/8p5oMmLGV0XNCQPD6WWAOwJCUVsWItWzAN2BEash5N78PliaIw== + dependencies: + mixly "^1.0.0" + exit-on-epipe@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/exit-on-epipe/-/exit-on-epipe-1.0.1.tgz#0bdd92e87d5285d267daa8171d0eb06159689692" @@ -9636,6 +10292,17 @@ fast-glob@^3.1.1: micromatch "^4.0.2" picomatch "^2.2.1" +fast-glob@^3.2.9: + version "3.2.11" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.11.tgz#a1172ad95ceb8a16e20caa5c5e56480e5129c1d9" + integrity sha512-xrO3+1bxSo3ZVHAnqzyuewYT6aMFHRAd4Kcs92MAonjwQZLsK9d0SF1IyQ3k5PoirxTW0Oe/RqFgMQ6TcNE5Ew== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -10088,16 +10755,36 @@ fsevents@~2.3.1, fsevents@~2.3.2: resolved "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== +fulcon@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/fulcon/-/fulcon-1.0.2.tgz#8a4dfda4c73fcd9cc62a79d5045c392b45547320" + integrity sha512-vYwUBqbdo9XK0NmN7cFmURmy2T1YHpEsTCbxGO3aErxx6a0Z/HkWXcqcPkk7yOuJ74mSAHGWGBSBBd6v3GKebA== + function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== +function.prototype.name@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.5.tgz#cce0505fe1ffb80503e6f9e46cc64e46a12a9621" + integrity sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.0" + functions-have-names "^1.2.2" + functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= +functions-have-names@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + ganache-cli@^6.9.1: version "6.9.1" resolved "https://registry.npmjs.org/ganache-cli/-/ganache-cli-6.9.1.tgz" @@ -10197,6 +10884,11 @@ get-stdin@^4.0.1: resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz" integrity sha1-uWjGsKBDhDJJAui/Gl3zJXmkUP4= +get-stdin@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" + integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== + get-stream@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz" @@ -10216,6 +10908,14 @@ get-stream@^5.1.0: dependencies: pump "^3.0.0" +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz" @@ -10243,7 +10943,7 @@ glob-parent@^5.0.0: dependencies: is-glob "^4.0.1" -glob-parent@^5.1.0, glob-parent@~5.1.0, glob-parent@~5.1.2: +glob-parent@^5.1.0, glob-parent@^5.1.2, glob-parent@~5.1.0, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== @@ -10267,10 +10967,10 @@ glob@7.1.3: once "^1.3.0" path-is-absolute "^1.0.0" -glob@7.2.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== +glob@7.1.6, glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.4, glob@^7.1.6, glob@~7.1.1: + version "7.1.6" + resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz" + integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -10279,10 +10979,10 @@ glob@7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.4, glob@^7.1.6, glob@~7.1.1: - version "7.1.6" - resolved "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== +glob@7.2.0: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" @@ -10291,7 +10991,7 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.1.1, glob@^7.1.2, glob@^7.1.4, glob@^7.1.6, gl once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.1.3: +glob@^7.0.5, glob@^7.1.3: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== @@ -10381,6 +11081,13 @@ globals@^13.6.0: dependencies: type-fest "^0.20.2" +globals@^13.9.0: + version "13.17.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.17.0.tgz#902eb1e680a41da93945adbdcb5a9f361ba69bd4" + integrity sha512-1C+6nQRb1GwGMKm2dH/E7enFAMxGTmGI7/dEdhy/DNelv85w9B72t3uc5frtMNXIbzrarJJ/lTCjcaZwbLJmyw== + dependencies: + type-fest "^0.20.2" + globalthis@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.2.tgz#2a235d34f4d8036219f7e34929b5de9e18166b8b" @@ -10400,6 +11107,18 @@ globby@^11.0.1: merge2 "^1.3.0" slash "^3.0.0" +globby@^11.0.3: + version "11.1.0" + resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" + integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== + dependencies: + array-union "^2.1.0" + dir-glob "^3.0.1" + fast-glob "^3.2.9" + ignore "^5.2.0" + merge2 "^1.4.1" + slash "^3.0.0" + globby@^6.1.0: version "6.1.0" resolved "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz" @@ -10584,7 +11303,7 @@ hardhat-typechain@^0.3.5: resolved "https://registry.yarnpkg.com/hardhat-typechain/-/hardhat-typechain-0.3.5.tgz#8e50616a9da348b33bd001168c8fda9c66b7b4af" integrity sha512-w9lm8sxqTJACY+V7vijiH+NkPExnmtiQEjsV9JKD1KgMdVk2q8y+RhvU/c4B7+7b1+HylRUCxpOIvFuB3rE4+w== -hardhat@^2.3.0: +hardhat@^2.3.0, hardhat@^2.6.4: version "2.10.1" resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.10.1.tgz#37fdc0c96d6a5d16b322269db2ad8f9f115c4046" integrity sha512-0FN9TyCtn7Lt25SB2ei2G7nA2rZjP+RN6MvFOm+zYwherxLZNo6RbD8nDz88eCbhRapevmXqOiL2nM8INKsjmA== @@ -10650,6 +11369,11 @@ has-bigints@^1.0.1: resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== +has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + has-cors@1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/has-cors/-/has-cors-1.1.0.tgz#5e474793f7ea9843d1bb99c23eef49ff126fff39" @@ -10665,6 +11389,13 @@ has-flag@^4.0.0: resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + has-symbol-support-x@^1.4.1: version "1.4.2" resolved "https://registry.npmjs.org/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz" @@ -10680,6 +11411,11 @@ has-symbols@^1.0.1: resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz" integrity sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg== +has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + has-to-string-tag-x@^1.2.0: version "1.4.1" resolved "https://registry.npmjs.org/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz" @@ -10687,6 +11423,13 @@ has-to-string-tag-x@^1.2.0: dependencies: has-symbol-support-x "^1.4.1" +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-unicode@^2.0.0, has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" @@ -10835,6 +11578,13 @@ html-encoding-sniffer@^1.0.2: dependencies: whatwg-encoding "^1.0.1" +html-encoding-sniffer@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/html-encoding-sniffer/-/html-encoding-sniffer-2.0.1.tgz#42a6dc4fd33f00281176e8b23759ca4e4fa185f3" + integrity sha512-D5JbOMBIR/TVZkubHT+OyT2705QvogUW4IBn6nHd756OwieSF9aDYFj4dv6HHEVGYbHaLETa3WggZYWWMyy3ZQ== + dependencies: + whatwg-encoding "^1.0.5" + html-entities@^1.2.0, html-entities@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/html-entities/-/html-entities-1.2.1.tgz" @@ -10994,6 +11744,15 @@ http-https@^1.0.0: resolved "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.4.10.tgz" integrity sha1-ksnBN0w1CF912zWexWzCV8u5P6Q= +http-proxy-agent@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-4.0.1.tgz#8a8c8ef7f5932ccf953c296ca8291b95aa74aa3a" + integrity sha512-k0zdNgqWTGA6aeIRVpvfVob4fL52dTfaehylg0Y4UvSySvOq/Y+BOyPrgpUrA7HylqvU8vIZGsRuXmspskV0Tg== + dependencies: + "@tootallnate/once" "1" + agent-base "6" + debug "4" + http-proxy-middleware@0.19.1: version "0.19.1" resolved "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz" @@ -11120,6 +11879,11 @@ ignore@^5.1.4: resolved "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz" integrity sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A== +ignore@^5.1.8, ignore@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" + integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== + immediate@^3.2.3: version "3.3.0" resolved "https://registry.npmjs.org/immediate/-/immediate-3.3.0.tgz" @@ -11252,6 +12016,14 @@ ini@^1.3.4, ini@^1.3.5, ini@~1.3.0: resolved "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz" integrity sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw== +install-peers-cli@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/install-peers-cli/-/install-peers-cli-2.2.0.tgz#f76f1ec8ac9fa7f920c05743e011554edad85f8d" + integrity sha512-scSNvF49HDOLNm2xLFwST23g/OvfsceiA087bcGBgZP/ZNCrvpSaCn5IrWNZ2XYmFFykXF/6J1Zgm+D/JgRgtA== + dependencies: + commander "^2.20.0" + executioner "^2.0.1" + internal-ip@^4.3.0: version "4.3.0" resolved "https://registry.npmjs.org/internal-ip/-/internal-ip-4.3.0.tgz" @@ -11416,6 +12188,11 @@ is-callable@^1.1.5, is-callable@^1.2.3: resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== +is-callable@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.4.tgz#47301d58dd0259407865547853df6d61fe471945" + integrity sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w== + is-ci@^1.0.10: version "1.2.1" resolved "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz" @@ -11449,6 +12226,13 @@ is-core-module@^2.4.0: dependencies: has "^1.0.3" +is-core-module@^2.8.1, is-core-module@^2.9.0: + version "2.9.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" + integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== + dependencies: + has "^1.0.3" + is-data-descriptor@^0.1.4: version "0.1.4" resolved "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz" @@ -11564,6 +12348,13 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-hex-prefixed@1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz" @@ -11606,6 +12397,11 @@ is-negative-zero@^2.0.1: resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + is-npm@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz" @@ -11686,6 +12482,11 @@ is-plain-object@^2.0.3, is-plain-object@^2.0.4: dependencies: isobject "^3.0.1" +is-potential-custom-element-name@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5" + integrity sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ== + is-promise@^2.1: version "2.1.0" resolved "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz" @@ -11711,6 +12512,14 @@ is-regex@^1.0.5, is-regex@^1.1.1, is-regex@^1.1.3: call-bind "^1.0.2" has-symbols "^1.0.2" +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-regexp@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/is-regexp/-/is-regexp-2.1.0.tgz" @@ -11731,6 +12540,13 @@ is-set@^2.0.1, is-set@^2.0.2: resolved "https://registry.npmjs.org/is-set/-/is-set-2.0.2.tgz" integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + is-stream@^1.0.0, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz" @@ -11751,6 +12567,13 @@ is-string@^1.0.6: resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== +is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + is-svg@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz" @@ -11803,6 +12626,13 @@ is-weakmap@^2.0.1: resolved "https://registry.npmjs.org/is-weakmap/-/is-weakmap-2.0.1.tgz" integrity sha512-NSBR4kH5oVj1Uwvv970ruUkCV7O1mzgVFO4/rev2cLRda9Tm9HrL70ZPut4rOHgY0FNrUu9BCbXA2sdQ+x0chA== +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + is-weakset@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.1.tgz" @@ -12088,6 +12918,13 @@ js-yaml@3.13.1, js-yaml@^3.13.1: argparse "^1.0.7" esprima "^4.0.0" +js-yaml@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" + integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== + dependencies: + argparse "^2.0.1" + js-yaml@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" @@ -12142,6 +12979,39 @@ jsdom@^15.0.0: ws "^7.0.0" xml-name-validator "^3.0.0" +jsdom@^16.2.2: + version "16.7.0" + resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-16.7.0.tgz#918ae71965424b197c819f8183a754e18977b710" + integrity sha512-u9Smc2G1USStM+s/x1ru5Sxrl6mPYCbByG1U/hUmqaVsm4tbNyS7CicOSRyuGQYZhTu0h84qkZZQ/I+dzizSVw== + dependencies: + abab "^2.0.5" + acorn "^8.2.4" + acorn-globals "^6.0.0" + cssom "^0.4.4" + cssstyle "^2.3.0" + data-urls "^2.0.0" + decimal.js "^10.2.1" + domexception "^2.0.1" + escodegen "^2.0.0" + form-data "^3.0.0" + html-encoding-sniffer "^2.0.1" + http-proxy-agent "^4.0.1" + https-proxy-agent "^5.0.0" + is-potential-custom-element-name "^1.0.1" + nwsapi "^2.2.0" + parse5 "6.0.1" + saxes "^5.0.1" + symbol-tree "^3.2.4" + tough-cookie "^4.0.0" + w3c-hr-time "^1.0.2" + w3c-xmlserializer "^2.0.0" + webidl-conversions "^6.1.0" + whatwg-encoding "^1.0.5" + whatwg-mimetype "^2.3.0" + whatwg-url "^8.5.0" + ws "^7.4.6" + xml-name-validator "^3.0.0" + jsesc@^2.5.1: version "2.5.2" resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" @@ -12246,6 +13116,11 @@ json5@^2.1.2: dependencies: minimist "^1.2.5" +json5@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" + integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== + jsonfile@^2.1.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" @@ -12797,7 +13672,7 @@ lodash.uniq@^4.5.0: resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@^4.0.0, lodash@^4.15.0, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.5, lodash@~4.17.12: +lodash@^4.0.0, lodash@^4.15.0, lodash@^4.17.11, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.5, lodash@^4.7.0, lodash@~4.17.12: version "4.17.21" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -12809,6 +13684,13 @@ log-symbols@2.2.0, log-symbols@^2.2.0: dependencies: chalk "^2.0.1" +log-symbols@4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" + integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== + dependencies: + chalk "^4.0.0" + log-symbols@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" @@ -13177,7 +14059,7 @@ merge2@^1.2.3: resolved "https://registry.npmjs.org/merge2/-/merge2-1.3.0.tgz" integrity sha512-2j4DAdlBOkiSZIsaXk4mTE3sRS02yBHAtfy127xRV3bQUFqXkjHCHLW6Scv7DwNRbIWNHH8zpnz9zMaKXIdvYw== -merge2@^1.3.0: +merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== @@ -13240,6 +14122,14 @@ micromatch@^4.0.2: braces "^3.0.1" picomatch "^2.0.5" +micromatch@^4.0.4: + version "4.0.5" + resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.5.tgz#bc8999a7cbbf77cdc89f132f6e467051b49090c6" + integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== + dependencies: + braces "^3.0.2" + picomatch "^2.3.1" + miller-rabin@^4.0.0: version "4.0.1" resolved "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz" @@ -13330,7 +14220,7 @@ minimatch@5.0.1: dependencies: brace-expansion "^2.0.1" -minimatch@^3.0.4, minimatch@^3.1.1: +minimatch@^3.0.3, minimatch@^3.0.4, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -13373,6 +14263,11 @@ minimist@^1.2.0, minimist@^1.2.5: resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== +minimist@^1.2.6: + version "1.2.6" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" + integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== + minipass@^2.6.0, minipass@^2.9.0: version "2.9.0" resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" @@ -13467,6 +14362,13 @@ mixin-deep@^1.2.0: for-in "^1.0.2" is-extendable "^1.0.1" +mixly@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/mixly/-/mixly-1.0.0.tgz#9b5a2e1f63e6dfba0d30e6797ffae62ab1dc24ef" + integrity sha512-ks+xIMVeIDwuYK4LnOMXTfmiEI8oo3tFNFirpHd60C4r2H0wMwKN5/qHCrFBKFK+BYx2Gp7qs+evUJw7QO9D2w== + dependencies: + fulcon "^1.0.1" + mixpanel-browser@^2.45.0: version "2.45.0" resolved "https://registry.yarnpkg.com/mixpanel-browser/-/mixpanel-browser-2.45.0.tgz#a2973be5b66e6d2799ef95a1e55b8ad8eede57e8" @@ -13486,7 +14388,7 @@ mkdirp-promise@^5.0.1: dependencies: mkdirp "*" -mkdirp@*, mkdirp@^1.0.3: +mkdirp@*, mkdirp@^1.0.3, mkdirp@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== @@ -13569,6 +14471,37 @@ mocha@^6.2.2: yargs-parser "13.1.1" yargs-unparser "1.6.0" +mocha@^8.2.1: + version "8.4.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.4.0.tgz#677be88bf15980a3cae03a73e10a0fc3997f0cff" + integrity sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ== + dependencies: + "@ungap/promise-all-settled" "1.1.2" + ansi-colors "4.1.1" + browser-stdout "1.3.1" + chokidar "3.5.1" + debug "4.3.1" + diff "5.0.0" + escape-string-regexp "4.0.0" + find-up "5.0.0" + glob "7.1.6" + growl "1.10.5" + he "1.2.0" + js-yaml "4.0.0" + log-symbols "4.0.0" + minimatch "3.0.4" + ms "2.1.3" + nanoid "3.1.20" + serialize-javascript "5.0.1" + strip-json-comments "3.1.1" + supports-color "8.1.1" + which "2.0.2" + wide-align "1.1.3" + workerpool "6.1.0" + yargs "16.2.0" + yargs-parser "20.2.4" + yargs-unparser "2.0.0" + mock-fs@^4.1.0: version "4.11.0" resolved "https://registry.npmjs.org/mock-fs/-/mock-fs-4.11.0.tgz" @@ -13720,6 +14653,11 @@ nano-json-stream-parser@^0.1.2: resolved "https://registry.npmjs.org/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz" integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= +nanoid@3.1.20: + version "3.1.20" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" + integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== + nanoid@3.3.3: version "3.3.3" resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.3.tgz#fd8e8b7aa761fe807dba2d1b98fb7241bb724a25" @@ -13933,6 +14871,11 @@ node-releases@^1.1.50, node-releases@^1.1.71: resolved "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz" integrity sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg== +node-releases@^2.0.6: + version "2.0.6" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503" + integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== + node-sass@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/node-sass/-/node-sass-5.0.0.tgz" @@ -13976,6 +14919,14 @@ nodemon@^1.18.10: undefsafe "^2.0.2" update-notifier "^2.5.0" +noms@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859" + integrity sha512-lNDU9VJaOPxUmXcLb+HQFeUgQQPtMI24Gt6hgfuMHRJgMRHMF/qZ4HJD3GDru4sSw9IQl2jPjAYnQrdIeLbwow== + dependencies: + inherits "^2.0.1" + readable-stream "~1.0.31" + nopt@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz" @@ -14176,6 +15127,11 @@ object-inspect@^1.10.3, object-inspect@^1.9.0: resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== +object-inspect@^1.12.0: + version "1.12.2" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea" + integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ== + object-inspect@^1.7.0: version "1.8.0" resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz" @@ -14287,6 +15243,15 @@ object.values@^1.1.3: define-properties "^1.1.3" es-abstract "^1.18.2" +object.values@^1.1.5: + version "1.1.5" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.5.tgz#959f63e3ce9ef108720333082131e4a459b716ac" + integrity sha512-QUZRW0ilQ3PnPpbNtgdNV1PDbEqLIiSFB3l+EnGtBQ/8SUTLj1PZwtQHABZtLgwpJZTSZhuGLOGk57Drx2IvYg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + es-abstract "^1.19.1" + obliterator@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/obliterator/-/obliterator-2.0.4.tgz#fa650e019b2d075d745e44f1effeb13a2adbe816" @@ -14676,6 +15641,11 @@ parse5@5.1.0: resolved "https://registry.npmjs.org/parse5/-/parse5-5.1.0.tgz" integrity sha512-fxNG2sQjHvlVAYmzBZS9YlDp6PTSSDwa98vkD4QgVDDCAo84z5X1t5XyJQ62ImdLXx5NdIIfihey6xpum9/gRQ== +parse5@6.0.1: + version "6.0.1" + resolved "https://registry.yarnpkg.com/parse5/-/parse5-6.0.1.tgz#e1a1c085c569b3dc08321184f19a39cc27f7c30b" + integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== + parse5@^3.0.1: version "3.0.3" resolved "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz" @@ -14822,7 +15792,7 @@ path-key@^3.1.0: resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6: +path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -14975,6 +15945,11 @@ pgpass@1.x: dependencies: split "^1.0.0" +picocolors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" + integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== + picomatch@^2.0.4, picomatch@^2.2.1: version "2.2.3" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.3.tgz" @@ -14985,6 +15960,11 @@ picomatch@^2.0.5: resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.1.tgz" integrity sha512-ISBaA8xQNmwELC7eOjqFKMESB2VIqt4PPDD0nsS95b/9dZXvVKOlz9keMSnoGGKcOHXfTvDD6WMaRoSc9UuhRA== +picomatch@^2.3.1: + version "2.3.1" + resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" + integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== + pify@^2.0.0, pify@^2.3.0: version "2.3.0" resolved "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz" @@ -15024,6 +16004,11 @@ pirates@^4.0.0: dependencies: node-modules-regexp "^1.0.0" +pirates@^4.0.5: + version "4.0.5" + resolved "https://registry.yarnpkg.com/pirates/-/pirates-4.0.5.tgz#feec352ea5c3268fb23a37c702ab1699f35a5f3b" + integrity sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ== + pkg-dir@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz" @@ -15869,6 +16854,11 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" +prettier@2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.2.tgz#1ba8f3eb92231e769b7fcd7cb73ae1b6b74ade08" + integrity sha512-5xJQIPT8BraI7ZnaDwSbu5zLrB6vvi8hVV58yHQ+QK64qrY40dULy0HSRlQ2/2IdzeBpjhDkqdcFBnFeDEMVdg== + prettier@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c" @@ -16014,6 +17004,11 @@ psl@^1.1.28: resolved "https://registry.npmjs.org/psl/-/psl-1.7.0.tgz" integrity sha512-5NsSEDv8zY70ScRnOTn7bK7eanl2MvFrOrS/R6x+dBt5g1ghnj9Zv90kO8GwT8gxcu2ANyFprnFYB85IogIJOQ== +psl@^1.1.33: + version "1.9.0" + resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" + integrity sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag== + pstree.remy@^1.1.7: version "1.1.7" resolved "https://registry.npmjs.org/pstree.remy/-/pstree.remy-1.1.7.tgz" @@ -16424,7 +17419,7 @@ readable-stream@^3.0.6, readable-stream@^3.1.0, readable-stream@^3.1.1, readable string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@~1.0.15: +readable-stream@~1.0.15, readable-stream@~1.0.31: version "1.0.34" resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz" integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= @@ -16558,6 +17553,15 @@ regexp.prototype.flags@^1.3.1: call-bind "^1.0.2" define-properties "^1.1.3" +regexp.prototype.flags@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" + integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.3" + functions-have-names "^1.2.2" + regexpp@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz" @@ -16843,6 +17847,15 @@ resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.5.0, resolve@^1.8. dependencies: path-parse "^1.0.6" +resolve@^1.22.0: + version "1.22.1" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" + integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== + dependencies: + is-core-module "^2.9.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + resolve@^2.0.0-next.3: version "2.0.0-next.3" resolved "https://registry.yarnpkg.com/resolve/-/resolve-2.0.0-next.3.tgz#d41016293d4a8586a39ca5d9b5f15cbea1f55e46" @@ -17087,6 +18100,13 @@ saxes@^3.1.9: dependencies: xmlchars "^2.1.1" +saxes@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/saxes/-/saxes-5.0.1.tgz#eebab953fa3b7608dbe94e5dadb15c888fa6696d" + integrity sha512-5LBh1Tls8c9xgGjw3QrMwETmTMVk0oFgvrFSvWx62llR2hcEInrKNZ2GZCCuuy2lvWrdl5jhbpeqc5hRYKFOcw== + dependencies: + xmlchars "^2.2.0" + schema-utils@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz" @@ -17317,6 +18337,13 @@ sequelize@^6.16.1: validator "^13.7.0" wkx "^0.5.0" +serialize-javascript@5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" + integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== + dependencies: + randombytes "^2.1.0" + serialize-javascript@6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8" @@ -17444,6 +18471,13 @@ sha3@~2.1.0: dependencies: buffer "6.0.3" +shallow-clone@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/shallow-clone/-/shallow-clone-3.0.1.tgz#8f2981ad92531f55035b01fb230769a40e02efa3" + integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== + dependencies: + kind-of "^6.0.2" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz" @@ -17713,6 +18747,14 @@ source-map-support@^0.5.13, source-map-support@^0.5.16, source-map-support@^0.5. buffer-from "^1.0.0" source-map "^0.6.0" +source-map-support@^0.5.17: + version "0.5.21" + resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f" + integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== + dependencies: + buffer-from "^1.0.0" + source-map "^0.6.0" + source-map-url@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz" @@ -18075,6 +19117,15 @@ string.prototype.trimend@^1.0.3, string.prototype.trimend@^1.0.4: call-bind "^1.0.2" define-properties "^1.1.3" +string.prototype.trimend@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.5.tgz#914a65baaab25fbdd4ee291ca7dde57e869cb8d0" + integrity sha512-I7RGvmjV4pJ7O3kdf+LXFpVfdNOxtCW/2C8f6jNiW4+PQchwxkCDzlk1/7p+Wl4bqFIZeF47qAHXLuHHWKAxog== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + string.prototype.trimleft@^2.1.1: version "2.1.3" resolved "https://registry.yarnpkg.com/string.prototype.trimleft/-/string.prototype.trimleft-2.1.3.tgz#dee305118117d0a1843c1fc0d38d5d0754d83c60" @@ -18109,6 +19160,15 @@ string.prototype.trimstart@^1.0.3, string.prototype.trimstart@^1.0.4: call-bind "^1.0.2" define-properties "^1.1.3" +string.prototype.trimstart@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.5.tgz#5466d93ba58cfa2134839f81d7f42437e8c01fef" + integrity sha512-THx16TJCGlsN0o6dl2o6ncWUsdgnLRSA23rRE5pyGBw/mLr3Ej/R2LaqCtgP8VNMGZsvMWnf9ooZPyY2bHvUFg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + es-abstract "^1.19.5" + string_decoder@^1.0.0, string_decoder@^1.1.1: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -18409,6 +19469,11 @@ supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + svg-tags@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/svg-tags/-/svg-tags-1.0.0.tgz" @@ -18460,7 +19525,7 @@ symbol-observable@^4.0.0: resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-4.0.0.tgz#5b425f192279e87f2f9b937ac8540d1984b39205" integrity sha512-b19dMThMV4HVFynSAM1++gBHAbk2Tc/osgLIBZMKsyqh34jb2e8Os7T6ZW/Bt3pJFdBTd2JwAnAAEQV7rSNvcQ== -symbol-tree@^3.2.2: +symbol-tree@^3.2.2, symbol-tree@^3.2.4: version "3.2.4" resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz" integrity sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw== @@ -18635,7 +19700,7 @@ throttled-queue@^1.0.7: resolved "https://registry.npmjs.org/throttled-queue/-/throttled-queue-1.0.7.tgz" integrity sha512-/HT49S7m+NvdyJMoMRzIYlawKjeHn8jEc8TZaGmFi5IBu09hIiU/QoP1zcrB9X2qsVC11PgfRfqd8zEQs7PlEA== -through2@^2.0.0: +through2@^2.0.0, through2@^2.0.1: version "2.0.5" resolved "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -18816,6 +19881,15 @@ tough-cookie@^3.0.1: psl "^1.1.28" punycode "^2.1.1" +tough-cookie@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-4.0.0.tgz#d822234eeca882f991f0f908824ad2622ddbece4" + integrity sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg== + dependencies: + psl "^1.1.33" + punycode "^2.1.1" + universalify "^0.1.2" + tr46@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz" @@ -18823,6 +19897,13 @@ tr46@^1.0.1: dependencies: punycode "^2.1.0" +tr46@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tr46/-/tr46-2.1.0.tgz#fa87aa81ca5d5941da8cbf1f9b749dc969a4e240" + integrity sha512-15Ih7phfcdP5YxqiB+iDtLoaTz4Nd35+IiAv0kQ5FNKHzXgdWqPoTIqEDDJmXceQt4JZk6lVPT8lnDlPpGDppw== + dependencies: + punycode "^2.1.1" + tr46@~0.0.3: version "0.0.3" resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" @@ -18925,6 +20006,15 @@ ts-mocha@^6.0.0: optionalDependencies: tsconfig-paths "^3.5.0" +ts-mocha@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/ts-mocha/-/ts-mocha-8.0.0.tgz#962d0fa12eeb6468aa1a6b594bb3bbc818da3ef0" + integrity sha512-Kou1yxTlubLnD5C3unlCVO7nh0HERTezjoVhVw/M5S1SqoUec0WgllQvPk3vzPMc6by8m6xD1uR1yRf8lnVUbA== + dependencies: + ts-node "7.0.1" + optionalDependencies: + tsconfig-paths "^3.5.0" + ts-node@7.0.1: version "7.0.1" resolved "https://registry.npmjs.org/ts-node/-/ts-node-7.0.1.tgz" @@ -18939,6 +20029,17 @@ ts-node@7.0.1: source-map-support "^0.5.6" yn "^2.0.0" +ts-node@^8.10.2: + version "8.10.2" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-8.10.2.tgz#eee03764633b1234ddd37f8db9ec10b75ec7fb8d" + integrity sha512-ISJJGgkIpDdBhWVu3jufsWpK3Rzo7bdiIXJjQc0ynKxVOVcg2oIrf2H2cejminGrptVc6q6/uynAHNCuWGbpVA== + dependencies: + arg "^4.1.0" + diff "^4.0.1" + make-error "^1.1.1" + source-map-support "^0.5.17" + yn "3.1.1" + ts-node@^8.6.2: version "8.8.1" resolved "https://registry.npmjs.org/ts-node/-/ts-node-8.8.1.tgz" @@ -18950,6 +20051,16 @@ ts-node@^8.6.2: source-map-support "^0.5.6" yn "3.1.1" +tsconfig-paths@^3.14.1: + version "3.14.1" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.1.tgz#ba0734599e8ea36c862798e920bcf163277b137a" + integrity sha512-fxDhWnFSLt3VuTwtvJt5fpwxBHg5AdKWMsgcPOOIilyjymcYVZoCQF8fvFRezCNfblEXmi+PcM1eYHeOAgXCOQ== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.1" + minimist "^1.2.6" + strip-bom "^3.0.0" + tsconfig-paths@^3.5.0, tsconfig-paths@^3.8.0, tsconfig-paths@^3.9.0: version "3.9.0" resolved "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.9.0.tgz" @@ -19028,6 +20139,13 @@ tsutils@^3.17.1: dependencies: tslib "^1.8.1" +tsutils@^3.21.0: + version "3.21.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" + integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== + dependencies: + tslib "^1.8.1" + tty-browserify@0.0.0: version "0.0.0" resolved "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz" @@ -19169,6 +20287,11 @@ typescript@4.3.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.3.4.tgz#3f85b986945bcf31071decdd96cf8bfa65f9dcbc" integrity sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew== +typescript@^4.3.4: + version "4.7.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235" + integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ== + typical@^2.6.0, typical@^2.6.1: version "2.6.1" resolved "https://registry.npmjs.org/typical/-/typical-2.6.1.tgz" @@ -19218,6 +20341,16 @@ unbox-primitive@^1.0.1: has-symbols "^1.0.2" which-boxed-primitive "^1.0.2" +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + undefsafe@^2.0.2: version "2.0.3" resolved "https://registry.npmjs.org/undefsafe/-/undefsafe-2.0.3.tgz" @@ -19366,7 +20499,7 @@ unist-util-visit@^1.1.0: dependencies: unist-util-visit-parents "^2.0.0" -universalify@^0.1.0: +universalify@^0.1.0, universalify@^0.1.2: version "0.1.2" resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== @@ -19394,6 +20527,11 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== + unzip-response@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz" @@ -19404,6 +20542,14 @@ upath@^1.1.1: resolved "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz" integrity sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg== +update-browserslist-db@^1.0.4: + version "1.0.5" + resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz#be06a5eedd62f107b7c19eb5bcefb194411abf38" + integrity sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + update-notifier@^2.5.0: version "2.5.0" resolved "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz" @@ -19691,7 +20837,7 @@ vm-browserify@^1.0.1: resolved "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz" integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== -w3c-hr-time@^1.0.1: +w3c-hr-time@^1.0.1, w3c-hr-time@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz" integrity sha512-z8P5DvDNjKDoFIHK7q8r8lackT6l+jo/Ye3HOle7l9nICP9lf1Ci25fy9vHd0JOWewkIFzXIEig3TdKT7JQ5fQ== @@ -19707,6 +20853,13 @@ w3c-xmlserializer@^1.1.2: webidl-conversions "^4.0.2" xml-name-validator "^3.0.0" +w3c-xmlserializer@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/w3c-xmlserializer/-/w3c-xmlserializer-2.0.0.tgz#3e7104a05b75146cc60f564380b7f683acf1020a" + integrity sha512-4tzD0mF8iSiMiNs30BiLO3EpfGLZUT2MSX/G+o7ZywDzliWQ3OPtTZ0PTC3B3ca1UAf4cJMHB+2Bf56EriJuRA== + dependencies: + xml-name-validator "^3.0.0" + watchpack-chokidar2@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/watchpack-chokidar2/-/watchpack-chokidar2-2.0.1.tgz" @@ -19999,6 +21152,16 @@ webidl-conversions@^4.0.2: resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz" integrity sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg== +webidl-conversions@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff" + integrity sha512-VlZwKPCkYKxQgeSbH5EyngOmRp7Ww7I9rQLERETtf5ofd9pGeswWiOtogpEO850jziPRarreGxn5QIiTqpb2wA== + +webidl-conversions@^6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-6.1.0.tgz#9111b4d7ea80acd40f5270d666621afa78b69514" + integrity sha512-qBIvFLGiBpLjfwmYAaHPXsn+ho5xZnGvyGvsarywGNc8VyQJUMHJ8OBKGGrPER0okBeMDaan4mNBlgBROxuI8w== + webpack-bundle-analyzer@^4.4.0: version "4.4.0" resolved "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.0.tgz" @@ -20216,6 +21379,15 @@ whatwg-url@^7.0.0: tr46 "^1.0.1" webidl-conversions "^4.0.2" +whatwg-url@^8.0.0, whatwg-url@^8.5.0: + version "8.7.0" + resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.7.0.tgz#656a78e510ff8f3937bc0bcbe9f5c0ac35941b77" + integrity sha512-gAojqb/m9Q8a5IV96E3fHJM70AzCkgt4uXYX2O7EmuyOnLrViCQlsEBmF9UQIu3/aeAIp2U17rtbpZWNntQqdg== + dependencies: + lodash "^4.7.0" + tr46 "^2.1.0" + webidl-conversions "^6.1.0" + which-boxed-primitive@^1.0.1, which-boxed-primitive@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" @@ -20262,7 +21434,7 @@ which@1.3.1, which@^1.2.14, which@^1.2.9, which@^1.3.1: dependencies: isexe "^2.0.0" -which@^2.0.1, which@^2.0.2: +which@2.0.2, which@^2.0.1, which@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== @@ -20316,6 +21488,11 @@ worker-farm@^1.7.0: dependencies: errno "~0.1.7" +workerpool@6.1.0: + version "6.1.0" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" + integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== + workerpool@6.2.1: version "6.2.1" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" @@ -20510,7 +21687,7 @@ xmlbuilder@~9.0.1: resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz" integrity sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0= -xmlchars@^2.1.1: +xmlchars@^2.1.1, xmlchars@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/xmlchars/-/xmlchars-2.2.0.tgz" integrity sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw== @@ -20723,7 +21900,7 @@ yargs@13.3.0, yargs@^13.1.0, yargs@^13.3.0: y18n "^4.0.0" yargs-parser "^13.1.1" -yargs@16.2.0: +yargs@16.2.0, yargs@^16.1.0: version "16.2.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==