This CLI tool allows end users to deposit Ether from Ethereum Mainnet or the Sepolia test network into the Eclipse rollup, which utilizes the Solana Virtual Machine (SVM).
Yarn is required for installation. For Mac users, Yarn can be installed via Homebrew using brew install yarn
. Alternatively, if npm is available, use npm install -g yarn
.
An Ethereum wallet such as Phantom or Metamask is needed.
For Metamask:
- Choose the account you wish to use and copy its address.
- Visit the Sepolia faucet to airdrop tokens to yourself, if using Sepolia.
- Navigate to 'account details' in MetaMask and select 'reveal private key'. Store this key in a secure file.
The Solana CLI tools are necessary for generating a deposit address on the rollup.
To generate a wallet for deposits:
- Install the Solana CLI tools.
- To generate a wallet:
- Execute
solana-keygen new --no-outfile
orsolana-keygen new --outfile my-wallet.json
.
- Execute
- Copy the public key from the output, which should resemble
6g8wB6cJbodeYaEb5aD9QYqhdxiS8igfcHpz36oHY7p8
.
TODO
-
Clone this repository:
git clone https://github.com/Eclipse-Laboratories-Inc/eclipse-deposit.git cd eclipse-deposit
-
Install the necessary dependencies:
yarn install
-
Run the CLI tool with the necessary options:
node bin/cli.js -k <path_to_private_key> -d <solana_destination_address> -a <amount_in_ether> --mainnet|--sepolia
For example:
Mainnet Deposit:
node bin/cli.js -k private-key.txt -d 6g8wB6cJbodeYaEb5aD9QYqhdxiS8igfcHpz36oHY7p8 -a 0.002 --mainnet
Sepolia Testnet Deposit:
node bin/cli.js -k private-key.txt -d 6g8wB6cJbodeYaEb5aD9QYqhdxiS8igfcHpz36oHY7p8 -a 0.002 --sepolia
- The
-k, --key-file
option specifies the path to the Ethereum private key file. - The
-d, --destination
option specifies the Solana destination address on the rollup (base58 encoded). - The
-a, --amount
option specifies the amount of Ether to deposit. - Use
--mainnet
or--sepolia
to select the network. The tool will use different contract addresses depending on the network. - The
-r, --rpc-url
option is optional and allows overriding the default JSON RPC URL.
- The
Keep your Ethereum private key secure. Do not share it publicly or expose it in untrusted environments.
For issues or questions, please contact cooper@eclipse.xyz.