Skip to content

Tapioca-DAO/tapiocaz-audit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TapiocaZ 🍹 🤙

Tapioca harnessing LayerZero omni-chain infrastructure 🤯

  • TapiocaWrapper Handle the deployment of TOFT contracts and execution of its onlyOwner functions.
  • TapiocaOFT OFT20, Layer-Zero superset of ERC20. Handles the wrap and unwrap of a desired ERC20.

Note: Current tasks/contracts are designed so that a TOFT works best on a support LZ chain and Optimism only

Repo setup

  1. Fill in .env
  2. git submodule update --init

Flow of deployment

  1. Deploy the TapiocaWrapper contract on the host chain of the ERC20, and the chain where you want it to be present too.
npx hardhat deploy --network '...'
  1. Whitelist the ERC20 that you want to support in constants
  2. Deploy the TapiocaOFT contract on the host chain .
$ npx hardhat deployTOFT --erc20 '...' --lzChainId '...' --network '...'
  1. Repeat the process above and deploy it on any other chain you want it to be present.

Individual operations

Deploy a TOFT

Deploy a TOFT contract to the specified network. It'll also deploy it to Tapioca host chain (Optimism, chainID 10). A document will be created in the deployments.json file.

  • erc20: The address of the ERC20 to be wrapped.
  • lzChainId: The Layer-Zero chain ID of the host chain.
  • network: The network (must be the host chain).
$ npx hardhat deployTOFT --erc20 '...' --lzChainId '...' --network '...'

List TOFTs

List the deployments of a TapiocaWrapper given a network.

  • network: The network (must be the host chain).
$ npx hardhat listDeploy --network '...'

Wrap an ERC20

Wrap an ERC20 into a TOFT.

  • toft: The address of the toft.
  • amount: The amount of ERC20 to wrap in wei.
  • network: The network (must be the host chain).
$ npx hardhat wrap --toft '...' --amount '...' --network '...'

Send a TOFT

Transfer a TOFT amount between chains.

  • toft: The address of the toft.
  • to: The address to send to.
  • amount: The amount of ERC20 to wrap in wei.
  • network: The network (must be the host chain). It'll automatically pick the other chain from deployments.json.
$ npx hardhat sendFrom --toft '...' --to '...' --amount '...' --network '...'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published