Giter Club home page Giter Club logo

layerzero-shitcoin's Introduction

LayerZero Shitcoin

I followed LayerZero's docs to build an OFT V1 ERC20. These are ERC20s that can be instantly deployed/bridged to any EVM chain that LayerZero supports.

Instructions

  1. Clone down this repo and yarn.
  2. Make your .env appropriately, there is a sample .env.example. API keys are for hardhat contract verification.
  3. Modify hardhat.config.ts to the networks of your choosing.
  4. Modify LayerZeroShitcoin.sol to your choosing. My contract currently mints 10M coins to the deployer.
  5. Compile contract via npx hardhat compile.
  6. Modify contracts/deploy-layerzeroshitcoin.ts with chains of your choosing. I did Goerli and Fantom testnet. Mainnet addresses / chainIds found here. You can deploy to as many chains as you want, ideally using a clean EOA so all the contract deployments come out to the same address.
  7. Deploy using npx hardhat run scripts/deploy-layerzeroshitcoin.ts --network <NETWORK>
  8. Optionally verify via npx hardhat verify --network goerli 0x3EC3EFe4f7D793938f9D1d78989F0F98799d9554 "OmniCat" "OMNI" "0xbfD2135BFfbb0B5378b56643c2Df8a87552Bfa23"
  9. On every contract you've deployed, you must call setTrustedRemoteAddress on the other contracts you've deployed to whitelist them. I just do this via etherscan. So if you've deployed on 4 chains, you must call this function 3 times each (for every other chain) on all 4 contracts.

image

  1. Finally, to transfer tokens from chain A to chain B - call sendFrom on your chain A token contract like so on etherscan: image

If you run into any problems or difficulties, contact me on twitter @AzFlin!

layerzero-shitcoin's People

Contributors

madawa avatar azflin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.