project screenshot 1
project screenshot 2
project screenshot 3

Shared trading

Let one person trade, but many people contribute and withdraw any time they want

Shared trading

Created At

ETHGlobal San Francisco

Project Description

Only got part of the project complete this hackathon!

Getting Started

Prerequisites

  • Node.js (v14 or later)
  • npm (Node Package Manager)
  • MetaMask or another Ethereum-compatible wallet

Installation

  1. Clone the Repository:

    git clone https://github.com/yourusername/solana-shared-wallet.git
    cd solana-shared-wallet
    
  2. Set Up the Backend:

    Navigate to the backend directory and install dependencies:

    cd backend
    npm install
    

    Create a .env file in the backend directory with the following content:

    PRIVATE_KEY=your_private_key_without_0x
    NEON_TESTNET_RPC_URL=https://proxy.testnet.neonlabs.org/solana
    NEON_API_KEY=your_neon_api_key
    ETHERSCAN_API_KEY=your_etherscan_api_key
    
  3. Compile and Deploy Contracts:

    Compile the smart contracts:

    npx hardhat compile
    

    Deploy the contracts:

    npx hardhat run scripts/deploySolanaSharedWallet.js --network neonTestnet
    npx hardhat run scripts/deployWalletFactory.js --network neonTestnet
    
  4. Set Up the Frontend:

    Navigate to the frontend directory and install dependencies:

    cd ../frontend
    npm install
    

Running the Application

  1. Start the React Application:

    npm start
    
  2. Open Your Browser:

    • Go to http://localhost:3000 to access the application.

Usage

  • Connect Wallet: Click the "Connect Wallet" button to connect your Ethereum wallet.
  • Create Wallet: After connecting, use the "Create Wallet" button to create a new wallet.
  • Add Contributors: Enter contributor addresses to add them to your wallet.
  • Trade: Use the Owner Dashboard to perform trades with the funds in your wallet.

Testing

  • The backend includes tests for the smart contracts. You can run the tests using:

How it's Made

Neon VM to use EVM to deploy to Solana + a react app for interacting with the deployed contracts on the Neon VM testnet.

Getting Started

Prerequisites

  • Node.js (v14 or later)
  • npm (Node Package Manager)
  • MetaMask or another Ethereum-compatible wallet

Installation

  1. Clone the Repository:

    git clone https://github.com/yourusername/solana-shared-wallet.git
    cd solana-shared-wallet
    
  2. Set Up the Backend:

    Navigate to the backend directory and install dependencies:

    cd backend
    npm install
    

    Create a .env file in the backend directory with the following content:

    PRIVATE_KEY=your_private_key_without_0x
    NEON_TESTNET_RPC_URL=https://proxy.testnet.neonlabs.org/solana
    NEON_API_KEY=your_neon_api_key
    ETHERSCAN_API_KEY=your_etherscan_api_key
    
  3. Compile and Deploy Contracts:

    Compile the smart contracts:

    npx hardhat compile
    

    Deploy the contracts:

    npx hardhat run scripts/deploySolanaSharedWallet.js --network neonTestnet
    npx hardhat run scripts/deployWalletFactory.js --network neonTestnet
    
  4. Set Up the Frontend:

    Navigate to the frontend directory and install dependencies:

    cd ../frontend
    npm install
    

Running the Application

  1. Start the React Application:

    npm start
    
  2. Open Your Browser:

    • Go to http://localhost:3000 to access the application.

Usage

  • Connect Wallet: Click the "Connect Wallet" button to connect your Ethereum wallet.
  • Create Wallet: After connecting, use the "Create Wallet" button to create a new wallet.
  • Add Contributors: Enter contributor addresses to add them to your wallet.
  • Trade: Use the Owner Dashboard to perform trades with the funds in your wallet.

Testing

  • The backend includes tests for the smart contracts. You can run the tests using:
background image mobile

Join the mailing list

Get the latest news and updates