Skip to content

woonetwork/OFT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Debugging the error on receiver side

Xnip2024-11-25_20-11-24

About

OFT of WOO token by LayerZeroV2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages