Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Bridge readme with run steps #688

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

0xmovses
Copy link
Contributor

Summary

Creates a readme describing how to run the bridge and manual steps to test it outside of the e2e tests. This allows manual testing without the need of the frontend UI.

Changelog

  • Creates a README.md for protocol-units/bridge.

Testing

Try out the commands :)

Outstanding issues

New contract deployments will happen, README's should be updated.

Co-authored-by: Andy Golay <andygolay@gmail.com>
Verify this by running:
```
movement account list --account 0xf7c46960ef7aa1b25cd5d48efef064525aa4ccec286fc3b3a7176bbfec09b84c
```
Copy link
Contributor

@andygolay andygolay Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe here add something like:

Note: this step requires Movement CLI initialized to the following endpoints.

You can initialize with movement init --skip-faucet. When prompted, enter custom network and the following REST endpoint:

https://testnet.movementnetwork.xyz

Your config.yaml should look like:

profiles:
  default:
    network: Custom
    private_key: "<your-private-key>"
    public_key: "<your-public-key>"
    account: "<your-account-address>"
    rest_url: "https://testnet.movementnetwork.xyz/"

To fund your account, visit the faucet UI at and select Movement.

Copy link
Contributor

@andygolay andygolay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to be some issue finding that account you deployed to earlier. Left comment in Slack.

@0xmovses 0xmovses changed the title feat: create readme with run steps Create Bridge readme with run steps Oct 11, 2024
Copy link
Contributor

@andygolay andygolay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit: once network is defo up and stable

movement account list --account 0xf7c46960ef7aa1b25cd5d48efef064525aa4ccec286fc3b3a7176bbfec09b84c
```
## Running the Atomic Bridge Relayer In Production
The atomic bridge relayer services requires a `config.json` at the root of the application inside a `./movement`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path to the bridge config file is .movement/bridge. The config file in .movement is the suzuka node one. I made 2 separate config files because I didn't find how to mix both without mixing the Rust struct.

"mvt_init_network": "custom"
},
"testing": {
"eth_well_known_account_private_keys": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The eth_well_known_account_private_keys field must be empty. It's only use for testing purpose. You can put an empty vec.

--args 0x1234 676d6f7665 \
--profile default
```
You'll notice that the args in the module are of type `vec<u8>`, so you have to correctly convert any string into its hex representation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear. The arg is a 0x string, not a Vec<u8>. I would say that to fill the args parameters, the preimage that is a 32 bytes array should be encoded in a 0x string using xxd for example.


## Bridging MOVE from Ethereum to Movement without a UI

First we need to create the `preimage` or secret, for the transfer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add: This preimage is an arbitrary array of 32 bytes. For each transfer, the premiage should be regenerated and be unique.
to describe what is a preimage.

```
The relayer will now call functions on the movement atomic bridge contract. You can inspect the logs of the service to see its progress.

Copy the `BridgeTransferId` in the logs.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not very clear how you get the bridge transfer Id from the logs. Perhaps you should add which part of the logs to copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants