Skip to content

OkayRelay/example-circle-relayer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example-Circle-Relayer

Please start by reading the design document.

Wormhole-Scaffolding

This repository was generated from the wormhole-scaffolding template. We recommend using this template as a starting point for cross-chain development on Wormhole.

Prerequisites

Install Foundry tools, which include forge, anvil and cast CLI tools.

Build

Run the following commands to install necessary dependencies and to build the smart contracts:

cd evm
make dependencies
make build

Testnet Contract Deployment

Before deploying the contracts, set the Deployment Variables in the following files:

  • evm/env/avax-fuji-testnet.env
  • evm/env/eth-goerli-testnet.env

Then deploy the contracts to testnet by executing the following commands:


# goerli
. env/eth-goerli-testnet.env && PRIVATE_KEY=put_your_private_key_here bash shell-scripts/deploy_circle_relayer.sh

# fuji
. env/avax-fuji-testnet.env && PRIVATE_KEY=put_your_private_key_here bash shell-scripts/deploy_circle_relayer.sh

Testnet Contract Registration

After deploying the contracts, set the Contract Registration Environment Variables in the following files:

  • evm/env/avax-fuji-testnet.env
  • evm/env/eth-goerli-testnet.env

Then register the contracts by executing the following commands:

# goerli
. env/eth-goerli-testnet.env && PRIVATE_KEY=put_your_private_key_here bash shell-scripts/register_contracts.sh

# fuji
. env/avax-fuji-testnet.env && PRIVATE_KEY=put_your_private_key_here bash shell-scripts/register_contracts.sh

Testing Environment

There are currently no solidity-based units tests or local-validator integration tests written to support the Circle-Relayer contracts. However, the testing environments have been set up, and we encourage integrators to thoroughly test the contracts before deploying to mainnet. The testing environments can be found in the following locations:

Once tests have been written, they can be executed with the following commands:

# unit tests
make unit-test

# local-validator integration tests
make integration-test

# unit tests and local-validator integration tests
make test

Relayer

To run the off-chain relayer process, check that the contract addresses are correct in the relayer/src/main.ts file, then run the following commands:

cd relayer
npm ci
npm run build
npm run start

Releases

No releases published

Packages

No packages published

Languages

  • Solidity 78.5%
  • TypeScript 17.7%
  • Shell 3.1%
  • Makefile 0.7%