Skip to content

Commit

Permalink
Split scripts into depositForBurn/receiveMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
mdbere committed Apr 5, 2024
1 parent 3989669 commit b8e72af
Show file tree
Hide file tree
Showing 16 changed files with 176 additions and 3,083 deletions.
9 changes: 9 additions & 0 deletions examples/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Required for both functions
MNEMONIC="..."

# Required for DepositForBurn
ETH_MINT_RECIPIENT="0x..."

# Required for ReceiveMessage
ATTESTATION="0x..."
MESSAGE_HEX="0x...
52 changes: 52 additions & 0 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Noble <-> Ethereum (Typescript)

## DepositForBurn instructions

1. Install require packages:

```
npm install
```

2. (If needed) Obtain tokens from the faucet: https://faucet.circle.com/

3. Set up a `.env` file based on `.env.example`, filling in the `MNEMONIC` and `ETH_MINT_RECIPIENT` fields:

```
MNEMONIC="word1 word2..."
ETH_MINT_RECIPIENT=0x...
```

4. Run the depositForBurn script:

```
npm run depositForBurn
```

The Noble testnet -> ETH Sepolia CCTP relayer should pick up these messages automatically. To avoid these being automatically picked up, all references to `MsgDepositForBurn` can be changed to `MsgDepositForBurnWithCaller` and a `destinationCaller` field should be added to `msg.value` below line 70.

## ReceiveMessage instructions

1. Install require packages:

```
npm install
```

2. Initiate a `DepositForBurnWithCaller` from ETH to Noble. If a regular `DepositForBurn` call is made, the relayer will automatically receive the message on Noble.

3. Fetch the attestation and message from Iris at https://iris-api-sandbox.circle.com/messages/{sourceDomain}/{txHash}.

4. Set up a `.env` file based on `.env.example`, filling in the `MNEMONIC`, `ATTESTATION`, and `MESSAGE_HEX` fields:

```
MNEMONIC="word1 word2..."
ATTESTATION=0x...
MESSAGE_HEX=0x
```

5. Run the receiveMessage script:

```
npm run receiveMessage
```
3 changes: 0 additions & 3 deletions examples/bridge-eth-to-noble/.env.example

This file was deleted.

26 changes: 0 additions & 26 deletions examples/bridge-eth-to-noble/README.md

This file was deleted.

Loading

0 comments on commit b8e72af

Please sign in to comment.