There are two steps for converting a Rally (Ethereum) token to a Rally-Solana token
- Convert Rally -> Rally-Wormhole
- Convert Rally-Wormhole -> Rally-Solana
For step 1, we are using the Wormhole UI https://github.com/certusone/wormhole/tree/dev.v2/bridge_ui For step 2, we are using the Wormhole->Rally CLI https://github.com/rally-dfs/dfs-ts/tree/main/cli
This project will integrate both steps into an integrated UI experience
Follow the README doc in the bridge_ui
directory for more information.
Run the following from the root of this repo only once:
DOCKER_BUILDKIT=1 docker build --target node-export -f Dockerfile.proto -o type=local,dest=. .
DOCKER_BUILDKIT=1 docker build -f solana/Dockerfile.wasm -o type=local,dest=. solana
npm ci --prefix ethereum
npm ci --prefix sdk/js
npm run build --prefix sdk/js
To run the UI, cd into the bridge_ui
directory and first run:
npm ci
Next, cd into the wormholetorally/ts
and run:
npm i
npm run build
npm link
Next, run npm run build
again in the wormholetorally/ts
directory
Finally, cd back into the bridge_ui
directory and run:
npm link dfs-js
npm start
REACT_APP_CLUSTER=mainnet REACT_APP_COVALENT_API_KEY=ckey_0608d4eeb16046b59392b8d788b REACT_APP_SOLANA_API_URL=https://api.mainnet-beta.solana.com/ npm run build
npx serve -s build
cd into the wormholetorally/cli
directory
Follow the README doc in the wormholetorally/cli
directory for more information.
First cd into the wormholetorally/ts
and run:
npm i
npm run build
Next cd into the wormholetorally/cli
and run:
npm i
npm run build
Finally, install Solana CLI if you haven't: https://docs.solana.com/cli/install-solana-cli-tools
node ./build/cli/src/dfs-cli.js [command]
Example:
dfs-cli get-balance-wormhole -k /Users/brianzhu/.config/solana/whateveryouwant.json
solana-keygen recover 'prompt:?key=0/0' --outfile ~/.config/solana/solanaKeyPair.json
node ./build/cli/src/dfs-cli.js get-balance-canonical -k [path to wallet key]
node ./build/cli/src/dfs-cli.js get-balance-wormhole -k [path to wallet key]
node ./build/cli/src/dfs-cli.js swap-wormhole-canonical -a 1 -k [path to wallet key]
node ./build/cli/src/dfs-cli.js swap-canonical-wormhole -a 1 -k [path to wallet key]