Skip to content

Instantly share code, notes, and snippets.

@nazreen
nazreen / instructions.md
Last active October 13, 2025 13:40
ApeCoin OFT expansion instructions - Solana

This is instructions set 1 of 3.

ape-solana

  1. Upload Base and BNB deployments folders into /deployments in the ape-solana repo (only base-mainnet and bsc-mainnet are needed)
  2. In hardhat.config.ts, add the following into config.networks:
'base-mainnet': {
    eid: EndpointId.BASE_V2_MAINNET,
    url: process.env.RPC_URL_BASE_MAINNET || 'https://base.gateway.tenderly.co',
    accounts,
@nazreen
nazreen / instructions.md
Last active October 13, 2025 14:14
ApeCoin OFT expansion instructions - EVM pathways

This is instructions set 3 of 3.

Right now the OFT configs are spread across 3 repos:

For context, the Solana OFT repo is pretty much a superset of the EVM only OFT repo. So moving forward, the Solana OFT repo can host the EVM-EVM pathway configs too. I suggest archiving or clearly marking the ape-oft repo to not be used. Link to the ape-solana repo instead.

@nazreen
nazreen / instructions.md
Last active October 27, 2025 09:50
Recover Instructions

Terms

  • Current repo - the existing repo in which the Base and Solana deployments are hosted in
  • Rescue repo - a new repo that you will be guided to create below
  • BASE_NETWORK_NAME - the name used in the Current repo's hardhat.config.ts, which is also the subfolder name under `/deployments' in the Current repo
  • Original Solana OFT - the one mistakenly created with 18 decimals
  • New Solana OFT - the new one, created with 9 decimals

Rescue Repo

  • Init a repo using the EVM only OFT template: npx create-lz-oapp@latest --example oft
@nazreen
nazreen / cedefi.json
Created November 25, 2025 15:09
custom idl
{
"version": "0.1.0",
"name": "cedefi_v3",
"instructions": [
{
"name": "initStore",
"docs": ["初始化 OApp Store"],
"accounts": [
{
"name": "payer",
@nazreen
nazreen / oapp.json
Created November 28, 2025 13:29
IDL
{
"address": "CoVroueYhpvD9i24JmWRJJBZZSpfvoeDkQGkSBgEbRcg",
"metadata": {
"name": "my_oapp",
"version": "0.1.0",
"spec": "0.1.0",
"description": "Created with Anchor"
},
"instructions": [
{
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.27;
// OZ
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { Ownable2Step } from "@openzeppelin/contracts/access/Ownable2Step.sol";
// LZ
import { NativeOFTAdapter } from "./../lib/devtools/packages/oft-evm/contracts/NativeOFTAdapter.sol";
@nazreen
nazreen / README.md
Last active March 3, 2026 18:27
upgrading to anchor 0.32.1

Upgrading to Anchor 0.32.1 / Supporting the Pausable extension for Solana OFTs

These instructions assume that you want to deploy a Solana OFT in MABA mode and require support of the Pausable extension.

For extensions such as Pausable (which appears as PausableConfig on the Mint Account's list of extensions), Anchor 0.32.1 is needed.

The current Solana OFT program is on Anchor 0.31.1. In order to bump it to Anchor 0.32.1 so that the Pausable extension can be supported, several steps need to be carried out:

  • in Anchor.toml: