Skip to content

lukso-network/lsp-bridge-HypLSP7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hyperlane LSP7 version - HypLSP7 Open in Gitpod Github Actions Foundry License: MIT

This repo is the LSP7 version of the HypERC20 and HypERC20Collateral of @hyperlane-xyz/core package. They are used to bridge tokens between the Ethereum and LUKSO chains using the Hashi Bridge.

For more details on the architecture and bridging flow, see the docs/ folder.

Examples of bridged tokens

Getting Started

This project is based on the Foundry template by PaulRBerg.

bun install # install Solhint, Prettier, and other Node.js deps

If this is your first time with Foundry, check out the installation instructions.

Installing Dependencies

Foundry typically uses git submodules to manage dependencies, but this template uses Node.js packages because submodules don't scale.

This is how to install dependencies:

  1. Install the dependency using your preferred package manager, e.g. bun install dependency-name
    • Use this syntax to install from GitHub: bun install github:username/repo-name
  2. Add a remapping for the dependency in remappings.txt, e.g. dependency-name=node_modules/dependency-name

Note that OpenZeppelin Contracts is pre-installed, so you can follow that as an example.

Sensible Defaults

This template comes with a set of sensible default configurations for you to use. These defaults can be found in the following files:

├── .editorconfig
├── .gitignore
├── .prettierignore
├── .prettierrc.yml
├── .solhint.json
├── foundry.toml
└── remappings.txt

Usage

This is a list of the most frequently needed commands.

Build & Compile

# Build the contracts:
forge build

# Delete the build artifacts and cache directories:
forge clean

# Get a test coverage report:
forge coverage

# Format the contracts:
forge fmt

# Get a gas report:
forge test --gas-report

# Lint the contracts:
bun run lint

# Run the tests:
forge test

# Generate test coverage and output result to the terminal:
bun run test:coverage

# Generate test coverage with lcov report (you'll have to open the `./coverage/index.html` file in your browser,
# to do so simply copy paste the path):
bun run test:coverage:report

GitHub Actions

This repository uses pre-configured GitHub Actions. The contracts are linted and tested on every push and pull requests. You can edit the CI script in .github/workflows/ci.yml.

Foundry Resources

This template builds upon the frameworks and libraries mentioned above, so please consult their respective documentation for details about their specific features.

For example, if you're interested in exploring Foundry in more detail, you should look at the Foundry Book. In particular, you may be interested in reading the Writing Tests tutorial.