The home for Hyperlane core contracts, sdk packages, and other infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
Yorke Rhodes befc8d4cc8
Add coverage reports (#23)
2 years ago
.github/workflows Add coverage reports (#23) 2 years ago
.yarn/releases Upgrade to Yarn 3 and SDK (#4) 3 years ago
contracts Pay for gas in TokenRouter (#16) 2 years ago
scripts TradeRoute deployment script v1 (#20) 2 years ago
src TradeRoute deployment script v1 (#20) 2 years ago
test Pay for gas in TokenRouter (#16) 2 years ago
.eslintignore Ensure yarn build exists for mono yarn workspaces (#22) 2 years ago
.eslintrc Rebrand to Hyperlane and update to SDK 0.5.0 (#7) 2 years ago
.gitignore Upgrade to Yarn 3 and SDK (#4) 3 years ago
.prettierignore Rebrand to Hyperlane and update to SDK 0.5.0 (#7) 2 years ago
.prettierrc Rebrand to Hyperlane and update to SDK 0.5.0 (#7) 2 years ago
.solcover.js Add root config 3 years ago
.solhint.json Upgrade to solidity ^0.8 3 years ago
.yarnrc.yml Upgrade to Yarn 3 and SDK (#4) 3 years ago
LICENSE.md Rebrand to Hyperlane and update to SDK 0.5.0 (#7) 2 years ago
README.md Properly structure lib contents (#17) 2 years ago
hardhat.config.ts Rebrand to Hyperlane and update to SDK 0.5.0 (#7) 2 years ago
lcov.base.info Add coverage reports (#23) 2 years ago
package.json Ensure yarn build exists for mono yarn workspaces (#22) 2 years ago
trade-route-example-config.json TradeRoute deployment script v1 (#20) 2 years ago
tsconfig.json Ensure yarn build exists for mono yarn workspaces (#22) 2 years ago
yarn.lock Update to 1.0.0-beta6 (#21) 2 years ago

README.md

Interchain tokens using Hyperlane

This repo showcases a Hyperlane ERC20 and ERC721 tokens (HypERC20 and HypERC721). These tokens extend the base standards with an additional transferRemote function.

%%{init: {'theme':'base'}}%%
graph TB
    Alice((Alice))
    Operator((Operator))

    subgraph "Ethereum"
        HYP_E[(HYP)]
        O_E[/Outbox\]
    end

    subgraph "Polygon"
        HYP_P[(HYP)]
        EthereumInbox[\EthereumInbox/]
    end

    Bob((Bob))

    Alice -- "transferRemote(Polygon, Bob, 5)" --> HYP_E
    HYP_E -- "dispatch(Polygon, (Bob, 5))" --> O_E
    Operator -- "checkpoint()" --> O_E
    O_E-.->EthereumInbox
    Operator -- "relay()" --> EthereumInbox
    Operator -- "process(Ethereum, (Bob, 5))" --> EthereumInbox
    EthereumInbox-->|"handle(Ethereum, (Bob, 5))"|HYP_P
    HYP_P-.->Bob

Setup

# Install dependencies
yarn

# Build source and generate types
yarn build:dev

(Optional) Using local core contracts

# yarn link does not work well with workspaces
ln -s ~/path/to/monorepo/solidity node_modules/@hyperlane-xyz/core

Test

# Run all unit tests
yarn test

# Lint check code
yarn lint

Learn more

For more information, see the Hyperlane documentation.