{"id":462308,"date":"2025-06-07T09:00:08","date_gmt":"2025-06-07T09:00:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=462308"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=462308","title":{"rendered":"<span>\u041a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441\u0432\u043e\u0435 \u043f\u0435\u0440\u0432\u043e\u0435 \u043e\u043c\u043d\u0438\u0447\u0435\u0439\u043d \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0431\u0430\u0437\u0435 LayerZero v2? \u0427\u0430\u0441\u0442\u044c 3. \u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b (options), \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438, PreCrime<\/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 decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/992\/b7c\/c5b\/992b7cc5b7eedf933bf1e7ca31235f4a.png\" width=\"1354\" height=\"690\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/992\/b7c\/c5b\/992b7cc5b7eedf933bf1e7ca31235f4a.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/992\/b7c\/c5b\/992b7cc5b7eedf933bf1e7ca31235f4a.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u042d\u0442\u043e \u0442\u0440\u0435\u0442\u044c\u044f, \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043c\u043e\u0435\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u043f\u0440\u043e LayerZero v2. \u0412\u00a0<a href=\"https:\/\/habr.com\/ru\/articles\/899020\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>\u00a0\u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 OApp \u0432 Remix, \u0432\u043e <a href=\"https:\/\/habr.com\/ru\/articles\/903474\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0442\u043e\u0440\u043e\u0439<\/a> \u2014 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u043c\u0438\u043d\u0447\u0435\u0439\u043d \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 OFT-\u0442\u043e\u043a\u0435\u043d\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e, \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043e\u043f\u0446\u0438\u0438: \u043a\u0430\u043a\u0438\u0435 \u043e\u043d\u0438 \u0431\u044b\u0432\u0430\u044e\u0442 \u0438 \u043a\u0430\u043a \u043e\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c PreCrime.<\/p>\n<h3>\u041a\u0430\u043a\u0438\u0435 \u0431\u044b\u0432\u0430\u044e\u0442 \u043e\u043f\u0446\u0438\u0438 \u0438 \u043a\u0430\u043a \u043e\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b?<\/h3>\n<p>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b LayerZero \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u041e\u0434\u043d\u0430 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u2014\u00a0<strong>options<\/strong>.<\/p>\n<p>\u041c\u044b \u0443\u0436\u0435 \u043d\u0435\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u00a0<code>options<\/code>\u00a0\u0432 \u0441\u0430\u043c\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">uint128 GAS_LIMIT = 50000; \/\/ gasLimit \u0434\u043b\u044f Executor uint128 MSG_VALUE = 0; \/\/ msg.value \u0434\u043b\u044f lzReceive() (wei)  bytes memory options = OptionsBuilder.newOptions().addExecutorLzReceiveOption(GAS_LIMIT, MSG_VALUE);<\/code><\/pre>\n<p>\u0417\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0446\u0438\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u00a0<a href=\"https:\/\/github.com\/LayerZero-Labs\/devtools\/blob\/main\/packages\/oapp-evm\/contracts\/oapp\/libs\/OptionsBuilder.sol\" rel=\"noopener noreferrer nofollow\"><code>OptionsBuilder<\/code><\/a>. \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u00a0<code>OptionsBuilder<\/code>, \u044d\u0442\u043e \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<code>newOptions<\/code>.<\/p>\n<pre><code class=\"cpp\">function newOptions() internal pure returns (bytes memory) {     return abi.encodePacked(TYPE_3); }<\/code><\/pre>\n<p>\u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u00a0<code>OFTCore<\/code>\u00a0\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u00a0<code>OAppOptionsType3<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e\u00a0<strong>\u0432\u0441\u0435 \u043e\u043f\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0442\u0438\u043f\u0430\u00a0<\/strong><code><strong>TYPE_3<\/strong><\/code>\u00a0\u0447\u0435\u0440\u0435\u0437\u00a0<code>_assertOptionsType3<\/code>.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e,\u00a0<code>OptionsBuilder::addExecutorLzReceiveOption<\/code>\u00a0\u0438\u043c\u0435\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u00a0<code>onlyType3<\/code>.<\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<code>TYPE_1<\/code>\u00a0\u0438\u00a0<code>TYPE_2<\/code>? \u042d\u0442\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0434\u043b\u044f \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u043e\u043f\u0446\u0438\u0439 \u0438\u0437 LayerZero v1. \u0412 LayerZero v2 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e\u00a0<code>TYPE_3<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u0439 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<h4>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h4>\n<p>\u041e\u043f\u0446\u0438\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><code>TYPE_1<\/code>\u00a0\u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e\u00a0<code>gasLimit<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>TYPE_2<\/code>\u00a0\u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 (<code>native drop<\/code>).<\/p>\n<\/li>\n<li>\n<p><code>TYPE_3<\/code>\u00a0\u2014 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u00a0<code>TYPE_3<\/code>\u00a0\u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437:<\/p>\n<ul>\n<li>\n<p>\u0442\u0438\u043f\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430,<\/p>\n<\/li>\n<li>\n<p>ID \u0432\u043e\u0440\u043a\u0435\u0440\u0430,<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043e\u043f\u0446\u0438\u0439,<\/p>\n<\/li>\n<li>\n<p>\u0442\u0438\u043f\u0430 \u043e\u043f\u0446\u0438\u0439,<\/p>\n<\/li>\n<li>\n<p>\u0441\u0430\u043c\u0438\u0445 \u043e\u043f\u0446\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0438\u043f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 (<code>TYPE_3<\/code>):<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e8e\/88f\/c46\/e8e88fc466b69d1e78d80857d2484a77.png\" alt=\"\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 bytes \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0446\u0438\u0439\" title=\"\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 bytes \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0446\u0438\u0439\" width=\"1604\" height=\"290\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e8e\/88f\/c46\/e8e88fc466b69d1e78d80857d2484a77.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e8e\/88f\/c46\/e8e88fc466b69d1e78d80857d2484a77.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 bytes \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0446\u0438\u0439<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u0430\u043c\u0438 \u043e\u043f\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u00a0<code>addExecutorLzReceiveOption<\/code>\u00a0\u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443\u00a0<code>ExecutorOptions<\/code>:<\/p>\n<pre><code class=\"cpp\">\/\/ OptionsBuilder library function addExecutorLzReceiveOption(     bytes memory _options,     uint128 _gas,     uint128 _value ) internal pure onlyType3(_options) returns (bytes memory) {     bytes memory option = ExecutorOptions.encodeLzReceiveOption(_gas, _value);     return addExecutorOption(_options, ExecutorOptions.OPTION_TYPE_LZRECEIVE, option); }  \/\/ ---------------------------------------------------------  \/\/ ExecutorOptions library function encodeLzReceiveOption(uint128 _gas, uint128 _value) internal pure returns (bytes memory) {     return _value == 0 ? abi.encodePacked(_gas) : abi.encodePacked(_gas, _value); }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044f\u00a0<code>GAS_LIMIT<\/code>\u00a0\u0438\u00a0<code>MSG_VALUE<\/code>:<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/605\/1f9\/ced\/6051f9ced358be8fad2069c2da121da4.png\" width=\"1612\" height=\"270\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/605\/1f9\/ced\/6051f9ced358be8fad2069c2da121da4.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/605\/1f9\/ced\/6051f9ced358be8fad2069c2da121da4.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f ID \u0432\u043e\u0440\u043a\u0435\u0440\u0430, \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u0442\u0438\u043f \u043e\u043f\u0446\u0438\u0438:<\/p>\n<pre><code class=\"cpp\">function addExecutorOption(     bytes memory _options,     uint8 _optionType,     bytes memory _option ) internal pure onlyType3(_options) returns (bytes memory) {     return abi.encodePacked(         _options,         ExecutorOptions.WORKER_ID,         _option.length.toUint16() + 1, \/\/ \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043f\u0446\u0438\u0438 + 1 \u0431\u0430\u0439\u0442 \u0434\u043b\u044f \u0442\u0438\u043f\u0430         _optionType,         _option     ); }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p><strong>Worker ID<\/strong>\u00a0(\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0445 \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430):<\/p>\n<ul>\n<li>\n<p>Executor (<code>id = 1<\/code>) \u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u043f\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437\u00a0<a href=\"https:\/\/github.com\/LayerZero-Labs\/LayerZero-v2\/blob\/main\/packages\/layerzero-v2\/evm\/messagelib\/contracts\/libs\/ExecutorOptions.sol\" rel=\"noopener noreferrer nofollow\"><code>ExecutorOptions<\/code><\/a>.<\/p>\n<\/li>\n<li>\n<p>DVN (<code>id = 2<\/code>) \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f\u00a0<a href=\"https:\/\/github.com\/LayerZero-Labs\/LayerZero-v2\/blob\/main\/packages\/layerzero-v2\/evm\/messagelib\/contracts\/uln\/libs\/DVNOptions.sol\" rel=\"noopener noreferrer nofollow\"><code>DVNOptions<\/code><\/a>.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Option Type<\/strong>\u00a0(\u043f\u043e\u043a\u0430 \u0438\u0445 5):<\/p>\n<ul>\n<li>\n<p><code>OPTION_TYPE_LZRECEIVE<\/code>\u00a0= 1<\/p>\n<\/li>\n<li>\n<p><code>OPTION_TYPE_NATIVE_DROP<\/code>\u00a0= 2<\/p>\n<\/li>\n<li>\n<p><code>OPTION_TYPE_LZCOMPOSE<\/code>\u00a0= 3<\/p>\n<\/li>\n<li>\n<p><code>OPTION_TYPE_ORDERED_EXECUTION<\/code>\u00a0= 4<\/p>\n<\/li>\n<li>\n<p><code>OPTION_TYPE_LZREAD<\/code>\u00a0= 5<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u00a0<code>addExecutorLzReceiveOption<\/code>:<\/p>\n<ul>\n<li>\n<p><code>worker id = 1<\/code>\u00a0(Executor)<\/p>\n<\/li>\n<li>\n<p><code>option type = 1<\/code>\u00a0(<code>OPTION_TYPE_LZRECEIVE<\/code>)<\/p>\n<\/li>\n<li>\n<p><code>option length = 17<\/code>\u00a0(gasLimit = 16 \u0431\u0430\u0439\u0442 + 1 \u0431\u0430\u0439\u0442 type)<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438\u00a0<code>value &gt; 0<\/code>, \u0434\u043b\u0438\u043d\u0430\u00a0<code>option<\/code>\u00a0\u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 (<code>gasLimit 16 + value 16 + type 1 = 33 \u0431\u0430\u0439\u0442\u0430<\/code>). \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0439\u00a0<code>value<\/code>\u00a0\u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u043e\u043f\u0446\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre><code class=\"cpp\">0003 01 0011 01 0000000000000000000000000000c350  opt.type | work.id | ex.opt.type.length | ex.opt.type |         option          | uint16   | uint8   | uint16             | uint8       | uint128         | 0     | 3        | 1       | 17                 | 1           | 50000 (gasLimit)| value |<\/code><\/pre>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/85c\/bd8\/7fb\/85cbd87fbcbf75be384207d83c11ec05.png\" alt=\"\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 TYPE_3\" title=\"\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 TYPE_3\" width=\"1606\" height=\"290\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/85c\/bd8\/7fb\/85cbd87fbcbf75be384207d83c11ec05.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/85c\/bd8\/7fb\/85cbd87fbcbf75be384207d83c11ec05.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<div><figcaption><em>\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 TYPE_3<\/em><\/figcaption><\/div>\n<\/figure>\n<h4>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043e\u043f\u0446\u0438\u0439<\/h4>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 \u043e\u043f\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432\u00a0<a href=\"https:\/\/github.com\/LayerZero-Labs\/devtools\/blob\/main\/packages\/oapp-evm\/contracts\/oapp\/libs\/OptionsBuilder.sol\" rel=\"noopener noreferrer nofollow\"><code>OptionsBuilder<\/code><\/a>.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0438\u0434\u044b \u043e\u043f\u0446\u0438\u0439 \u0432\u00a0<a href=\"https:\/\/remix.ethereum.org\/#url=https:\/\/docs.layerzero.network\/LayerZero\/contracts\/OptionsGenerator.sol&amp;lang=en&amp;optimize=false&amp;runs=200&amp;evmVersion=null&amp;version=soljson-v0.8.26+commit.8a97fa7a.js\" rel=\"noopener noreferrer nofollow\">Remix<\/a>.<\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 gasLimit<\/h3>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u00a0<code>gasLimit<\/code>\u00a0\u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0441\u0445\u043e\u0434\u0430 \u0433\u0430\u0437\u0430 \u0432 \u0441\u0435\u0442\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. &#171;\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c&#187; \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u043a\u043e\u0434\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u0435\u0441\u0442\u044c\u00a0<strong>\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043b\u0438\u043c\u0438\u0442 \u0433\u0430\u0437\u0430<\/strong>\u00a0(<code>nativeCap<\/code>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u0441\u0435\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437\u00a0<code>Executor::dstConfig(dstEid)<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443\u00a0<code>DstConfig<\/code>:<\/p>\n<pre><code class=\"cpp\">struct DstConfig {     uint64 baseGas;     uint16 multiplierBps;     uint128 floorMarginUSD;     uint128 nativeCap; }<\/code><\/pre>\n<ul>\n<li>\n<p><code><strong>baseGas<\/strong><\/code>\u00a0\u2014 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0433\u0430\u0437\u0430 \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 (<code>lzReceive<\/code>, \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0435\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438). \u042d\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u0430\u0437\u0430 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><code><strong>multiplierBps<\/strong><\/code>\u00a0\u2014 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c \u0432\u00a0<strong>\u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0445 \u043f\u0443\u043d\u043a\u0442\u0430\u0445<\/strong>\u00a0(1 bps = 0,01%). \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0430\u0437\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><code><strong>floorMarginUSD<\/strong><\/code>\u00a0\u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 \u0432 USD \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0441\u043f\u0430\u043c\u0430 \u0438 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0437\u0430\u0442\u0440\u0430\u0442. \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 USD \u043d\u0438\u0436\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043e\u043d\u0430\u00a0<strong>\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u00a0<\/strong><code><strong>floorMarginUSD<\/strong><\/code>.<\/p>\n<\/li>\n<li>\n<p><code><strong>nativeCap<\/strong><\/code>\u00a0\u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043b\u0438\u043c\u0438\u0442 \u0433\u0430\u0437\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 OApp \u043c\u043e\u0436\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0441\u0435\u0442\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"cpp\">npx hardhat lz:oapp:config:get:executor<\/code><\/pre>\n<h3>Native drop<\/h3>\n<p><code>Native drop<\/code>\u00a0\u2014 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430\u00a0<strong>\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432<\/strong>\u00a0\u0432 \u0441\u0435\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u00a0<code>addExecutorLzReceiveOption<\/code>\u00a0\u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (<code>MSG_VALUE<\/code>) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0446\u0438\u044f\u00a0<code>addExecutorNativeDropOption<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u00a0<code>amount<\/code>\u00a0(\u0441\u0443\u043c\u043c\u0443) \u0438\u00a0<code>receiver<\/code>\u00a0(\u0430\u0434\u0440\u0435\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f) \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u00a0<code>gasLimit<\/code>:<\/p>\n<pre><code class=\"cpp\">function addExecutorNativeDropOption(     bytes memory _options,     uint128 _amount,     bytes32 _receiver ) internal pure onlyType3(_options) returns (bytes memory) {     bytes memory option = ExecutorOptions.encodeNativeDropOption(_amount, _receiver);     return addExecutorOption(_options, ExecutorOptions.OPTION_TYPE_NATIVE_DROP, option); }<\/code><\/pre>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/em>\u00a0\u0420\u0430\u043d\u0435\u0435 \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u0431\u044b\u043b\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 native drop &#8212; 0.5 \u0442\u043e\u043a\u0435\u043d\u0430 \u0432 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u0435 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0441\u0435\u0442\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 ETH, BNB \u0438 \u0442.\u0434.). \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0435\u0440\u0435\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0443\u043c\u043c\u0430, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443. \u0421\u0435\u0439\u0447\u0430\u0441 \u043e\u0431 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0439, \u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432 \u0432\u0438\u0434\u0443 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c.<\/p>\n<p>\u041c\u044b \u0441 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0438\u0448\u0435\u043c \u0432 \u043d\u0430\u0448\u0435\u043c<a href=\"https:\/\/t.me\/+8p2iaLV6_tBmNTZi\" rel=\"noopener noreferrer nofollow\"> Telegram<\/a>-\u043a\u0430\u043d\u0430\u043b\u0435. \u0418\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u044b\u0441\u043b\u0438 \u0432\u0441\u043b\u0443\u0445, \u0438\u043d\u043e\u0433\u0434\u0430 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438. \u041d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0441\u0451 \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0435\u043c \u0432 \u0441\u0442\u0430\u0442\u044c\u0438, \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0449\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0441\u0442 \u0432 \u0442\u0435\u043b\u0435\u0433\u0443. \u0422\u0430\u043a \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438 \u0447\u0442\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u043c, \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c.<\/p>\n<h3>PreCrime<\/h3>\n<p>\u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439:<\/p>\n<ul>\n<li>\n<p><code>quote<\/code><\/p>\n<\/li>\n<li>\n<p><code>msgInspector<\/code><\/p>\n<\/li>\n<li>\n<p><code>enforcedOptions<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u043e \u0432\u00a0<strong>\u0441\u0435\u0442\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/strong>\u00a0\u0432\u0441\u0435 \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e.<\/p>\n<p>\u0412 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 OFT-\u0442\u043e\u043a\u0435\u043d\u0430 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043e\u0434\u0438\u043d \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u2014\u00a0<a href=\"https:\/\/github.com\/LayerZero-Labs\/devtools\/blob\/05443835db976b7a528b883b19ddf02cb7f36d89\/packages\/oapp-evm\/contracts\/precrime\/OAppPreCrimeSimulator.sol\" rel=\"noopener noreferrer nofollow\"><code>OAppPreCrimeSimulator<\/code><\/a>.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u00a0<a href=\"https:\/\/github.com\/LayerZero-Labs\/devtools\/blob\/05443835db976b7a528b883b19ddf02cb7f36d89\/packages\/oapp-evm\/contracts\/precrime\/PreCrime.sol\" rel=\"noopener noreferrer nofollow\"><code>PreCrime<\/code><\/a>. \u041c\u043e\u0434\u0443\u043b\u044c\u00a0<code>PreCrime<\/code>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f\u00a0<strong>\u043e\u0444\u0447\u0435\u0439\u043d-\u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438\u00a0<\/strong><code><strong>_lzReceive<\/strong><\/code>, \u043f\u043e \u0437\u0430\u0434\u0443\u043c\u043a\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438 \u0433\u0434\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u00a0<code>OAppPreCrimeSimulator::lzReceiveAndRevert<\/code>\u00a0<strong>\u0432\u0441\u0435\u0433\u0434\u0430<\/strong>\u00a0\u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f\u00a0<code>revert<\/code>, \u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043e\u0448\u0438\u0431\u043a\u0438\u00a0<code>SimulationResult<\/code>, \u043a\u0443\u0434\u0430 \u043e\u043d\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437\u00a0<code>PreCrime::buildSimulationResult<\/code>.<\/p>\n<p>\u042d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043d\u043e\u00a0<strong>\u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c<\/strong>\u00a0PreCrime \u2014 \u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441\u043e \u0441\u0442\u0435\u043a\u043e\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u043c\u043e\u0447\u0438\u044f \u043e\u0442\u043c\u0435\u043d\u044f\u0442\u044c \u0442\u0440\u043d\u0430\u0437\u0430\u043a\u0446\u0438\u0438 \u0435\u0449\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432 \u043a\u0430\u043d\u0430\u043b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0411\u044d\u043a\u0435\u043d\u0434 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<code>PreCrime<\/code>\u00a0\u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430. \u0415\u0441\u043b\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f, \u043e\u043d\u0430 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u00a0<code>MessagingChannel<\/code>, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 Executor.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043f\u043e \u0438\u0442\u043e\u0433\u0443 \u0442\u0440\u0435\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u0443 \u0432\u0430\u0441 \u0441\u043b\u043e\u0436\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 OApp \u0432 \u0446\u0435\u043b\u043e\u043c \u0438 OFT \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u0433\u0430\u0437 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 LayerZero \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e Executor, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430\u00a0<code>compose<\/code>\u00a0\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, lzRead \u0434\u043b\u044f \u043e\u0444\u0447\u0435\u0439\u043d \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u0434\u0440\u0443\u0433\u043e\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0435\u0440\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0447\u043a\u043e\u0439 \u0441\u0442\u0430\u0440\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c.<\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/LayerZero-Labs\/LayerZero-v2\" rel=\"noopener noreferrer nofollow\">GitHub: LayerZero v2<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/LayerZero-Labs\/devtools\/blob\/main\/packages\/oft-evm\/contracts\" rel=\"noopener noreferrer nofollow\">GitHub: LayerZero-Labs\/devtools<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.layerzero.network\/v2\" rel=\"noopener noreferrer nofollow\">Docs: LayerZero v2<\/a><\/p>\n<\/li>\n<\/ul>\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\/916426\/\"> https:\/\/habr.com\/ru\/articles\/916426\/<\/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>\u042d\u0442\u043e \u0442\u0440\u0435\u0442\u044c\u044f, \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043c\u043e\u0435\u0433\u043e \u0446\u0438\u043a\u043b\u0430 \u043f\u0440\u043e LayerZero v2. \u0412\u00a0<a href=\"https:\/\/habr.com\/ru\/articles\/899020\/\" rel=\"noopener noreferrer nofollow\">\u043f\u0435\u0440\u0432\u043e\u0439 \u0447\u0430\u0441\u0442\u0438<\/a>\u00a0\u044f \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u043b, \u043a\u0430\u043a \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 OApp \u0432 Remix, \u0432\u043e <a href=\"https:\/\/habr.com\/ru\/articles\/903474\/\" rel=\"noopener noreferrer nofollow\">\u0432\u0442\u043e\u0440\u043e\u0439<\/a> \u2014 \u043f\u043e\u043a\u0430\u0437\u0430\u043b, \u043a\u0430\u043a \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u043c\u0438\u043d\u0447\u0435\u0439\u043d \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 OFT-\u0442\u043e\u043a\u0435\u043d\u0430. \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u0438\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0434\u043e\u043a\u0440\u0443\u0442\u0438\u0442\u044c \u0434\u0435\u0442\u0430\u043b\u0438.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u044e, \u043a\u0430\u043a \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043e\u043f\u0446\u0438\u0438: \u043a\u0430\u043a\u0438\u0435 \u043e\u043d\u0438 \u0431\u044b\u0432\u0430\u044e\u0442 \u0438 \u043a\u0430\u043a \u043e\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c PreCrime.<\/p>\n<h3>\u041a\u0430\u043a\u0438\u0435 \u0431\u044b\u0432\u0430\u044e\u0442 \u043e\u043f\u0446\u0438\u0438 \u0438 \u043a\u0430\u043a \u043e\u043d\u0438 \u0443\u0441\u0442\u0440\u043e\u0435\u043d\u044b?<\/h3>\n<p>\u041f\u0440\u043e\u0442\u043e\u043a\u043e\u043b LayerZero \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u0436\u043d\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u0442\u044c \u043f\u0440\u0438 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435. \u041e\u0434\u043d\u0430 \u0438\u0437 \u0442\u0430\u043a\u0438\u0445 \u0434\u0435\u0442\u0430\u043b\u0435\u0439 \u2014\u00a0<strong>options<\/strong>.<\/p>\n<p>\u041c\u044b \u0443\u0436\u0435 \u043d\u0435\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u00a0<code>options<\/code>\u00a0\u0432 \u0441\u0430\u043c\u043e\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0444\u043e\u0440\u043c\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"cpp\">uint128 GAS_LIMIT = 50000; \/\/ gasLimit \u0434\u043b\u044f Executor uint128 MSG_VALUE = 0; \/\/ msg.value \u0434\u043b\u044f lzReceive() (wei)  bytes memory options = OptionsBuilder.newOptions().addExecutorLzReceiveOption(GAS_LIMIT, MSG_VALUE);<\/code><\/pre>\n<p>\u0417\u0430 \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0446\u0438\u0439 \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u00a0<a href=\"https:\/\/github.com\/LayerZero-Labs\/devtools\/blob\/main\/packages\/oapp-evm\/contracts\/oapp\/libs\/OptionsBuilder.sol\" rel=\"noopener noreferrer nofollow\"><code>OptionsBuilder<\/code><\/a>. \u041f\u0435\u0440\u0432\u043e\u0435, \u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442\u00a0<code>OptionsBuilder<\/code>, \u044d\u0442\u043e \u0432\u044b\u0437\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438\u00a0<code>newOptions<\/code>.<\/p>\n<pre><code class=\"cpp\">function newOptions() internal pure returns (bytes memory) {     return abi.encodePacked(TYPE_3); }<\/code><\/pre>\n<p>\u041a\u043e\u043d\u0442\u0440\u0430\u043a\u0442\u00a0<code>OFTCore<\/code>\u00a0\u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u00a0<code>OAppOptionsType3<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0447\u0442\u043e\u00a0<strong>\u0432\u0441\u0435 \u043e\u043f\u0446\u0438\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0442\u0438\u043f\u0430\u00a0<\/strong><code><strong>TYPE_3<\/strong><\/code>\u00a0\u0447\u0435\u0440\u0435\u0437\u00a0<code>_assertOptionsType3<\/code>.<\/p>\n<p>\u041a\u0440\u043e\u043c\u0435 \u0442\u043e\u0433\u043e,\u00a0<code>OptionsBuilder::addExecutorLzReceiveOption<\/code>\u00a0\u0438\u043c\u0435\u0435\u0442 \u043c\u043e\u0434\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440\u00a0<code>onlyType3<\/code>.<\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435\u043b\u044c\u0437\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<code>TYPE_1<\/code>\u00a0\u0438\u00a0<code>TYPE_2<\/code>? \u042d\u0442\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u044b \u0434\u043b\u044f \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0438 \u043e\u043f\u0446\u0438\u0439 \u0438\u0437 LayerZero v1. \u0412 LayerZero v2 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e\u00a0<code>TYPE_3<\/code>, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0431\u043e\u043b\u0435\u0435 \u0433\u0438\u0431\u043a\u0438\u0439 \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0440\u0430\u0441\u0448\u0438\u0440\u044f\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c.<\/p>\n<h4>\u0421\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430<\/h4>\n<p>\u041e\u043f\u0446\u0438\u0438 \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432:<\/p>\n<ul>\n<li>\n<p><code>TYPE_1<\/code>\u00a0\u2014 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e\u00a0<code>gasLimit<\/code>.<\/p>\n<\/li>\n<li>\n<p><code>TYPE_2<\/code>\u00a0\u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u043b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 (<code>native drop<\/code>).<\/p>\n<\/li>\n<li>\n<p><code>TYPE_3<\/code>\u00a0\u2014 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u0438.<\/p>\n<\/li>\n<\/ul>\n<p>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u00a0<code>TYPE_3<\/code>\u00a0\u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437:<\/p>\n<ul>\n<li>\n<p>\u0442\u0438\u043f\u0430 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430,<\/p>\n<\/li>\n<li>\n<p>ID \u0432\u043e\u0440\u043a\u0435\u0440\u0430,<\/p>\n<\/li>\n<li>\n<p>\u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u043e\u043f\u0446\u0438\u0439,<\/p>\n<\/li>\n<li>\n<p>\u0442\u0438\u043f\u0430 \u043e\u043f\u0446\u0438\u0439,<\/p>\n<\/li>\n<li>\n<p>\u0441\u0430\u043c\u0438\u0445 \u043e\u043f\u0446\u0438\u0439.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0438\u043f \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0430 (<code>TYPE_3<\/code>):<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0432 \u0432\u0438\u0434\u0435 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 bytes \u0434\u043b\u044f \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u0446\u0438\u0439<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0441\u0430\u043c\u0438 \u043e\u043f\u0446\u0438\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u00a0<code>addExecutorLzReceiveOption<\/code>\u00a0\u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443\u00a0<code>ExecutorOptions<\/code>:<\/p>\n<pre><code class=\"cpp\">\/\/ OptionsBuilder library function addExecutorLzReceiveOption(     bytes memory _options,     uint128 _gas,     uint128 _value ) internal pure onlyType3(_options) returns (bytes memory) {     bytes memory option = ExecutorOptions.encodeLzReceiveOption(_gas, _value);     return addExecutorOption(_options, ExecutorOptions.OPTION_TYPE_LZRECEIVE, option); }  \/\/ ---------------------------------------------------------  \/\/ ExecutorOptions library function encodeLzReceiveOption(uint128 _gas, uint128 _value) internal pure returns (bytes memory) {     return _value == 0 ? abi.encodePacked(_gas) : abi.encodePacked(_gas, _value); }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044f\u00a0<code>GAS_LIMIT<\/code>\u00a0\u0438\u00a0<code>MSG_VALUE<\/code>:<\/p>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f ID \u0432\u043e\u0440\u043a\u0435\u0440\u0430, \u0440\u0430\u0437\u043c\u0435\u0440 \u0438 \u0442\u0438\u043f \u043e\u043f\u0446\u0438\u0438:<\/p>\n<pre><code class=\"cpp\">function addExecutorOption(     bytes memory _options,     uint8 _optionType,     bytes memory _option ) internal pure onlyType3(_options) returns (bytes memory) {     return abi.encodePacked(         _options,         ExecutorOptions.WORKER_ID,         _option.length.toUint16() + 1, \/\/ \u0440\u0430\u0437\u043c\u0435\u0440 \u043e\u043f\u0446\u0438\u0438 + 1 \u0431\u0430\u0439\u0442 \u0434\u043b\u044f \u0442\u0438\u043f\u0430         _optionType,         _option     ); }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f:<\/p>\n<ul>\n<li>\n<p><strong>Worker ID<\/strong>\u00a0(\u043d\u0430 \u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0438\u0445 \u0432\u0441\u0435\u0433\u043e \u0434\u0432\u0430):<\/p>\n<ul>\n<li>\n<p>Executor (<code>id = 1<\/code>) \u2014 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u043f\u0446\u0438\u0438 \u0447\u0435\u0440\u0435\u0437\u00a0<a href=\"https:\/\/github.com\/LayerZero-Labs\/LayerZero-v2\/blob\/main\/packages\/layerzero-v2\/evm\/messagelib\/contracts\/libs\/ExecutorOptions.sol\" rel=\"noopener noreferrer nofollow\"><code>ExecutorOptions<\/code><\/a>.<\/p>\n<\/li>\n<li>\n<p>DVN (<code>id = 2<\/code>) \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f\u00a0<a href=\"https:\/\/github.com\/LayerZero-Labs\/LayerZero-v2\/blob\/main\/packages\/layerzero-v2\/evm\/messagelib\/contracts\/uln\/libs\/DVNOptions.sol\" rel=\"noopener noreferrer nofollow\"><code>DVNOptions<\/code><\/a>.<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p><strong>Option Type<\/strong>\u00a0(\u043f\u043e\u043a\u0430 \u0438\u0445 5):<\/p>\n<ul>\n<li>\n<p><code>OPTION_TYPE_LZRECEIVE<\/code>\u00a0= 1<\/p>\n<\/li>\n<li>\n<p><code>OPTION_TYPE_NATIVE_DROP<\/code>\u00a0= 2<\/p>\n<\/li>\n<li>\n<p><code>OPTION_TYPE_LZCOMPOSE<\/code>\u00a0= 3<\/p>\n<\/li>\n<li>\n<p><code>OPTION_TYPE_ORDERED_EXECUTION<\/code>\u00a0= 4<\/p>\n<\/li>\n<li>\n<p><code>OPTION_TYPE_LZREAD<\/code>\u00a0= 5<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430\u00a0<code>addExecutorLzReceiveOption<\/code>:<\/p>\n<ul>\n<li>\n<p><code>worker id = 1<\/code>\u00a0(Executor)<\/p>\n<\/li>\n<li>\n<p><code>option type = 1<\/code>\u00a0(<code>OPTION_TYPE_LZRECEIVE<\/code>)<\/p>\n<\/li>\n<li>\n<p><code>option length = 17<\/code>\u00a0(gasLimit = 16 \u0431\u0430\u0439\u0442 + 1 \u0431\u0430\u0439\u0442 type)<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438\u00a0<code>value &gt; 0<\/code>, \u0434\u043b\u0438\u043d\u0430\u00a0<code>option<\/code>\u00a0\u0431\u0443\u0434\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 (<code>gasLimit 16 + value 16 + type 1 = 33 \u0431\u0430\u0439\u0442\u0430<\/code>). \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u043b\u0435\u0432\u043e\u0439\u00a0<code>value<\/code>\u00a0\u043e\u0442\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 \u043e\u043f\u0446\u0438\u0439 \u0431\u0443\u0434\u0435\u0442 \u0442\u0430\u043a\u043e\u0439:<\/p>\n<pre><code class=\"cpp\">0003 01 0011 01 0000000000000000000000000000c350  opt.type | work.id | ex.opt.type.length | ex.opt.type |         option          | uint16   | uint8   | uint16             | uint8       | uint128         | 0     | 3        | 1       | 17                 | 1           | 50000 (gasLimit)| value |<\/code><\/pre>\n<figure class=\"full-width\">\n<div><figcaption><em>\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440\u0435 TYPE_3<\/em><\/figcaption><\/div>\n<\/figure>\n<h4>\u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0437\u0430\u0434\u0430\u043d\u0438\u044f \u043e\u043f\u0446\u0438\u0439<\/h4>\n<p>\u0414\u0440\u0443\u0433\u0438\u0435 \u043e\u043f\u0446\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u0432\u00a0<a href=\"https:\/\/github.com\/LayerZero-Labs\/devtools\/blob\/main\/packages\/oapp-evm\/contracts\/oapp\/libs\/OptionsBuilder.sol\" rel=\"noopener noreferrer nofollow\"><code>OptionsBuilder<\/code><\/a>.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043d\u044b\u0435 \u0432\u0438\u0434\u044b \u043e\u043f\u0446\u0438\u0439 \u0432\u00a0<a href=\"https:\/\/remix.ethereum.org\/#url=https:\/\/docs.layerzero.network\/LayerZero\/contracts\/OptionsGenerator.sol&amp;lang=en&amp;optimize=false&amp;runs=200&amp;evmVersion=null&amp;version=soljson-v0.8.26+commit.8a97fa7a.js\" rel=\"noopener noreferrer nofollow\">Remix<\/a>.<\/p>\n<h3>\u0420\u0430\u0431\u043e\u0442\u0430 \u0441 gasLimit<\/h3>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u00a0<code>gasLimit<\/code>\u00a0\u0440\u0430\u0441\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0441\u0445\u043e\u0434\u0430 \u0433\u0430\u0437\u0430 \u0432 \u0441\u0435\u0442\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. &#171;\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c&#187; \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u043f\u043a\u043e\u0434\u043e\u0432 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u043b\u0438\u0447\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430\u0445, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0430\u0436\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0435\u0442\u0438.<\/p>\n<p>\u0423 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u0435\u0441\u0442\u044c\u00a0<strong>\u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043b\u0438\u043c\u0438\u0442 \u0433\u0430\u0437\u0430<\/strong>\u00a0(<code>nativeCap<\/code>), \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u0441\u0435\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u044d\u0442\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u0447\u0435\u0440\u0435\u0437\u00a0<code>Executor::dstConfig(dstEid)<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443\u00a0<code>DstConfig<\/code>:<\/p>\n<pre><code class=\"cpp\">struct DstConfig {     uint64 baseGas;     uint16 multiplierBps;     uint128 floorMarginUSD;     uint128 nativeCap; }<\/code><\/pre>\n<ul>\n<li>\n<p><code><strong>baseGas<\/strong><\/code>\u00a0\u2014 \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0433\u0430\u0437\u0430 \u0434\u043b\u044f \u0431\u0430\u0437\u043e\u0432\u044b\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 (<code>lzReceive<\/code>, \u0432\u0435\u0440\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0435\u043a \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438). \u042d\u0442\u043e \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u0430\u0437\u0430 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><code><strong>multiplierBps<\/strong><\/code>\u00a0\u2014 \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044c \u0432\u00a0<strong>\u0431\u0430\u0437\u0438\u0441\u043d\u044b\u0445 \u043f\u0443\u043d\u043a\u0442\u0430\u0445<\/strong>\u00a0(1 bps = 0,01%). \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0433\u0430\u0437\u0430 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p><code><strong>floorMarginUSD<\/strong><\/code>\u00a0\u2014 \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0430 \u0432 USD \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u0441\u043f\u0430\u043c\u0430 \u0438 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0437\u0430\u0442\u0440\u0430\u0442. \u0415\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0432 USD \u043d\u0438\u0436\u0435 \u044d\u0442\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043e\u043d\u0430\u00a0<strong>\u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043d\u0430\u00a0<\/strong><code><strong>floorMarginUSD<\/strong><\/code>.<\/p>\n<\/li>\n<li>\n<p><code><strong>nativeCap<\/strong><\/code>\u00a0\u2014 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u043b\u0438\u043c\u0438\u0442 \u0433\u0430\u0437\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 OApp \u043c\u043e\u0436\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0432 \u0441\u0435\u0442\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code class=\"cpp\">npx hardhat lz:oapp:config:get:executor<\/code><\/pre>\n<h3>Native drop<\/h3>\n<p><code>Native drop<\/code>\u00a0\u2014 \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0430\u00a0<strong>\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432<\/strong>\u00a0\u0432 \u0441\u0435\u0442\u044c \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u00a0<code>addExecutorLzReceiveOption<\/code>\u00a0\u0432\u0442\u043e\u0440\u043e\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 (<code>MSG_VALUE<\/code>) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0442\u0430\u043a\u0436\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u043f\u0446\u0438\u044f\u00a0<code>addExecutorNativeDropOption<\/code>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u00a0<code>amount<\/code>\u00a0(\u0441\u0443\u043c\u043c\u0443) \u0438\u00a0<code>receiver<\/code>\u00a0(\u0430\u0434\u0440\u0435\u0441 \u043f\u043e\u043b\u0443\u0447\u0430\u0442\u0435\u043b\u044f) \u0438 \u043d\u0435 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u044f\u00a0<code>gasLimit<\/code>:<\/p>\n<pre><code class=\"cpp\">function addExecutorNativeDropOption(     bytes memory _options,     uint128 _amount,     bytes32 _receiver ) internal pure onlyType3(_options) returns (bytes memory) {     bytes memory option = ExecutorOptions.encodeNativeDropOption(_amount, _receiver);     return addExecutorOption(_options, ExecutorOptions.OPTION_TYPE_NATIVE_DROP, option); }<\/code><\/pre>\n<p><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/em>\u00a0\u0420\u0430\u043d\u0435\u0435 \u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 \u0431\u044b\u043b\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 native drop &#8212; 0.5 \u0442\u043e\u043a\u0435\u043d\u0430 \u0432 \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u0435 \u043d\u0430\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0441\u0435\u0442\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 ETH, BNB \u0438 \u0442.\u0434.). \u0411\u043e\u043b\u0435\u0435 \u0442\u043e\u0433\u043e, \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0435\u0440\u0435\u0436\u0435\u043d\u0438\u0435, \u0447\u0442\u043e \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0441\u0443\u043c\u043c\u0430, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b \u043d\u0430 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0443. \u0421\u0435\u0439\u0447\u0430\u0441 \u043e\u0431 \u044d\u0442\u043e\u043c \u043d\u0435\u0442 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043d\u0438\u0439, \u043d\u043e \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c \u0432 \u0432\u0438\u0434\u0443 \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u044f \u0442\u043e\u0436\u0435 \u043c\u043e\u0433\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c.<\/p>\n<p>\u041c\u044b \u0441 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0438\u0448\u0435\u043c \u0432 \u043d\u0430\u0448\u0435\u043c<a href=\"https:\/\/t.me\/+8p2iaLV6_tBmNTZi\" rel=\"noopener noreferrer nofollow\"> Telegram<\/a>-\u043a\u0430\u043d\u0430\u043b\u0435. \u0418\u043d\u043e\u0433\u0434\u0430 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u044b\u0441\u043b\u0438 \u0432\u0441\u043b\u0443\u0445, \u0438\u043d\u043e\u0433\u0434\u0430 \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0438. \u041d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0432\u0441\u0451 \u043e\u0444\u043e\u0440\u043c\u043b\u044f\u0435\u043c \u0432 \u0441\u0442\u0430\u0442\u044c\u0438, \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u043e\u0449\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u043f\u043e\u0441\u0442 \u0432 \u0442\u0435\u043b\u0435\u0433\u0443. \u0422\u0430\u043a \u0447\u0442\u043e, \u0435\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e, \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438 \u0447\u0442\u043e \u043e\u0431\u0441\u0443\u0436\u0434\u0430\u0435\u043c, \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0433\u043b\u044f\u043d\u0443\u0442\u044c.<\/p>\n<h3>PreCrime<\/h3>\n<p>\u0412 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0441\u0435\u0442\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u0432 \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u043e\u0439:<\/p>\n<ul>\n<li>\n<p><code>quote<\/code><\/p>\n<\/li>\n<li>\n<p><code>msgInspector<\/code><\/p>\n<\/li>\n<li>\n<p><code>enforcedOptions<\/code><\/p>\n<\/li>\n<\/ul>\n<p>\u041d\u043e \u0432\u00a0<strong>\u0441\u0435\u0442\u0438 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f<\/strong>\u00a0\u0432\u0441\u0435 \u0441\u043b\u043e\u0436\u043d\u0435\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0434\u0440\u0443\u0433\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0447\u0435\u0439\u043d\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e.<\/p>\n<p>\u0412 \u0431\u0430\u0437\u043e\u0432\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 OFT-\u0442\u043e\u043a\u0435\u043d\u0430 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u043e\u0434\u0438\u043d \u0441\u043c\u0430\u0440\u0442-\u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u043b\u0438 \u2014\u00a0<a href=\"https:\/\/github.com\/LayerZero-Labs\/devtools\/blob\/05443835db976b7a528b883b19ddf02cb7f36d89\/packages\/oapp-evm\/contracts\/precrime\/OAppPreCrimeSimulator.sol\" rel=\"noopener noreferrer nofollow\"><code>OAppPreCrimeSimulator<\/code><\/a>.<\/p>\n<p>\u042d\u0442\u043e\u0442 \u043a\u043e\u043d\u0442\u0440\u0430\u043a\u0442 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u00a0<a href=\"https:\/\/github.com\/LayerZero-Labs\/devtools\/blob\/05443835db976b7a528b883b19ddf02cb7f36d89\/packages\/oapp-evm\/contracts\/precrime\/PreCrime.sol\" rel=\"noopener noreferrer nofollow\"><code>PreCrime<\/code><\/a>. \u041c\u043e\u0434\u0443\u043b\u044c\u00a0<code>PreCrime<\/code>\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f\u00a0<strong>\u043e\u0444\u0447\u0435\u0439\u043d-\u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438\u00a0<\/strong><code><strong>_lzReceive<\/strong><\/code>, \u043f\u043e \u0437\u0430\u0434\u0443\u043c\u043a\u0435 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u0440\u0430\u0437\u0443 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438 \u0433\u0434\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435.<\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b\u0437\u043e\u0432\u00a0<code>OAppPreCrimeSimulator::lzReceiveAndRevert<\/code>\u00a0<strong>\u0432\u0441\u0435\u0433\u0434\u0430<\/strong>\u00a0\u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f\u00a0<code>revert<\/code>, \u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u0438\u043c\u0443\u043b\u044f\u0446\u0438\u0438 \u0447\u0438\u0442\u0430\u044e\u0442\u0441\u044f \u0438\u0437 \u043e\u0448\u0438\u0431\u043a\u0438\u00a0<code>SimulationResult<\/code>, \u043a\u0443\u0434\u0430 \u043e\u043d\u0438 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0447\u0435\u0440\u0435\u0437\u00a0<code>PreCrime::buildSimulationResult<\/code>.<\/p>\n<p>\u042d\u0442\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u043b\u043e\u0439 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438, \u043d\u043e\u00a0<strong>\u0433\u043b\u0430\u0432\u043d\u0430\u044f \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c<\/strong>\u00a0PreCrime \u2014 \u0435\u0433\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0441\u043e \u0441\u0442\u0435\u043a\u043e\u043c \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0443 \u043d\u0435\u0433\u043e \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u043c\u043e\u0447\u0438\u044f \u043e\u0442\u043c\u0435\u043d\u044f\u0442\u044c \u0442\u0440\u043d\u0430\u0437\u0430\u043a\u0446\u0438\u0438 \u0435\u0449\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043e\u043a \u0432 \u043a\u0430\u043d\u0430\u043b\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0438 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0411\u044d\u043a\u0435\u043d\u0434 \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0442\u044c \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u00a0<code>PreCrime<\/code>\u00a0\u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0445 \u0438\u043d\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430. \u0415\u0441\u043b\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430 \u0432\u0440\u0435\u0434\u043e\u043d\u043e\u0441\u043d\u0430\u044f \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u044f, \u043e\u043d\u0430 \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u00a0<code>MessagingChannel<\/code>, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u043f\u043e\u043f\u0430\u0434\u0435\u0442 \u0432 Executor.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u043f\u043e \u0438\u0442\u043e\u0433\u0443 \u0442\u0440\u0435\u0445 \u0441\u0442\u0430\u0442\u0435\u0439 \u0443 \u0432\u0430\u0441 \u0441\u043b\u043e\u0436\u0438\u0442\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u043b\u043d\u0430\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0430 \u043e \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0435 OApp \u0432 \u0446\u0435\u043b\u043e\u043c \u0438 OFT \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0437\u0430\u0442\u0440\u0430\u0442\u044b \u043d\u0430 \u0433\u0430\u0437 \u0438 \u043a\u0430\u043a\u0438\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u043e\u043f\u0446\u0438\u0438 \u0434\u043b\u044f \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>\u0412 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0435 LayerZero \u0435\u0441\u0442\u044c \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u044b\u0445 \u0430\u0441\u043f\u0435\u043a\u0442\u043e\u0432, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u043a\u043e\u043c\u0438\u0441\u0441\u0438\u044f\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f \u0441\u0432\u043e\u0435\u0433\u043e Executor, \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0430\u00a0<code>compose<\/code>\u00a0\u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439, lzRead \u0434\u043b\u044f \u043e\u0444\u0447\u0435\u0439\u043d \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430 \u0442\u0440\u0430\u043d\u0437\u0430\u043a\u0446\u0438\u0438 \u0438 \u0434\u0440\u0443\u0433\u043e\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0434\u0430\u043d\u043d\u0430\u044f \u0441\u0435\u0440\u0438\u044f \u0441\u0442\u0430\u0442\u0435\u0439 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0447\u043a\u043e\u0439 \u0441\u0442\u0430\u0440\u0442\u0430, \u0447\u0442\u043e\u0431\u044b \u0445\u043e\u0442\u044f \u0431\u044b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0441\u043d\u0438\u0437\u0438\u0442\u044c \u043f\u043e\u0440\u043e\u0433 \u0432\u0445\u043e\u0434\u0430 \u0432 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b\u043e\u043c.<\/p>\n<h3>\u0421\u0441\u044b\u043b\u043a\u0438<\/h3>\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/LayerZero-Labs\/LayerZero-v2\" rel=\"noopener noreferrer nofollow\">GitHub: LayerZero v2<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/LayerZero-Labs\/devtools\/blob\/main\/packages\/oft-evm\/contracts\" rel=\"noopener noreferrer nofollow\">GitHub: LayerZero-Labs\/devtools<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.layerzero.network\/v2\" rel=\"noopener noreferrer nofollow\">Docs: LayerZero v2<\/a><\/p>\n<\/li>\n<\/ul>\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\/916426\/\"> https:\/\/habr.com\/ru\/articles\/916426\/<\/a><br \/><\/br><\/br><\/p>\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-462308","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/462308","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=462308"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/462308\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=462308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=462308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=462308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}