Image links:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function logDifference(arr1, arr2) { | |
| let difference = arr1.filter( | |
| x => arr2.indexOf(x) == -1) | |
| .concat(arr2.filter( | |
| x => arr1.indexOf(x) == -1) | |
| ); | |
| if (difference.length < 1) return []; // if no difference return empty array | |
| return difference; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const politicians = require('./politicians.json') | |
| const promises = require('./promises.json') // live promises | |
| const result = { | |
| promisesWithLivePoliticians: { | |
| total: 0 | |
| }, | |
| promisesWithOfflinePoliticians: { | |
| total: 0 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // in index.js | |
| ... | |
| async function handler(event, context) { | |
| try { | |
| return handlerService.call(event, context, { AWS }) | |
| } catch (e) { | |
| if (process.env.NODE_ENV === 'local') throw e | |
| throw JSON.stringify(e) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { EndpointId } from '@layerzerolabs/lz-definitions' | |
| import { ExecutorOptionType } from '@layerzerolabs/lz-v2-utilities' | |
| import type { OAppOmniGraphHardhat, OmniPointHardhat } from '@layerzerolabs/toolbox-hardhat' | |
| // Note: Do not use address for EVM OmniPointHardhat contracts. Contracts are loaded using hardhat-deploy. | |
| // If you do use an address, ensure artifacts exists. | |
| const sepoliaContract: OmniPointHardhat = { | |
| eid: EndpointId.SEPOLIA_V2_TESTNET, | |
| contractName: 'MyOFTAdapter', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Connection, PublicKey } from '@solana/web3.js'; | |
| import { promises as fs } from 'fs'; | |
| import path from 'path'; | |
| import bs58 from 'bs58'; | |
| // --- Constants & Types --- | |
| const RPC_URL = 'https://api.devnet.solana.com'; | |
| const CACHE_DIR = path.join(__dirname, 'cache'); | |
| const INSPECTED_FILE = path.join(CACHE_DIR, 'instructionsInspected.json'); | |
| const LAST_CHECKED_FILE = path.join(CACHE_DIR, 'lastChecked.json'); |
| title | LayerZero V2 Solana OApp Reference |
|---|---|
| sidebar_label | Solana OApp |
| audience | Solana smart-contract engineers who already understand Anchor basics and the LayerZero V2 protocol on EVM. |
| goal | Show every moving piece you must implement to make a Solana program behave like an **OApp** (Omnichain Application) under LayerZero’s Executor / DVN flow. |
import ZoomableMermaidV2 from '@site/src/components/ZoomableMermaidV2';
The OApp Standard provides developers with a generic message passing interface to send and receive arbitrary pieces of data between contracts existing on different blockchain networks.
This is instructions set 2 of 3.
- You have already uploaded the deployments, so this step is done.
- Amend
hardhat.config.ts- Note:
https://rpc.hyperliquid-mainnet.xyz/evmmight not work anymore. Either replace it or set an env var forRPC_URL_HYPEREVM_MAINNET. https://hyperliquid.drpc.org seems to be working at time of writing. - 2b. add the following into
config.networks:
'base-mainnet': { eid: EndpointId.BASE_V2_MAINNET, - Note:
OlderNewer