Skip to content

Latest commit

 

History

History
116 lines (83 loc) · 3.48 KB

README.md

File metadata and controls

116 lines (83 loc) · 3.48 KB

LayerZero

Pointless OFT Project

Layerzero documentation links

Quickstart | Configuration | Message Execution Options | Endpoint Addresses

1) Environment Setup

Installing dependencies

We recommend using pnpm as a package manager (but you can of course use a package manager of your choice):

pnpm install

Compiling contracts

This project supports both hardhat and forge compilation. By default, the compile command will execute both:

pnpm compile

If you prefer one over the other, you can use the tooling-specific commands:

pnpm compile:forge
pnpm compile:hardhat

Or adjust the package.json to for example remove forge build:

- "compile": "$npm_execpath run compile:forge && $npm_execpath run compile:hardhat",
- "compile:forge": "forge build",
- "compile:hardhat": "hardhat compile",
+ "compile": "hardhat compile"

Running tests

Similarly to the contract compilation, we support both hardhat and forge tests. By default, the test command will execute both:

pnpm test

If you prefer one over the other, you can use the tooling-specific commands:

pnpm test:forge
pnpm test:hardhat

Or adjust the package.json to for example remove hardhat tests:

- "test": "$npm_execpath test:forge && $npm_execpath test:hardhat",
- "test:forge": "forge test",
- "test:hardhat": "$npm_execpath hardhat test"
+ "test": "forge test"

2) Deployment

Set up deployer wallet/account:

  • Rename .env.example -> .env
  • Choose your preferred means of setting up your deployer wallet/account:
MNEMONIC="test test test test test test test test test test test junk"
or...
PRIVATE_KEY="0xabc...def"
  • Fund this address with the corresponding chain's native tokens you want to deploy to.

To deploy your contracts to your desired blockchains, run the following command in your project's folder:

npx hardhat lz:deploy

More information about available CLI arguments can be found using the --help flag:

npx hardhat lz:deploy --help



Layerzero Discord

3) Current Deployment

pointless was originally deployed as a standard ERC20 token on Polygon network.
Later on, we decided to go multi-chain and deploy it on base and zkSync too. We used layerzero OFT (Omnichain fungible token) standard to deploy pointless on base and zkSync.
Because we already had a token, we created an OFT Adapter on polygon. On base and zkSync, it is just plain OFT.
Below are the pointless CAs:

Original pointless token on Polygon: 0x9B8cc6320F22325759B7D2CA5CD27347bB4eCD86
Pointless OFT Adapter on Polygon: 0x67e6BA651Edcf8681766dDCbFD836FBe430adB7A
Pointless OFT on Base: 0xaF13924f23Be104b96c6aC424925357463b0d105
Pointless OFT on zkSync: 0xFD21D5E148dF3B93AE6deC416544Fb3d3E21260C