Skip to content

Instantly share code, notes, and snippets.

View mfbevan's full-sized avatar
πŸš€
BUIDLING

Matthew Bevan mfbevan

πŸš€
BUIDLING
View GitHub Profile
@mfbevan
mfbevan / quotesend.ts
Created January 16, 2025 04:20
Solana Quote Send
import { Options, addressToBytes32 } from "@layerzerolabs/lz-v2-utilities";
import { mplToolbox } from "@metaplex-foundation/mpl-toolbox";
import { publicKey, signerIdentity } from "@metaplex-foundation/umi";
import { createUmi } from "@metaplex-foundation/umi-bundle-defaults";
import {} from "@metaplex-foundation/umi-rpc-web3js";
import { createSignerFromWalletAdapter } from "@metaplex-foundation/umi-signer-wallet-adapters";
import { toWeb3JsInstruction } from "@metaplex-foundation/umi-web3js-adapters";
import { solanaDevnetChain, solanaMainnetChain } from "@packages-lib/constants";
import {
isSolanaDevnetEndpoint,
@mfbevan
mfbevan / gist:74447e1e399b11d8c1cc8f279f38ed46
Created January 7, 2025 01:15
Glue -> Sol Send Failure
β‹Š> ~/r/g/glue-lz-solana on main β¨― npx hardhat --network glue-mainnet send --amount 100000000000000000000 --to E9JDve9wE1MMTRvEmMMqcnCSdhtPNA8zyWxtoFoqtzqV --dst-eid 30168 --contract-name GlueNativeOft 11:06:54
bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)
(node:49024) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
An unexpected error occurred:
Error: missing revert data in call exception; Transaction reverted without a reason string [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (data="0x", transaction={"from":"0x72f9A355e48F228B72c4e8FA90bD91c3eC0bC868","to":"0x81E7f9EBaBa2cc796b9799c50ECED36E8361174F","data":"0x3b6f743b00000000000000000000000000000000000000000000000000
β‹Š> ~/r/g/glue-lz-solana on main β¨― npx hardhat lz:oapp:config:get --oapp-config layerzero.config.ts 10:28:45
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”‚ Custom OApp Config β”‚ Default OApp Config β”‚ Active OApp Config β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
@mfbevan
mfbevan / layerzero.config.ts
Last active January 7, 2025 00:29
glue lz config
info: [OApp] Checking OApp configuration
info: [OApp] Checking OApp peers configuration
info: [OApp] βœ“ Checked OApp peers configuration
info: [OApp] Checking send libraries configuration
info: [OApp] βœ“ Checked send libraries configuration
info: [OApp] Checking receive libraries configuration
info: [OApp] βœ“ Checked receive libraries configuration
info: [OApp] Checking receive library timeout configuration
info: [OApp] βœ“ Checked receive library timeout configuration
info: [OApp] Checking send configuration
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 ethContract: OmniPointHardhat = {
eid: EndpointId.ETHEREUM_V2_MAINNET,
contractName: 'MetalCoreAdapter',