{"id":371429,"date":"2024-05-21T04:48:44","date_gmt":"2024-05-21T04:48:44","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=371429"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2024-05-21T04:48:44","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=371429","title":{"rendered":"<span>\u041a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0432\u043e\u0439 DAO \u0441 \u0431\u043b\u044d\u043a\u0434\u0436\u0435\u043a\u043e\u043c \u0438 OpenZeppelin?<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ba4\/297\/13a\/ba429713ab2fbd306396fc408d585411.png\" width=\"780\" height=\"440\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ba4\/297\/13a\/ba429713ab2fbd306396fc408d585411.png\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0442\u0435\u043c\u0443 DAO. \u0420\u0430\u043d\u043d\u0435\u0435 \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438 \u0441\u0430\u043c\u0443 <a href=\"https:\/\/habr.com\/ru\/companies\/metalamp\/articles\/798339\/\">\u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e<\/a>, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0440\u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u0435!<\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043f\u043e \u043a\u043e\u0441\u0442\u043e\u0447\u043a\u0430\u043c \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043a\u043e\u0440\u043e\u043b\u044f Web3 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u2014 OpenZeppelin. \u041e\u043d\u0438 \u043f\u0440\u043e\u0448\u043b\u0438 \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0430\u0443\u0434\u0438\u0442\u044b \u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043e\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0423\u043c\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c governance \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043e\u0442 OpenZeppelin \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<blockquote>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/tree\/v5.0.0\/contracts\/governance\"><u>\u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b<\/u><\/a>\u00a0OpenZeppelin \u0432\u0435\u0440\u0441\u0438\u0438 5.0.0.<\/p>\n<\/blockquote>\n<p>\u0414\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432\u00a0<strong>governance<\/strong>\u00a0\u043e\u0442 OpenZeppelin \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0431\u044b\u043b\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0<a href=\"https:\/\/compound.finance\/\"><u>Compound<\/u><\/a>:\u00a0<a href=\"https:\/\/github.com\/compound-finance\/compound-protocol\/blob\/master\/contracts\/Governance\/GovernorAlpha.sol\"><u>GovernorAlpha<\/u><\/a>,\u00a0<a href=\"https:\/\/github.com\/compound-finance\/compound-protocol\/blob\/master\/contracts\/Governance\/GovernorBravoDelegator.sol\"><u>GovernorBravo<\/u><\/a>. \u0414\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438, \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u043a\u043e\u0434 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<\/p>\n<p>OpenZeppelin \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u043f\u044b\u0442 Compound \u0432 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u0438\u0431\u043a\u043e\u0435 \u043a\u043e\u0440\u043e\u0431\u043e\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u043d\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435, \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0443\u0434\u0430.<\/p>\n<blockquote>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0430\u00a0<strong>governance<\/strong>\u00a0\u043e\u0442 OpenZeppelin \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 Compound. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b, \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043c\u043e\u0433\u0443\u0442 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorTimelockControl.sol\"><u>GovernorTimelockControl<\/u><\/a>\u00a0\u0438\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorTimelockCompound.sol\"><u>GovernorTimelockCompound<\/u><\/a>.<\/p>\n<\/blockquote>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h3>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/af6\/f7a\/1e7\/af6f7a1e729ff22f2e59b4a508603f12.png\" width=\"445\" height=\"272\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/af6\/f7a\/1e7\/af6f7a1e729ff22f2e59b4a508603f12.png\"\/><\/figure>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<ol>\n<li>\n<p><strong>Token<\/strong>\u00a0&#8212; \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f ERC-721 \u0438\u043b\u0438 ERC-20 \u0442\u043e\u043a\u0435\u043d\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Governor<\/strong>\u00a0&#8212; \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ol>\n<h4>Token<\/h4>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0432\u0430 \u0432\u0438\u0434\u0430 \u0442\u043e\u043a\u0435\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435\u00a0<strong>governance<\/strong>:<\/p>\n<ol>\n<li>\n<p><strong>\u0412\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0439 \u0442\u043e\u043a\u0435\u043d<\/strong>.\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/tree\/v5.0.0\/contracts\/token\/ERC20\"><u>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 ERC-20<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0439 \u0442\u043e\u043a\u0435\u043d<\/strong>.\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/tree\/v5.0.0\/contracts\/token\/ERC721\"><u>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 ERC-721<\/u><\/a>.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0432\u0438\u0434\u043e\u0432 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430:\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC20\/extensions\/ERC20Votes.sol\"><u>ERC20Votes.sol<\/u><\/a>\u00a0\u0438\u043b\u0438\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC721\/extensions\/ERC721Votes.sol\"><u>ERC721Votes.sol<\/u><\/a>. \u042d\u0442\u0438 \u0434\u0432\u0430 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442\u0441\u044f \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/utils\/Votes.sol\"><u>Votes.sol<\/u><\/a>\u00a0\u0438\u0437 \u0433\u0440\u0443\u043f\u043f\u044b \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/665\/d3e\/b7b\/665d3eb7b0d4944cc8751f76816ed898.png\" width=\"309\" height=\"460\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/665\/d3e\/b7b\/665d3eb7b0d4944cc8751f76816ed898.png\"\/><\/figure>\n<p><em>\u0412\u0430\u0436\u043d\u043e!<\/em>\u00a0\u041f\u043e\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 ERC-1155 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.  <\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 ERC-20 \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043b\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. <\/p>\n<pre><code class=\"javascript\">\/\/ SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.20;  import {ERC20} from \"@openzeppelin\/contracts\/token\/ERC20\/ERC20.sol\"; import {ERC20Votes} from \"@openzeppelin\/contracts\/token\/ERC20\/extensions\/ERC20Votes.sol\"; import {ERC20Permit, Nonces} from \"@openzeppelin\/contracts\/token\/ERC20\/extensions\/ERC20Permit.sol\";  \/\/\/ \u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 ERC20Votes contract VotesToken is ERC20, ERC20Permit, ERC20Votes {     constructor(uint256 totalSupply) ERC20(\"Metalamp votes\", \"MTV\") ERC20Permit(\"Metalamp votes\") {         _mint(msg.sender, totalSupply);     }      function _update(address from, address to, uint256 value) internal override(ERC20, ERC20Votes) {         super._update(from, to, value);     }      function nonces(address owner)         public         view         override(ERC20Permit, Nonces)         returns (uint256)     {         return super.nonces(owner);     } }<\/code><\/pre>\n<p>\u0425\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u00a0<strong>VotesToken.sol<\/strong>, \u043f\u043e \u043c\u0438\u043c\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<strong>ERC20Permit.sol<\/strong>. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044f\u0441\u044c \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<strong>ERC20Votes.sol<\/strong>, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u00a0<strong>\u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0438<\/strong>. \u042d\u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0433\u043b\u0443\u0431\u0436\u0435 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u0432 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/utils\/Votes.sol#L142\"><u>Votes.sol<\/u><\/a>. \u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u00a0<strong>Votes.sol<\/strong>\u00a0\u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/utils\/cryptography\/EIP712.sol\"><u>EIP712<\/u><\/a>, \u043d\u043e \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 EIP712. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 EIP712 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC20\/extensions\/ERC20Permit.sol#L39\"><u>ERC20Permit.sol<\/u><\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b permit \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u0442\u043e\u043a\u0435\u043d\u0430 \u0441\u0440\u0430\u0437\u0443 \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/utils\/cryptography\/EIP712.sol\"><u>EIP712<\/u><\/a>, \u0430 \u043d\u0435 \u043e\u0442\u00a0<strong>ERC20Permit.sol<\/strong>.  <\/p>\n<pre><code class=\"scala\">\/\/ SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.20;  import {ERC20} from \"@openzeppelin\/contracts\/token\/ERC20\/ERC20.sol\"; import {ERC20Votes} from \"@openzeppelin\/contracts\/token\/ERC20\/extensions\/ERC20Votes.sol\"; import {EIP712} from \"@openzeppelin\/contracts\/utils\/cryptography\/EIP712.sol\";  \/\/\/ \u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 ERC20Votes \u0438 EIP712 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e contract VotesToken is ERC20, EIP712, ERC20Votes {     constructor(uint256 totalSupply) ERC20(\"Metalamp votes\", \"MTV\") EIP712(\"Metalamp votes\", \"1\") {         _mint(msg.sender, totalSupply);     }      function _update(address from, address to, uint256 value) internal override(ERC20, ERC20Votes) {         super._update(from, to, value);     } }<\/code><\/pre>\n<p><em>\u0412\u0430\u0436\u043d\u043e!<\/em>\u00a0\u0411\u044b\u0441\u0442\u0440\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043b\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c &#171;<a href=\"https:\/\/docs.openzeppelin.com\/contracts\/5.x\/wizard\"><u>Contracts Wizard<\/u><\/a>&#187; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenZeppelin. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0443\u043d\u043a\u0442 &#171;Votes&#187; \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435.  <\/p>\n<p><em>\u041d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u043e!<\/em>\u00a0\u0415\u0441\u043b\u0438 \u0443 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0442\u043e\u043a\u0435\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0442\u043e\u043a\u0435\u043d \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0441\u0432\u043e\u0438\u0445 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432:\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC20\/extensions\/ERC20Wrapper.sol\"><u>ERC20Wrapper<\/u><\/a>\u00a0\u0438\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC721\/extensions\/ERC721Wrapper.sol\"><u>ERC721Wrapper.sol<\/u><\/a>. \u042d\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043d\u0430 \u0442\u043e\u043a\u0435\u043d WETH (\u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u044d\u0444\u0438\u0440). \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u043d\u0430 \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u0438 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0427\u0443\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432\u00a0<a href=\"https:\/\/docs.openzeppelin.com\/contracts\/5.x\/governance#token\"><u>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/u><\/a>.<\/p>\n<p><em>\u0418 \u0435\u0449\u0435 \u0432\u0430\u0436\u043d\u043e\u0433\u043e!<\/em>\u00a0\u0414\u043b\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0431\u0430\u0437\u0435 ERC-721 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434.<\/p>\n<h4>Governor<\/h4>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443\u00a0<strong>Governor<\/strong>, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u041a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c &#171;<strong>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e<\/strong>&#187; \u0438\u043b\u0438 &#171;<strong>\u0432\u0435\u0441<\/strong>&#187; \u0433\u043e\u043b\u043e\u0441\u043e\u0432?<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f\u00a0<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D0%B2%D0%BE%D1%80%D1%83%D0%BC\"><u>\u043a\u0432\u043e\u0440\u0443\u043c\u0430<\/u><\/a>, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c?<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a\u0438\u0435\u00a0<strong>\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f<\/strong>\u00a0\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438 \u043a\u0430\u043a \u044d\u0442\u0438 \u0433\u043e\u043b\u043e\u0441\u0430 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f?<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a\u043e\u0439\u00a0<strong>\u0442\u0438\u043f \u0442\u043e\u043a\u0435\u043d\u0430<\/strong>\u00a0\u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f?<\/p>\n<\/li>\n<\/ol>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 OpenZeppelin \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0438 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u0443 \u043f\u0443\u0442\u0435\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/Governor.sol\"><u>Governor.sol<\/u><\/a>. \u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\u00a0<strong>Governor<\/strong>\u00a0\u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b.  <\/p>\n<pre><code class=\"javascript\">\/\/ SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.20;  import \"@openzeppelin\/contracts\/governance\/Governor.sol\";  contract MyGovernor is Governor {     \/\/\/ \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b Governor }<\/code><\/pre>\n<p>\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<strong>Governor<\/strong>\u00a0\u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 (\u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 4 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0448\u0435). \u041e\u0442\u0432\u0435\u0442\u043e\u043c \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u044b\u0448\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442:<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorVotes.sol\"><u>GovernorVotes.sol<\/u><\/a>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f &#171;\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430&#187; \u0438\u043b\u0438 &#171;\u0432\u0435\u0441\u0430&#187; \u0433\u043e\u043b\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorVotesQuorumFraction.sol\"><u>GovernorVotesQuorumFraction.sol<\/u><\/a>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u0432\u043e\u0440\u0443\u043c\u0430.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorCountingSimple.sol\"><u>GovernorCountingSimple.sol<\/u><\/a>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0432\u044b\u0431\u043e\u0440\u0430 \u0434\u043b\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u044b\u0431\u043e\u0440\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432: &#171;\u043f\u0440\u043e\u0442\u0438\u0432&#187;, &#171;\u0437\u0430&#187;, &#171;\u0432\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f&#187;.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC20\/extensions\/ERC20Votes.sol\"><u>ERC20Votes<\/u><\/a>\u00a0\u0438\u043b\u0438\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC721\/extensions\/ERC721Votes.sol\"><u>ERC721Votes<\/u><\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/243\/e81\/d6d\/243e81d6d14033f38ac64d00ed8ea9f0.png\" width=\"687\" height=\"634\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/243\/e81\/d6d\/243e81d6d14033f38ac64d00ed8ea9f0.png\"\/><\/figure>\n<\/li>\n<\/ol>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c\u00a0<strong>Governor.sol<\/strong>\u00a0\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 (Timelock), \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u043e\u0449\u0440\u0435\u043d\u0438\u044f \u0437\u0430 \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0438 (Rewards system) \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.  <\/p>\n<p><em>\u0412\u0430\u0436\u043d\u043e!<\/em>\u00a0\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0436\u0438\u0437\u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b\u00a0<strong>governance<\/strong>\u00a0\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 &#171;<a href=\"https:\/\/docs.openzeppelin.com\/contracts\/5.x\/wizard\"><u>Contracts Wizard<\/u><\/a>&#187; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenZeppelin.  <\/p>\n<h3>\u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenZeppelin \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 governance<\/h3>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenZeppelin \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\u00a0<strong>Governor<\/strong>\u00a0\u0438\u0437\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/tree\/v5.0.0\/contracts\/governance\"><u>\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/u><\/a>:<\/p>\n<ol>\n<li>\n<p><strong>Governor.sol<\/strong>. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f\u00a0<strong>\u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u043c<\/strong>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442 \u043d\u0435\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>Extensions<\/strong>. \u0421\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 Governor.sol<\/p>\n<ul>\n<li>\n<p><strong>GovernorCountingSimple.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445: &#171;\u043f\u0440\u043e\u0442\u0438\u0432&#187;, &#171;\u0437\u0430&#187;, &#171;\u0432\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f&#187;.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorSettings.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u00a0<strong>\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438<\/strong>\u00a0\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f: voting delay, voting period duration, and proposal threshold.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorStorage.sol<\/strong>. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0435\u0442\u0430\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0442\u0438 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u0445. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0432 L2 \u0441\u0435\u0442\u044f\u0445, \u0433\u0434\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0433\u0430\u0437\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorTimelockAccess.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/access\/manager\/AccessManager.sol\"><u>AccessManager<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorTimelockCompound.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c\u00a0<a href=\"https:\/\/github.com\/compound-finance\/compound-protocol\/blob\/master\/contracts\/Timelock.sol\"><u>Timelock<\/u><\/a>\u00a0\u043e\u0442 Compound.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorTimelockControl.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/TimelockController.sol\"><u>TimelockController.sol<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorVotes.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u00a0<strong>&#171;\u0432\u0435\u0441 \u0433\u043e\u043b\u043e\u0441\u0430&#187;<\/strong>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c\u00a0<strong>\u043e\u0434\u043d\u0438\u043c<\/strong>\u00a0\u0442\u043e\u043a\u0435\u043d\u043e\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u043f\u0440\u0438\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u00a0<strong>\u0434\u0432\u0443\u043c<\/strong>\u00a0\u0433\u043e\u043b\u043e\u0441\u0430\u043c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorVotesQuorumFraction.sol<\/strong>. \u0412\u0432\u043e\u0434\u0438\u0442 \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u00a0<strong>\u043a\u0432\u043e\u0440\u0443\u043c<\/strong>. \u0421\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0432\u0448\u0438\u0445 \u0431\u044b\u043b\u043e \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043e\u0442 \u0432\u0441\u0435\u0445, \u043a\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0432\u043e\u0440\u0443\u043c \u0440\u0430\u0432\u043d\u044b\u0439 50% \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 50%, \u043e\u0442 \u0432\u0441\u0435\u0445 \u043a\u0442\u043e \u043c\u043e\u0433 \u043f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c, \u0433\u043e\u043b\u043e\u0441\u0443\u044e\u0442 &#171;\u0437\u0430&#187;.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorPreventLateQuorum.sol<\/strong>. \u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435 \u043a\u0432\u043e\u0440\u0443\u043c\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Utils<\/strong>. \u0421\u043f\u0438\u0441\u043e\u043a \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<ul>\n<li>\n<p><strong>Votes.sol<\/strong>. \u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0435\u0434\u0438\u043d\u0438\u0446 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432. \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043a\u0435\u043d\u0430 ERC20Votes \u0438 ERC721Votes.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043d\u0430 \u043a\u0430\u043a\u0438\u0445 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0441\u0430\u043c\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432\u00a0<strong>governance<\/strong>\u00a0\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenZeppelin.<\/p>\n<pre><code class=\"javascript\">\/\/ SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.20;  import {Governor} from \"@openzeppelin\/contracts\/governance\/Governor.sol\"; import {GovernorSettings} from \"@openzeppelin\/contracts\/governance\/extensions\/GovernorSettings.sol\"; import {GovernorCountingSimple} from \"@openzeppelin\/contracts\/governance\/extensions\/GovernorCountingSimple.sol\"; import {GovernorVotes, IVotes} from \"@openzeppelin\/contracts\/governance\/extensions\/GovernorVotes.sol\"; import {GovernorVotesQuorumFraction} from \"@openzeppelin\/contracts\/governance\/extensions\/GovernorVotesQuorumFraction.sol\";  \/**  * @title \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f Metalamp  * @notice \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0441\u0430\u043c\u0443\u044e \u0431\u0430\u0437\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0431\u0430\u0437\u0435 \u0441\u043c\u0430\u0440\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 OpenZeppelin  * @dev \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f 4 \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f:  * - GovernorSettings. \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438  * - GovernorCountingSimple. \u0414\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f  * - GovernorVotes. \u0414\u043b\u044f \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0432\u0435\u0441\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432  * - GovernorVotesQuorumFraction. \u0414\u043b\u044f \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043a\u0432\u043e\u0440\u0443\u043c\u043e\u043c  *\/ contract MetalampGovernance is Governor, GovernorSettings, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction {     uint48 public constant INITIAL_VOTING_DELAY = 1 days;     uint32 public constant INITIAL_VOTING_PERIOD = 30 days;      \/\/\/ \u041e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043b\u044e\u0431\u043e\u043c\u0443 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0443 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f     uint256 public constant INITIAL_PROPOSAL_THRESHOLD = 0;     \/\/\/ \u041e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043a\u0432\u043e\u0440\u0443\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432     uint256 public constant INITIAL_QUORUM_NUMERATOR_VALUE = 0;      constructor(IVotes token)         Governor(\"Metalamp governance\")         GovernorSettings(INITIAL_VOTING_DELAY, INITIAL_VOTING_PERIOD, INITIAL_PROPOSAL_THRESHOLD)         GovernorVotes(token)         GovernorVotesQuorumFraction(INITIAL_QUORUM_NUMERATOR_VALUE)     {}      function proposalThreshold()         public         view         override(Governor, GovernorSettings)         returns (uint256)     {         return super.proposalThreshold();     } }<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<strong>MetalampGovernance.sol<\/strong>\u00a0\u0432 \u0441\u0435\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u0440\u0438\u043c\u0435\u0440 \u043a\u043e\u0434\u0430 \u0442\u043e\u043a\u0435\u043d\u0430 \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0443. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d ERC20 (\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u043d\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c ERC20Votes). \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0441 \u0437\u0430\u0434\u0435\u043f\u043b\u043e\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c.  <\/p>\n<h4>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>propose()<\/code>\u00a0\u043d\u0430 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<strong>MetalampGovernance.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u043c \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/Governor.sol#L275\"><u>Governor.sol<\/u><\/a>.  <\/p>\n<pre><code class=\"javascript\">\/**  * @notice \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u043d\u0435\u0441\u0442\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435  * @param targets \u0421\u043f\u0438\u0441\u043e\u043a \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u044b\u0437\u043e\u0432\u044b calldatas  * @param values \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0441 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0439 calldata \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0430\u0434\u0440\u0435\u0441\u0435 (target)  * @param calldatas \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438  * @param description \u0422\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f  *\/ function propose(     address[] memory targets,     uint256[] memory values,     bytes[] memory calldatas,     string memory description ) public virtual returns (uint256) {     \/\/\/ \u0421\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0440\u043e\u043c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f     address proposer = _msgSender();      \/\/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u043b\u0438 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u043d\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u043c\u0443 \u0430\u0434\u0440\u0435\u0441\u0443.     \/\/\/ \u0412 \u043a\u043e\u043d\u0446\u0435 description \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0430\u0434\u0440\u0435\u0441 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0449\u0435\u0433\u043e (`[description]#proposer=0x`). \u0415\u0441\u043b\u0438 proposer \u0443\u043a\u0430\u0437\u0430\u043d, \u0442\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0442 \u0430\u0434\u0440\u0435\u0441 \u043c\u043e\u0436\u0435\u0442 \u0432\u043d\u043e\u0441\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435.     \/\/\/ \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u0430\u043a \u043a\u0430\u043a description \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 proposalId, \u0430 \u044d\u0442\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435     if (!_isValidDescriptionForProposer(proposer, description)) {         revert GovernorRestrictedProposer(proposer);     }      \/\/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0447\u0442\u043e \u0430\u0432\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438\u043c\u0435\u0435\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0440\u0430\u0432 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f.     \/\/\/ \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u0435\u0441 \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u0430\u0432\u0442\u043e\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c\u043e\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 proposalThreshold()     uint256 proposerVotes = getVotes(proposer, clock() - 1);     uint256 votesThreshold = proposalThreshold();     if (proposerVotes &lt; votesThreshold) {         revert GovernorInsufficientProposerVotes(proposer, proposerVotes, votesThreshold);     }      return _propose(targets, values, calldatas, description, proposer); }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0432\u044b\u0437\u043e\u0432 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>_propose()<\/code>.<\/p>\n<pre><code class=\"javascript\">function _propose(     address[] memory targets,     uint256[] memory values,     bytes[] memory calldatas,     string memory description,     address proposer ) internal virtual returns (uint256 proposalId) {     \/\/\/ \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f     proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description)));      \/\/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f     if (targets.length != values.length || targets.length != calldatas.length || targets.length == 0) {         revert GovernorInvalidProposalLength(targets.length, calldatas.length, values.length);     }      \/\/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0435\u0449\u0435 \u043d\u0435 \u0431\u044b\u043b\u043e     if (_proposals[proposalId].voteStart != 0) {         revert GovernorUnexpectedProposalState(proposalId, state(proposalId), bytes32(0));     }      \/\/\/ \u0412\u0440\u0435\u043c\u044f \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c\u0441\u044f \u0431\u0430\u043b\u0430\u043d\u0441\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u043f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0432\u0448\u0438\u0445.     \/\/\/ \u0421\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044e     uint256 snapshot = clock() + votingDelay();     uint256 duration = votingPeriod();      \/\/\/ \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0445\u0440\u0430\u043d\u0438\u0442\u044c\u0441\u044f \u0432 \u0441\u0435\u0442\u0438     ProposalCore storage proposal = _proposals[proposalId];     proposal.proposer = proposer;     proposal.voteStart = SafeCast.toUint48(snapshot);     proposal.voteDuration = SafeCast.toUint32(duration);      emit ProposalCreated(         proposalId,         proposer,         targets,         values,         new string[](targets.length),         calldatas,         snapshot,         snapshot + duration,         description     ); }<\/code><\/pre>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/223\/758\/da8\/223758da8a0543eecb2948739ebea75f.png\" width=\"796\" height=\"453\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/223\/758\/da8\/223758da8a0543eecb2948739ebea75f.png\"\/><\/figure>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0437\u043e\u0432\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<code>propose()<\/code>\u00a0\u0438\u0437 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430. \u041f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c \u0432\u044b\u043d\u0435\u0441\u0442\u0438 \u043d\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<code>set(address)<\/code>\u00a0\u0434\u043b\u044f \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 whitelist. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043d\u0435 payable, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043c\u0430\u0441\u0441\u0438\u0432 values.  <\/p>\n<pre><code class=\"javascript\">... address account = 0x...;  address[] targets = new address[](1); uint256[] values = new uint256[](1); bytes[] calldatas = new bytes[](1); string memory description = \"Proposal to add an account to the whitelist\";  targets[0] = address(whitelist); calldatas[0] = abi.encodeWithSelector(Whitelist.set.selector, account);  uint256 proposalId = governance.propose(targets, values, calldatas, description); ...<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u043e \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430:<\/p>\n<ol>\n<li>\n<p>\u0412\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f\u00a0<code>proposalSnapshot(uint256 proposalId)<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0412\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f\u00a0<code>proposalDeadline(uint256 proposalId)<\/code><\/p>\n<\/li>\n<li>\n<p>\u0410\u0432\u0442\u043e\u0440\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u00a0<code>proposalProposer(uint256 proposalId)<\/code><\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f\u00a0<code>state(uint256 proposalId)<\/code>\u00a0(Pending, Active, Cancelled \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435)<\/p>\n<\/li>\n<\/ol>\n<p><em>\u0412\u0430\u0436\u043d\u043e!<\/em>\u00a0\u0414\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u043c\u0438 \u0441\u0435\u0442\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c &#171;\u0441\u0435\u0440\u0432\u0438\u0441-\u0438\u043d\u0434\u0435\u043a\u0441\u0438\u0440&#187; \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0443\u0448\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0435\u00a0<code>ProposalCreated()<\/code>\u00a0\u0438 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u0410\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorStorage.sol\"><u>GovernorStorage.sol<\/u><\/a>\u00a0\u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 \u0441\u0435\u0442\u0438.<\/p>\n<h4>\u041e\u0442\u043c\u0435\u043d\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u044b\u043b\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u043e \u043f\u043e\u0434\u043e\u0431\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0443 \u0432\u044b\u0448\u0435.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>cancel()<\/code>\u00a0\u043d\u0430 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<strong>MetalampGovernance.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u043c \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/Governor.sol#L453\"><u>Governor.sol<\/u><\/a>.<\/p>\n<pre><code class=\"javascript\">\/**  * @notice \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044e  * @param targets \u0421\u043f\u0438\u0441\u043e\u043a \u0430\u0434\u0440\u0435\u0441\u043e\u0432 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u044b\u0437\u043e\u0432\u044b calldatas  * @param values \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0439 \u0432\u0430\u043b\u044e\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u0441 \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0439 calldata \u043d\u0430 \u043a\u0430\u0436\u0434\u043e\u043c \u0430\u0434\u0440\u0435\u0441\u0435 (target)  * @param calldatas \u0421\u043f\u0438\u0441\u043e\u043a \u0437\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0437\u043e\u0432\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0441 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438  * @param description \u0417\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f  *\/ function cancel(     address[] memory targets,     uint256[] memory values,     bytes[] memory calldatas,     bytes32 descriptionHash ) public virtual returns (uint256) {     \/\/\/ \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0442\u0430\u0442\u0443\u0441\u0430     uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);      \/\/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432\u0441\u0435 \u0435\u0449\u0435 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435 Pending     _validateStateBitmap(proposalId, _encodeStateBitmap(ProposalState.Pending));      \/\/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439. \u0422\u043e\u043b\u044c\u043a\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435     if (_msgSender() != proposalProposer(proposalId)) {         revert GovernorOnlyProposer(_msgSender());     }      \/\/\/ \u0412\u044b\u0437\u043e\u0432 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438     return _cancel(targets, values, calldatas, descriptionHash); }<\/code><\/pre>\n<p>\u0414\u0430\u043b\u044c\u0448\u0435 \u0432\u044b\u0437\u043e\u0432 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>_cancel()<\/code>. \u041e\u043d\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u0430\u043a \u0432 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<code>cancel()<\/code>.  <\/p>\n<pre><code class=\"javascript\">function _cancel(         address[] memory targets,         uint256[] memory values,         bytes[] memory calldatas,         bytes32 descriptionHash     ) internal virtual returns (uint256) {         \/\/\/ \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f         uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);          \/\/\/ \u0414\u043b\u044f \u043e\u0442\u043c\u0435\u043d\u044b \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u044e\u0431\u044b\u043c, \u043a\u0440\u043e\u043c\u0435         \/\/\/ Canceled, Expired, Executed         _validateStateBitmap(             proposalId,             ALL_PROPOSAL_STATES_BITMAP ^                 _encodeStateBitmap(ProposalState.Canceled) ^                 _encodeStateBitmap(ProposalState.Expired) ^                 _encodeStateBitmap(ProposalState.Executed)         );          \/\/\/ \u0412 storage \u043f\u0440\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 canceled         \/\/\/ \u041f\u043e \u044d\u0442\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044f state() \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 canceled         _proposals[proposalId].canceled = true;          emit ProposalCanceled(proposalId);          \/\/\/ \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043e\u0442\u043c\u0435\u043d\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f         return proposalId;     }<\/code><\/pre>\n<p>\u0425\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u0432\u0441\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0441 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u043e\u043c\u00a0<strong>virtual<\/strong>. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u043e.  <\/p>\n<h4>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0433\u043e\u043b\u043e\u0441\u0430<\/h4>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/p>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/strong>\u00a0\u0431\u044b\u043b\u043e\u00a0<strong>\u0441\u043e\u0437\u0434\u0430\u043d\u043e<\/strong>\u00a0\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0421\u043c\u043e\u0442\u0440\u0438 \u043f\u0443\u043d\u043a\u0442 \u0432\u044b\u0448\u0435.<\/p>\n<\/li>\n<li>\n<p><strong>\u0413\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435<\/strong>\u00a0\u0434\u043e\u043b\u0436\u043d\u043e\u00a0<strong>\u043d\u0430\u0447\u0430\u0442\u044c\u0441\u044f<\/strong>, \u0442\u043e \u0435\u0441\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439\u00a0<strong>\u043d\u043e\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430<\/strong>\u00a0\u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f (voteStart). \u0412\u0440\u0435\u043c\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u043d\u0430 \u0442\u043e\u043a\u0435\u043d\u0435 (snapshot). \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c snapshot \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>proposalSnapshot(proposalId)<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u0423 \u0433\u043e\u043b\u043e\u0441\u0443\u044e\u0449\u0435\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430 \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u043f\u0440\u0430\u0432\u043e \u0433\u043e\u043b\u043e\u0441\u0430, \u0442\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0435\u0433\u043e \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0442\u043e\u043a\u0435\u043d\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u044d\u0442\u0438 \u0442\u043e\u043a\u0435\u043d\u044b \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0440\u0438 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0438, \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d\u00a0<strong>\u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b<\/strong>\u00a0\u043d\u0430 \u0441\u0432\u043e\u0439 \u0430\u0434\u0440\u0435\u0441 \u0438\u043b\u0438 \u0430\u0434\u0440\u0435\u0441 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u0443\u0447\u0438\u0442 \u043f\u0440\u0430\u0432\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u043b\u044f \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0433\u043e\u043b\u043e\u0441\u0443\u044e\u0449\u0438\u0439 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>delegate(address voter)<\/code>\u00a0\u043d\u0430 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435 \u0442\u043e\u043a\u0435\u043d\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 ERC20Votes \u0438\u043b\u0438 ERC721Votes), \u0433\u0434\u0435\u00a0<strong>voter<\/strong>\u00a0\u0430\u0434\u0440\u0435\u0441 \u0430\u043a\u043a\u0430\u0443\u043d\u0442\u0430, \u043a\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043e \u043f\u0440\u0430\u0432\u043e \u0433\u043e\u043b\u043e\u0441\u0430.<\/p>\n<\/li>\n<\/ol>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b, \u0442\u043e \u0433\u043e\u043b\u043e\u0441\u0443\u044e\u0449\u0438\u0439 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>castVote(proposalId, support)<\/code>\u00a0\u043d\u0430 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<strong>MetalampGovernance.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u043c \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/Governor.sol#L522C14-L522C22\"><u>Governor.sol<\/u><\/a>.<\/p>\n<pre><code class=\"javascript\">\/**  * @notice \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f  * @param proposalId \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f  * @param support \u0417\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 uint8 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \"\u0437\u0430\", \"\u043f\u0440\u043e\u0442\u0438\u0432\" \u0438\u043b\u0438 \"\u0432\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f\")  *\/ function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256) {     \/\/\/ \u0413\u043e\u043b\u043e\u0441\u0443\u044e\u0449\u0438\u043c \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u044e     address voter = _msgSender();      return _castVote(proposalId, voter, support, \"\"); }<\/code><\/pre>\n<p>\u041f\u043e-\u043c\u0438\u043c\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<code>castVote()<\/code>, \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438:<\/p>\n<ol>\n<li>\n<p><code>castVoteWithReason()<\/code>\u00a0&#8212; \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e<\/p>\n<\/li>\n<li>\n<p><code>castVoteWithReasonAndParams()<\/code>\u00a0&#8212; \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043a \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u043c\u0443 \u0440\u0435\u0448\u0435\u043d\u0438\u044e \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043b\u043e\u0433\u0438\u043a\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p><code>castVoteBySig()<\/code>\u00a0&#8212; \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/li>\n<li>\n<p><code>castVoteWithReasonAndParamsBySig()<\/code>\u00a0&#8212; \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432\u0441\u0435 \u0442\u0440\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u0432 \u043e\u0434\u043d\u043e\u043c: \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0438<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e \u043e\u0442 \u0432\u044b\u0431\u043e\u0440\u0430 \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0434\u043b\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f, \u043f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c, \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d\u0430 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f\u00a0<code>_castVote()<\/code>.<\/p>\n<pre><code class=\"javascript\">function _castVote(     uint256 proposalId,     address account,     uint8 support,     string memory reason,     bytes memory params ) internal virtual returns (uint256) {     \/\/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0432 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u0442\u0430\u0442\u0443\u0441\u0435,     \/\/\/ \u0447\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c \u0437\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435     _validateStateBitmap(proposalId, _encodeStateBitmap(ProposalState.Active));      \/\/\/ \u0420\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441 \u0433\u043e\u043b\u043e\u0441\u0430     uint256 weight = _getVotes(account, proposalSnapshot(proposalId), params);      \/\/\/ \u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0433\u043e\u043b\u043e\u0441     _countVote(proposalId, account, support, weight, params);      \/\/\/ \u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0431 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0441\u0442\u0438 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f     if (params.length == 0) {         emit VoteCast(account, proposalId, support, weight, reason);     } else {         emit VoteCastWithParams(account, proposalId, support, weight, reason, params);     }      return weight; }<\/code><\/pre>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:  <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/408\/6a8\/f7b\/4086a8f7b345ec43a75cf72aa11d7532.png\" width=\"1253\" height=\"438\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/408\/6a8\/f7b\/4086a8f7b345ec43a75cf72aa11d7532.png\"\/><\/figure>\n<p>\u0420\u0430\u0441\u0447\u0435\u0442 &#171;\u0432\u0435\u0441\u0430&#187; \u0433\u043e\u043b\u043e\u0441\u0430 (<strong>_getVotes<\/strong>) \u0438 \u0443\u0447\u0435\u0442 \u0433\u043e\u043b\u043e\u0441\u0430 (<strong>_countVotes<\/strong>) &#8212; \u044d\u0442\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043d\u043e\u0441\u0442\u044f\u043c \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 OpenZeppelin \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0431\u0430\u0437\u043e\u0432\u044b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u0445\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorVotes.sol#L57\"><u>GovernorVotes.sol<\/u><\/a>\u00a0\u0438\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorCountingSimple.sol#L76\"><u>GovernorCountingSimple.sol<\/u><\/a>\u00a0\u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.  <\/p>\n<h4>\u041e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0433\u043e\u043b\u043e\u0441\u0430 \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e<\/h4>\n<p>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043c\u043e\u0436\u043d\u043e\u00a0<a href=\"https:\/\/ethereum.org\/en\/glossary\/#digital-signatures\"><u>\u0442\u0443\u0442<\/u><\/a>.<\/p>\n<p>\u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043f\u043b\u044e\u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u0434\u0430\u0435\u0442 \u0446\u0438\u0444\u0440\u043e\u0432\u0443\u044e \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u0438 \u0435\u043c\u0443\u00a0<strong>\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0433\u0430\u0437<\/strong>\u00a0\u0437\u0430 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043f\u0440\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0435 \u0433\u043e\u043b\u043e\u0441\u0430. \u042d\u0442\u0443 \u0440\u043e\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u0440\u0430\u0442\u044c \u043d\u0430 \u0441\u0435\u0431\u044f off-chain \u0441\u0435\u0440\u0432\u0438\u0441 \u0438 \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0433\u043e\u043b\u043e\u0441, \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c\u0443 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e \u0437\u0430 \u043d\u0435\u0433\u043e.<\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430\u043c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0438, \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0432\u0441\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f, \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0433\u043e\u043b\u043e\u0441\u0430.<\/p>\n<p>\u041e\u0434\u043d\u0430\u043a\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u044b \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \u0432\u044b\u0437\u044b\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>delegate(address voter)<\/code>\u00a0\u0433\u043e\u043b\u043e\u0441\u0443\u044e\u0449\u0438\u0439 \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0434\u043e\u043b\u0436\u0435\u043d \u0437\u0430\u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0437\u0430 \u0433\u0430\u0437. \u0412 \u044d\u0442\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0443 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0435\u0441\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>delegateBySig()<\/code>. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0435 \u043f\u043b\u0430\u0442\u0438\u0442\u044c \u0433\u0430\u0437 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043d\u0430 \u0432\u0441\u0435\u043c \u044d\u0442\u0430\u043f\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0433\u043e\u043b\u043e\u0441\u0430. \u0420\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 \u044d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/utils\/Votes.sol#L142\"><u>Votes.sol<\/u><\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b, \u0442\u043e \u0433\u043e\u043b\u043e\u0441\u0443\u044e\u0449\u0438\u0439 \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u0434\u043e\u043b\u0436\u0435\u043d \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>castVoteBySig(uint256 proposalId, uint8 support, address voter, bytes memory signature)<\/code>\u00a0\u043d\u0430 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<strong>MetalampGovernance.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u043c \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/Governor.sol#L555C1-L572C6\"><u>Governor.sol<\/u><\/a>.<\/p>\n<pre><code class=\"javascript\">\/**  * @notice \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u0434\u043f\u0438\u0441\u0438  * @param proposalId \u0418\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f  * @param support \u0417\u0430\u043a\u043e\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 uint8 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \"\u0437\u0430\", \"\u043f\u0440\u043e\u0442\u0438\u0432\" \u0438\u043b\u0438 \"\u0432\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f\")  * @param voter \u0410\u0434\u0440\u0435\u0441 \u0433\u043e\u043b\u043e\u0441\u0443\u044e\u0449\u0435\u0433\u043e \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u0430  * @param signature \u041f\u043e\u0434\u043f\u0438\u0441\u044c \u043e\u0442 \u0438\u043c\u0435\u043d\u0438 \u0430\u0434\u0440\u0435\u0441\u0430 voter  *\/ function castVoteBySig(     uint256 proposalId,     uint8 support,     address voter,     bytes memory signature ) public virtual returns (uint256) {     \/\/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u0434\u043b\u044f \u0430\u0434\u0440\u0435\u0441\u0430 voter     bool valid = SignatureChecker.isValidSignatureNow(         voter,         _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support, voter, _useNonce(voter)))),         signature     );      \/\/\/ \u0415\u0441\u043b\u0438 \u043f\u043e\u0434\u043f\u0438\u0441\u044c \u043d\u0435\u0432\u0430\u043b\u0438\u0434\u043d\u0430, \u0442\u043e \u043e\u0442\u043a\u0430\u0442\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044e     if (!valid) {         revert GovernorInvalidSignature(voter);     }      \/\/\/ \u0412\u044b\u0437\u043e\u0432 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0433\u043e\u043b\u043e\u0441\u0430     return _castVote(proposalId, voter, support, \"\"); }<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043e\u0442\u043b\u0438\u0447\u0438\u044f \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0433\u043e\u043b\u043e\u0441\u0430 \u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u044c\u044e \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f, \u0434\u0430\u043b\u044c\u0448\u0435 \u0432\u044b\u0437\u043e\u0432 \u0443\u0445\u043e\u0434\u0438\u0442 \u0432 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>_castVote()<\/code>, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u00a0<a href=\"https:\/\/github.com\/fullstack-development\/blockchain-wiki\/blob\/main\/concepts\/dao\/openzeppelin-governance\/README.md#%D0%BE%D1%82%D0%BF%D1%80%D0%B0%D0%B2%D0%BA%D0%B0-%D0%B3%D0%BE%D0%BB%D0%BE%D1%81%D0%B0\"><u>&#171;\u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430 \u0433\u043e\u043b\u043e\u0441\u0430&#187;<\/u><\/a>. <\/p>\n<h4>\u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f <\/h4>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f:<\/p>\n<ol>\n<li>\n<p><strong>\u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435<\/strong>\u00a0\u0431\u044b\u043b\u043e\u00a0<strong>\u0441\u043e\u0437\u0434\u0430\u043d\u043e<\/strong>\u00a0\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0421\u043c\u043e\u0442\u0440\u0438 \u043f\u0443\u043d\u043a\u0442 \u0432\u044b\u0448\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0413\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435\u00a0<strong>\u043f\u0440\u043e\u0448\u043b\u043e<\/strong>\u00a0\u0438 \u0431\u044b\u043b\u043e\u00a0<strong>\u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e<\/strong>\u00a0\u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u0443\u0441\u043b\u043e\u0432\u0438\u0439: \u0438\u0441\u0442\u0435\u043a\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0438\u043b\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043a\u0432\u043e\u0440\u0443\u043c \u0431\u044b\u043b \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u043f\u0438\u0441\u0430\u043d \u0432\u044b\u0448\u0435. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>proposalDeadline(uint256 proposalId)<\/code>.<\/p>\n<\/li>\n<\/ol>\n<p>\u041f\u0440\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u0439, \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0434\u043b\u044f \u0430\u0434\u0440\u0435\u0441\u0430, \u043f\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e\u00a0<code>execute()<\/code>\u00a0\u043d\u0430 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<strong>MetalampGovernance.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u043c \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/Governor.sol#L393\"><u>Governor.sol<\/u><\/a>.<\/p>\n<pre><code class=\"javascript\">function execute(     address[] memory targets,     uint256[] memory values,     bytes[] memory calldatas,     bytes32 descriptionHash ) public payable virtual returns (uint256) {     \/\/\/ \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f     uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);      \/\/\/ \u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0441\u0442\u0430\u0442\u0443\u0441 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f     _validateStateBitmap(         proposalId,         _encodeStateBitmap(ProposalState.Succeeded) | _encodeStateBitmap(ProposalState.Queued)     );      \/\/\/ \u041f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u043d\u044b\u043c     _proposals[proposalId].executed = true;      \/\/\/ \u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043e\u0447\u0435\u0440\u0435\u0434\u044c     if (_executor() != address(this)) {         for (uint256 i = 0; i &lt; targets.length; ++i) {             if (targets[i] == address(this)) {                 _governanceCall.pushBack(keccak256(calldatas[i]));             }         }     }      \/\/\/ \u0412\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f     _executeOperations(proposalId, targets, values, calldatas, descriptionHash);      \/\/\/ \u041e\u0447\u0438\u0449\u0435\u043d\u0438\u0435 \u043e\u0447\u0435\u0440\u0435\u0434\u0438     if (_executor() != address(this) &amp;&amp; !_governanceCall.empty()) {         _governanceCall.clear();     }      emit ProposalExecuted(proposalId);      return proposalId; }<\/code><\/pre>\n<p>\u041d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<code>_executeOperations()<\/code>. \u041d\u0430\u043c \u043e\u0442\u0442\u0443\u0434\u0430 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u0441\u0442\u0440\u043e\u0447\u043a\u0430:  <\/p>\n<pre><code class=\"javascript\">(bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]);<\/code><\/pre>\n<p>\u041c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0441 \u0432\u044b\u0437\u043e\u0432\u043e\u043c\u00a0<code>call()<\/code>\u00a0\u0431\u044b\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b\u0438 \u0432 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f.  <\/p>\n<p>\u041d\u0430 \u0441\u0445\u0435\u043c\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: <\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/63a\/d3e\/51b\/63ad3e51b73202f392a9e93036c05ba7.png\" width=\"911\" height=\"390\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/63a\/d3e\/51b\/63ad3e51b73202f392a9e93036c05ba7.png\"\/><\/figure>\n<h3>\u0412\u044b\u0432\u043e\u0434<\/h3>\n<p>\u042f \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c governance \u043d\u0430 \u0431\u0430\u0437\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenZeppelin. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u043d\u0435 \u0441\u0430\u043c\u0430\u044f \u043f\u0440\u043e\u0441\u0442\u0430\u044f, \u043d\u043e \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0433\u0438\u0431\u043a\u0430\u044f, \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0444\u0443\u043d\u043a\u0446\u0438\u0439, \u043f\u0440\u0430\u0432\u0438\u043b \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043b\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u0421\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f\u00a0<strong>\u0442\u0440\u0438 \u044d\u0442\u0430\u043f\u0430<\/strong>: \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0414\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u044d\u0442\u0438\u0445 \u0442\u0440\u0435\u0445 \u044d\u0442\u0430\u043f\u043e\u0432 \u044f \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430:<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/github.com\/fullstack-development\/blockchain-wiki\/blob\/main\/concepts\/dao\/contracts\/src\/MetalampGovernance.sol\"><u>MetalampGovernance.sol<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/fullstack-development\/blockchain-wiki\/blob\/main\/concepts\/dao\/contracts\/src\/VotesToken.sol\"><u>VotesToken.sol<\/u><\/a><\/p>\n<\/li>\n<\/ol>\n<p><a href=\"https:\/\/github.com\/fullstack-development\/blockchain-wiki\/blob\/main\/concepts\/dao\/contracts\/test\/MetalampGovernance.t.sol\"><u>\u0422\u0440\u0438 \u0442\u0435\u0441\u0442\u0430<\/u><\/a>, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0442\u0440\u0438 \u044d\u0442\u0430\u043f\u0430 \u0445\u043e\u0440\u043e\u0448\u043e \u043c\u043e\u0433\u0443\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u044f\u0449\u0435\u0433\u043e.<\/p>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u00a0<a href=\"https:\/\/github.com\/fullstack-development\/blockchain-wiki\/blob\/main\/concepts\/dao\/contracts\/test\/mocks\/Whitelist.sol\"><u>Whitelist.sol<\/u><\/a>. \u0418\u043c\u0435\u043d\u043d\u043e \u043d\u0430 \u044d\u0442\u043e\u043c \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435 \u0432 \u0442\u0435\u0441\u0442\u0430\u0445 \u0447\u0435\u0440\u0435\u0437\u00a0<strong>MetalampGovernance<\/strong>\u00a0\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0430\u0441\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044f\u00a0<code>set()<\/code>\u00a0\u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p><em>\u0412\u0430\u0436\u043d\u043e!<\/em>\u00a0\u041d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0435 \u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u0441\u0435\u0431\u044f \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c TimeLock, \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u044b\u0432\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u0434\u0441\u0447\u0435\u0442\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432, \u0440\u0430\u0441\u0447\u0435\u0442\u0430 &#171;\u0432\u0435\u0441\u0430&#187; \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.<\/p>\n<h3>Links<\/h3>\n<ol>\n<li>\n<p><a href=\"https:\/\/docs.openzeppelin.com\/contracts\/5.x\/api\/governance\"><u>Governance docs<\/u><\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/tree\/v5.0.0\/contracts\/governance\"><u>OpenZeppelin contracts. Repository<\/u><\/a><\/p>\n<\/li>\n<\/ol>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/801919\/\"> https:\/\/habr.com\/ru\/articles\/801919\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0442\u0435\u043c\u0443 DAO. \u0420\u0430\u043d\u043d\u0435\u0435 \u043c\u044b \u0443\u0436\u0435 \u0440\u0430\u0437\u0431\u0438\u0440\u0430\u043b\u0438 \u0441\u0430\u043c\u0443 <a href=\"https:\/\/habr.com\/ru\/companies\/metalamp\/articles\/798339\/\">\u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044e<\/a>, \u0430 \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0440\u0430 \u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0451 \u0440\u0435\u0448\u0435\u043d\u0438\u0435!<\/p>\n<p>\u0420\u0430\u0437\u0431\u0435\u0440\u0451\u043c \u043f\u043e \u043a\u043e\u0441\u0442\u043e\u0447\u043a\u0430\u043c \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043a\u043e\u0440\u043e\u043b\u044f Web3 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u2014 OpenZeppelin. \u041e\u043d\u0438 \u043f\u0440\u043e\u0448\u043b\u0438 \u0432\u0441\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0430\u0443\u0434\u0438\u0442\u044b \u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u044d\u0442\u0430\u043b\u043e\u043d\u043e\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0423\u043c\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c governance \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043e\u0442 OpenZeppelin \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445.<\/p>\n<blockquote>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435\u0439 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u044e\u0442\u0441\u044f\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/tree\/v5.0.0\/contracts\/governance\"><u>\u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b<\/u><\/a>\u00a0OpenZeppelin \u0432\u0435\u0440\u0441\u0438\u0438 5.0.0.<\/p>\n<\/blockquote>\n<p>\u0414\u043e \u043f\u043e\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432\u00a0<strong>governance<\/strong>\u00a0\u043e\u0442 OpenZeppelin \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u043c\u0438 \u0431\u044b\u043b\u0438 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430\u00a0<a href=\"https:\/\/compound.finance\/\"><u>Compound<\/u><\/a>:\u00a0<a href=\"https:\/\/github.com\/compound-finance\/compound-protocol\/blob\/master\/contracts\/Governance\/GovernorAlpha.sol\"><u>GovernorAlpha<\/u><\/a>,\u00a0<a href=\"https:\/\/github.com\/compound-finance\/compound-protocol\/blob\/master\/contracts\/Governance\/GovernorBravoDelegator.sol\"><u>GovernorBravo<\/u><\/a>. \u0414\u0435\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u044b \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438, \u0434\u043e\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044f \u043a\u043e\u0434 \u043f\u043e\u0434 \u0441\u0432\u043e\u0438 \u043d\u0443\u0436\u0434\u044b.<\/p>\n<p>OpenZeppelin \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u043b\u0441\u044f \u043f\u0435\u0440\u0435\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043e\u043f\u044b\u0442 Compound \u0432 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0433\u0438\u0431\u043a\u043e\u0435 \u043a\u043e\u0440\u043e\u0431\u043e\u0447\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438, \u043d\u043e \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0435, \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0442\u0440\u0443\u0434\u0430.<\/p>\n<blockquote>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0430\u00a0<strong>governance<\/strong>\u00a0\u043e\u0442 OpenZeppelin \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u0441 \u0443\u0447\u0435\u0442\u043e\u043c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0441\u0438\u0441\u0442\u0435\u043c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 Compound. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b, \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u043c\u043e\u0433\u0443\u0442 \u0434\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorTimelockControl.sol\"><u>GovernorTimelockControl<\/u><\/a>\u00a0\u0438\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorTimelockCompound.sol\"><u>GovernorTimelockCompound<\/u><\/a>.<\/p>\n<\/blockquote>\n<h3>\u0410\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430<\/h3>\n<figure class=\"\"><\/figure>\n<p>\u0414\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0435 \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<ol>\n<li>\n<p><strong>Token<\/strong>\u00a0&#8212; \u0434\u043b\u044f \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f ERC-721 \u0438\u043b\u0438 ERC-20 \u0442\u043e\u043a\u0435\u043d\u0430 \u0440\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>Governor<\/strong>\u00a0&#8212; \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043f\u0440\u0430\u0432\u0438\u043b\u0430 \u0438 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ol>\n<h4>Token<\/h4>\n<p>\u041d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0434\u0432\u0430 \u0432\u0438\u0434\u0430 \u0442\u043e\u043a\u0435\u043d\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435\u00a0<strong>governance<\/strong>:<\/p>\n<ol>\n<li>\n<p><strong>\u0412\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0439 \u0442\u043e\u043a\u0435\u043d<\/strong>.\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/tree\/v5.0.0\/contracts\/token\/ERC20\"><u>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 ERC-20<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>\u041d\u0435\u0432\u0437\u0430\u0438\u043c\u043e\u0437\u0430\u043c\u0435\u043d\u044f\u0435\u043c\u044b\u0439 \u0442\u043e\u043a\u0435\u043d<\/strong>.\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/tree\/v5.0.0\/contracts\/token\/ERC721\"><u>\u0421\u0442\u0430\u043d\u0434\u0430\u0440\u0442 ERC-721<\/u><\/a>.<\/p>\n<\/li>\n<\/ol>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u0432\u0438\u0434\u043e\u0432 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0442\u043e\u043a\u0435\u043d\u0430:\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC20\/extensions\/ERC20Votes.sol\"><u>ERC20Votes.sol<\/u><\/a>\u00a0\u0438\u043b\u0438\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC721\/extensions\/ERC721Votes.sol\"><u>ERC721Votes.sol<\/u><\/a>. \u042d\u0442\u0438 \u0434\u0432\u0430 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442\u0441\u044f \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/utils\/Votes.sol\"><u>Votes.sol<\/u><\/a>\u00a0\u0438\u0437 \u0433\u0440\u0443\u043f\u043f\u044b \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<figure class=\"\"><\/figure>\n<p><em>\u0412\u0430\u0436\u043d\u043e!<\/em>\u00a0\u041f\u043e\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043d\u0435 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043a\u0435\u043d \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0430 ERC-1155 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.  <\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 ERC-20 \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043b\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. <\/p>\n<pre><code class=\"javascript\">\/\/ SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.20;  import {ERC20} from \"@openzeppelin\/contracts\/token\/ERC20\/ERC20.sol\"; import {ERC20Votes} from \"@openzeppelin\/contracts\/token\/ERC20\/extensions\/ERC20Votes.sol\"; import {ERC20Permit, Nonces} from \"@openzeppelin\/contracts\/token\/ERC20\/extensions\/ERC20Permit.sol\";  \/\/\/ \u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 ERC20Votes contract VotesToken is ERC20, ERC20Permit, ERC20Votes {     constructor(uint256 totalSupply) ERC20(\"Metalamp votes\", \"MTV\") ERC20Permit(\"Metalamp votes\") {         _mint(msg.sender, totalSupply);     }      function _update(address from, address to, uint256 value) internal override(ERC20, ERC20Votes) {         super._update(from, to, value);     }      function nonces(address owner)         public         view         override(ERC20Permit, Nonces)         returns (uint256)     {         return super.nonces(owner);     } }<\/code><\/pre>\n<p>\u0425\u043e\u0447\u0443 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0447\u0442\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u00a0<strong>VotesToken.sol<\/strong>, \u043f\u043e \u043c\u0438\u043c\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<strong>ERC20Permit.sol<\/strong>. \u042d\u0442\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044f\u0441\u044c \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<strong>ERC20Votes.sol<\/strong>, \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u00a0<strong>\u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u043f\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0438<\/strong>. \u042d\u0442\u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0433\u043b\u0443\u0431\u0436\u0435 \u0432 \u0446\u0435\u043f\u043e\u0447\u043a\u0435 \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u0432 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0435\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/utils\/Votes.sol#L142\"><u>Votes.sol<\/u><\/a>. \u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u00a0<strong>Votes.sol<\/strong>\u00a0\u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/utils\/cryptography\/EIP712.sol\"><u>EIP712<\/u><\/a>, \u043d\u043e \u043d\u0435 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440 EIP712. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 EIP712 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC20\/extensions\/ERC20Permit.sol#L39\"><u>ERC20Permit.sol<\/u><\/a>.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b permit \u0434\u043b\u044f \u0441\u0432\u043e\u0435\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u0442\u043e\u043a\u0435\u043d\u0430 \u0441\u0440\u0430\u0437\u0443 \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/utils\/cryptography\/EIP712.sol\"><u>EIP712<\/u><\/a>, \u0430 \u043d\u0435 \u043e\u0442\u00a0<strong>ERC20Permit.sol<\/strong>.  <\/p>\n<pre><code class=\"scala\">\/\/ SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.20;  import {ERC20} from \"@openzeppelin\/contracts\/token\/ERC20\/ERC20.sol\"; import {ERC20Votes} from \"@openzeppelin\/contracts\/token\/ERC20\/extensions\/ERC20Votes.sol\"; import {EIP712} from \"@openzeppelin\/contracts\/utils\/cryptography\/EIP712.sol\";  \/\/\/ \u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442 ERC20Votes \u0438 EIP712 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e contract VotesToken is ERC20, EIP712, ERC20Votes {     constructor(uint256 totalSupply) ERC20(\"Metalamp votes\", \"MTV\") EIP712(\"Metalamp votes\", \"1\") {         _mint(msg.sender, totalSupply);     }      function _update(address from, address to, uint256 value) internal override(ERC20, ERC20Votes) {         super._update(from, to, value);     } }<\/code><\/pre>\n<p><em>\u0412\u0430\u0436\u043d\u043e!<\/em>\u00a0\u0411\u044b\u0441\u0442\u0440\u043e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0442\u043e\u043a\u0435\u043d\u0430 \u0434\u043b\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c &#171;<a href=\"https:\/\/docs.openzeppelin.com\/contracts\/5.x\/wizard\"><u>Contracts Wizard<\/u><\/a>&#187; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenZeppelin. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043f\u0443\u043d\u043a\u0442 &#171;Votes&#187; \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435.  <\/p>\n<p><em>\u041d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u043e!<\/em>\u00a0\u0415\u0441\u043b\u0438 \u0443 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u0439 \u0442\u043e\u043a\u0435\u043d, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0432\u043e\u0438 \u0437\u0430\u0434\u0430\u0447\u0438. \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0432\u044b\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0442\u043e\u043a\u0435\u043d \u043e\u0431\u0435\u0440\u0442\u043a\u0443 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0441\u0432\u043e\u0438\u0445 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432:\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC20\/extensions\/ERC20Wrapper.sol\"><u>ERC20Wrapper<\/u><\/a>\u00a0\u0438\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC721\/extensions\/ERC721Wrapper.sol\"><u>ERC721Wrapper.sol<\/u><\/a>. \u042d\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0430\u044f \u0438\u0441\u0442\u043e\u0440\u0438\u044f \u043d\u0430 \u0442\u043e\u043a\u0435\u043d WETH (\u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u044d\u0444\u0438\u0440). \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u043b\u0430\u0434\u0435\u043b\u044c\u0446\u0435\u043c \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u043e\u0431\u043c\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043f\u0435\u0440\u0432\u043e\u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u043d\u0430 \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u0438 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0427\u0443\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432\u00a0<a href=\"https:\/\/docs.openzeppelin.com\/contracts\/5.x\/governance#token\"><u>\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/u><\/a>.<\/p>\n<p><em>\u0418 \u0435\u0449\u0435 \u0432\u0430\u0436\u043d\u043e\u0433\u043e!<\/em>\u00a0\u0414\u043b\u044f \u0442\u043e\u043a\u0435\u043d\u0430 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0431\u0430\u0437\u0435 ERC-721 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043f\u043e\u0434\u0445\u043e\u0434.<\/p>\n<h4>Governor<\/h4>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0443\u00a0<strong>Governor<\/strong>, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442\u0432\u0435\u0442\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u041a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c &#171;<strong>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e<\/strong>&#187; \u0438\u043b\u0438 &#171;<strong>\u0432\u0435\u0441<\/strong>&#187; \u0433\u043e\u043b\u043e\u0441\u043e\u0432?<\/p>\n<\/li>\n<li>\n<p>\u0421\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0434\u043b\u044f \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f\u00a0<a href=\"https:\/\/ru.wikipedia.org\/wiki\/%D0%9A%D0%B2%D0%BE%D1%80%D1%83%D0%BC\"><u>\u043a\u0432\u043e\u0440\u0443\u043c\u0430<\/u><\/a>, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c?<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a\u0438\u0435\u00a0<strong>\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f<\/strong>\u00a0\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0438 \u043a\u0430\u043a \u044d\u0442\u0438 \u0433\u043e\u043b\u043e\u0441\u0430 \u0441\u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f?<\/p>\n<\/li>\n<li>\n<p>\u041a\u0430\u043a\u043e\u0439\u00a0<strong>\u0442\u0438\u043f \u0442\u043e\u043a\u0435\u043d\u0430<\/strong>\u00a0\u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f?<\/p>\n<\/li>\n<\/ol>\n<p>\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 OpenZeppelin \u0441\u0447\u0438\u0442\u0430\u0435\u0442 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u043c\u0438 \u0438 \u0437\u0430\u043a\u0440\u0435\u043f\u043b\u044f\u0435\u0442 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u0443 \u043f\u0443\u0442\u0435\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u043e\u0433\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/Governor.sol\"><u>Governor.sol<\/u><\/a>. \u041f\u043e \u0441\u0443\u0442\u0438 \u044d\u0442\u043e \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\u00a0<strong>Governor<\/strong>\u00a0\u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b.  <\/p>\n<pre><code class=\"javascript\">\/\/ SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.20;  import \"@openzeppelin\/contracts\/governance\/Governor.sol\";  contract MyGovernor is Governor {     \/\/\/ \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u044b Governor }<\/code><\/pre>\n<p>\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u00a0<strong>Governor<\/strong>\u00a0\u043d\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0433\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 (\u043e\u0442\u0432\u0435\u0442\u0430 \u043d\u0430 4 \u0432\u043e\u043f\u0440\u043e\u0441\u0430 \u0432\u044b\u0448\u0435). \u041e\u0442\u0432\u0435\u0442\u043e\u043c \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u0432 \u0432\u044b\u0448\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043c\u043e\u0434\u0443\u043b\u044c-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442:<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorVotes.sol\"><u>GovernorVotes.sol<\/u><\/a>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f &#171;\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430&#187; \u0438\u043b\u0438 &#171;\u0432\u0435\u0441\u0430&#187; \u0433\u043e\u043b\u043e\u0441\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorVotesQuorumFraction.sol\"><u>GovernorVotesQuorumFraction.sol<\/u><\/a>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u0430\u0432\u0438\u043b \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u044f \u043a\u0432\u043e\u0440\u0443\u043c\u0430.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/extensions\/GovernorCountingSimple.sol\"><u>GovernorCountingSimple.sol<\/u><\/a>. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0432\u044b\u0431\u043e\u0440\u0430 \u0434\u043b\u044f \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a\u043e\u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u043e\u0433\u043e \u0432\u044b\u0431\u043e\u0440\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0437 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432: &#171;\u043f\u0440\u043e\u0442\u0438\u0432&#187;, &#171;\u0437\u0430&#187;, &#171;\u0432\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f&#187;.<\/p>\n<\/li>\n<li>\n<p>\u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0442\u043e\u043a\u0435\u043d\u043e\u0432\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC20\/extensions\/ERC20Votes.sol\"><u>ERC20Votes<\/u><\/a>\u00a0\u0438\u043b\u0438\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/token\/ERC721\/extensions\/ERC721Votes.sol\"><u>ERC721Votes<\/u><\/a>.<\/p>\n<figure class=\"full-width\"><\/figure>\n<\/li>\n<\/ol>\n<p>\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c\u00a0<strong>Governor.sol<\/strong>\u00a0\u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0437\u0430\u043c\u0435\u043d\u0435\u043d \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u0438\u0441\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u044b\u0445 \u0440\u0435\u0448\u0435\u043d\u0438\u0439 (Timelock), \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u043e\u0449\u0440\u0435\u043d\u0438\u044f \u0437\u0430 \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0432 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0438 (Rewards system) \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435.  <\/p>\n<p><em>\u0412\u0430\u0436\u043d\u043e!<\/em>\u00a0\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0436\u0438\u0437\u043d\u0435\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b\u00a0<strong>governance<\/strong>\u00a0\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 &#171;<a href=\"https:\/\/docs.openzeppelin.com\/contracts\/5.x\/wizard\"><u>Contracts Wizard<\/u><\/a>&#187; \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenZeppelin.  <\/p>\n<h3>\u041f\u043e\u043b\u043d\u044b\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenZeppelin \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 governance<\/h3>\n<p>\u041d\u0438\u0436\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u0441\u043f\u0438\u0441\u043e\u043a \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenZeppelin \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438\u00a0<strong>Governor<\/strong>\u00a0\u0438\u0437\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/tree\/v5.0.0\/contracts\/governance\"><u>\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f<\/u><\/a>:<\/p>\n<ol>\n<li>\n<p><strong>Governor.sol<\/strong>. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u043b\u043e\u0433\u0438\u043a\u0443 \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f\u00a0<strong>\u0430\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u043c<\/strong>, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0442 \u043d\u0435\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>Extensions<\/strong>. \u0421\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430 Governor.sol<\/p>\n<ul>\n<li>\n<p><strong>GovernorCountingSimple.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0438\u0437 \u0442\u0440\u0435\u0445: &#171;\u043f\u0440\u043e\u0442\u0438\u0432&#187;, &#171;\u0437\u0430&#187;, &#171;\u0432\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0441\u044f&#187;.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorSettings.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u00a0<strong>\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438<\/strong>\u00a0\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f: voting delay, voting period duration, and proposal threshold.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorStorage.sol<\/strong>. \u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 \u0434\u0435\u0442\u0430\u043b\u0438 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u0435\u0442\u0438 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u0445. \u041c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0432 L2 \u0441\u0435\u0442\u044f\u0445, \u0433\u0434\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0433\u0430\u0437\u0430 \u043d\u0435 \u0438\u043c\u0435\u0435\u0442 \u0441\u0438\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorTimelockAccess.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/access\/manager\/AccessManager.sol\"><u>AccessManager<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorTimelockCompound.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c\u00a0<a href=\"https:\/\/github.com\/compound-finance\/compound-protocol\/blob\/master\/contracts\/Timelock.sol\"><u>Timelock<\/u><\/a>\u00a0\u043e\u0442 Compound.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorTimelockControl.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u043e\u0442\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0438\u043d\u044f\u0442\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0420\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u043c\u00a0<a href=\"https:\/\/github.com\/OpenZeppelin\/openzeppelin-contracts\/blob\/v5.0.0\/contracts\/governance\/TimelockController.sol\"><u>TimelockController.sol<\/u><\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorVotes.sol<\/strong>. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u00a0<strong>&#171;\u0432\u0435\u0441 \u0433\u043e\u043b\u043e\u0441\u0430&#187;<\/strong>. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u043c\u00a0<strong>\u043e\u0434\u043d\u0438\u043c<\/strong>\u00a0\u0442\u043e\u043a\u0435\u043d\u043e\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430 \u043f\u0440\u0438\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043a\u00a0<strong>\u0434\u0432\u0443\u043c<\/strong>\u00a0\u0433\u043e\u043b\u043e\u0441\u0430\u043c \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorVotesQuorumFraction.sol<\/strong>. \u0412\u0432\u043e\u0434\u0438\u0442 \u043f\u043e\u043d\u044f\u0442\u0438\u0435\u00a0<strong>\u043a\u0432\u043e\u0440\u0443\u043c<\/strong>. \u0421\u043b\u0435\u0434\u0438\u0442 \u0437\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0432\u0448\u0438\u0445 \u0431\u044b\u043b\u043e \u043d\u0435 \u043c\u0435\u043d\u044c\u0448\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0446\u0435\u043d\u0442 \u043e\u0442 \u0432\u0441\u0435\u0445, \u043a\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0432\u043e\u0440\u0443\u043c \u0440\u0430\u0432\u043d\u044b\u0439 50% \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u0435 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u0443\u0441\u043f\u0435\u0448\u043d\u043e, \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 50%, \u043e\u0442 \u0432\u0441\u0435\u0445 \u043a\u0442\u043e \u043c\u043e\u0433 \u043f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u0442\u044c, \u0433\u043e\u043b\u043e\u0441\u0443\u044e\u0442 &#171;\u0437\u0430&#187;.<\/p>\n<\/li>\n<li>\n<p><strong>GovernorPreventLateQuorum.sol<\/strong>. \u041e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u0435\u0442 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043f\u0435\u0440\u0438\u043e\u0434 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438 \u0434\u043e\u0441\u0442\u0438\u0436\u0435\u043d\u0438\u0435 \u043a\u0432\u043e\u0440\u0443\u043c\u0430.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Utils<\/strong>. \u0421\u043f\u0438\u0441\u043e\u043a \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<ul>\n<li>\n<p><strong>Votes.sol<\/strong>. \u0410\u0431\u0441\u0442\u0440\u0430\u043a\u0442\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u0434\u043b\u044f \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u0435\u0434\u0438\u043d\u0438\u0446 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f. \u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u0442 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c \u0434\u0435\u043b\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432. \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043a\u0435\u043d\u0430 ERC20Votes \u0438 ERC721Votes.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f<\/h3>\n<p>\u0412 \u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u044f \u043f\u043e\u043a\u0430\u0436\u0443, \u043a\u0430\u043a\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043d\u0430 \u043a\u0430\u043a\u0438\u0445 \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u0430\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u0441\u0430\u043c\u0443\u044e \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430 \u0431\u0430\u0437\u0435 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u043e\u0432\u00a0<strong>governance<\/strong>\u00a0\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 OpenZeppelin.<\/p>\n<pre><code class=\"javascript\">\/\/ SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.20;  import {Governor} from \"@openzeppelin\/contracts\/governance\/Governor.sol\"; import {GovernorSettings} from<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-371429","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371429","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=371429"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/371429\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=371429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=371429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=371429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}