8000 GitHub - woonetwork/OFT: OFT of WOO token by LayerZeroV2 · GitHub
[go: up one dir, main page]

Skip to content
woonetworkPublic

About

OFT of WOO token by LayerZeroV2

Resources

Stars

1 star

Watchers

2 watching

Forks

Latest commit

 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to run WOO OFT


  • install dependencies
    • pnpm install
  • rename .env.example → .env
    • put the mnemonic of the test wallet of ethereum
    • use scripts/getBase58Pk.js to generate SOLANA_PRIVATE_KEY
  • rename layerzero.config.dev.ts to layerzero.config.ts
  • rename hardhat.config.dev.ts to hardhat.config.ts
  • compile the contract
    • pnpm compile:hardhat
  • Prepare Program ID
    • solana-keygen new -o target/deploy/endpoint-keypair.json --force
    • solana-keygen new -o target/deploy/oft-keypair.json --force
    • anchor keys sync
    • change program/src/oft/lib.rs with new program id
endpoint: A9xGfr4F2J3NVsk9X7syKLNtKgpwaKW9xtPEmoxYb3i9
oft: EaWXNTXSauuEWUyzBATCCbLfscNAgxS4bfQHnTGKeFXY
  • build Solana OFT program
    • anchor build
    • don’t add -v for verified build as its too slow
  • deploy Solana OFT program
    • solana program deploy --program-id target/deploy/oft-keypair.json target/deploy/oft.so -u devnet
  • Create Solana OFT
    • pnpm hardhat lz:oft:solana:create --eid 40168 --program-id EaWXNTXSauuEWUyzBATCCbLfscNAgxS4bfQHnTGKeFXY --only-oft-store true --name WOO --symbol WOO
    • open ./deployments/solana-testnet/OFT.json , find OFTStore = DKrx8GxUMBwJ1dDDpiJkdBvx31T7fxM3sqzCf2FPsNg9
    • change layerzero.config.ts with DKrx8GxUMBwJ1dDDpiJkdBvx31T7fxM3sqzCf2FPsNg9
  • deploy the contract to Ethereum Sepolia
  • initialize the OFT
    • npx hardhat lz:oapp:init:solana --oapp-config layerzero.config.ts --solana-secret-key <SOLANA_PRIVATE_KEY> --solana-program-id EaWXNTXSauuEWUyzBATCCbLfscNAgxS4bfQHnTGKeFXY
  • wire the config
    • npx hardhat lz:oapp:wire --oapp-config layerzero.config.ts --solana-secret-key <SOLANA_PRIVATE_KEY> --solana-program-id EaWXNTXSauuEWUyzBATCCbLfscNAgxS4bfQHnTGKeFXY

Test Sending

Production Ownership & Access Control

EVM OFT Ownership

All EVM OFT contracts have been transferred to WOO Network treasury multisig (Gnosis Safe) addresses:

Chain Contract Owner (Multisig)
Ethereum WooTokenOFTAdapter 0x155eef9731aff5ae6cb2741f7bec0f005037acb0
Linea WooTokenOFT 0x1354fde75b51e388e79e9b721cf6fc9773ac8ac5
Base WooTokenOFT 0xc06e2968afd4a029d4623f9a5f534c45e5bf0bdf
zkSync WooTokenOFT 0x91ff1c154b72004d0591868ceb98efdc4023371b
Mantle WooTokenOFT 0x5cc24db3b7f0099d141a4bc96b4fddf9f5f3b614
Sonic WooTokenOFT 0x3d2f54bac9eb3bdb360bc3bab6e77243377a3586

EVM OFT Delegate

On every EVM chain the LayerZero EndpointV2 delegate is the same Safe as the owner (verified on-chain 2026-11-27). Any setConfig() call (DVN changes, executor config, libraries) therefore requires a Safe transaction.

Solana OFT Ownership

The OFT admin and endpoint delegate were handed from the deployer key 8ATsKQ16gNa3M9hXF7zAPvkjEREmzyhrXGHM6aKPPPDm to the Squads vault on 2026-12-03, with a one-off Solana-only config (lz:oapp:wire for the delegate, then lz:ownable:transfer-ownership for the admin):

All privileged roles of the Solana OFT are held by the WOO Squads v4 multisig EMHat941KWKCvDmxS3iWtEGqnwSric5eHjssb4SENHF (3-of-7), vault #0 (Squads UI. The app URL uses the vault address, not the multisig account):

Role Holder
OFT Store 8wX49KNNCPqfMUb8F1x3XipDEfqZnsCP5dDqxaxHjLCw
OFT admin (owner) 8pvYwZhuSY2GdW6zZ3PennYnRCuGtdK3BzBkGRmQbpeN (Squads vault #0)
Endpoint delegate 8pvYwZhuSY2GdW6zZ3PennYnRCuGtdK3BzBkGRmQbpeN (Squads vault #0)
Program upgrade authority (woo98ny1QLULqdTzpNM8PiJpwfzL5MJ9pAmLw1rfvk7) 8pvYwZhuSY2GdW6zZ3PennYnRCuGtdK3BzBkGRmQbpeN (Squads vault #0)
Mint / freeze authority 7GjWQNVEKAekGX5fwJcJaGbBXr49sFdfZ6DMZbg88PUW, an SPL multisig (1/1) whose only signer is the OFT Store
Pauser / unpauser none

Check the live state at any time (read-only, no key needed):

# Admin (owner) and delegate: both must print "The OApp is wired, no action is necessary"
npx hardhat lz:oapp:wire --oapp-config layerzero.config.prod.ts \
  --solana-program-id woo98ny1QLULqdTzpNM8PiJpwfzL5MJ9pAmLw1rfvk7 --dry-run
npx hardhat lz:ownable:transfer-ownership --oapp-config layerzero.config.prod.ts \
  --solana-program-id woo98ny1QLULqdTzpNM8PiJpwfzL5MJ9pAmLw1rfvk7 --dry-run

# Program upgrade authority ("Authority" line)
solana program show woo98ny1QLULqdTzpNM8PiJpwfzL5MJ9pAmLw1rfvk7 -u mainnet-beta

# Mint / freeze authority (the SPL multisig above)
spl-token display Dz8VutERqbHR2aFL5A3s1Ky4dG1unJT1jUFXXPaY9ytX -u mainnet-beta

Every Solana config change (peers, enforced options, DVNs, rate limits, pause) is a Squads proposal. To propose one from the wire task, pass --multisig-key EMHat941KWKCvDmxS3iWtEGqnwSric5eHjssb4SENHF (the multisig account, not the vault). --solana-secret-key must then belong to a multisig member with the Initiate permission. The signer only creates the vault transaction (vault index 0); open the proposal and vote on it in the Squads UI.


Debugging the error on receiver side

Xnip2024-11-25_20-11-24

About

OFT of WOO token by LayerZeroV2

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0