Bonzo Finance Documentation
  • 🤠Overview
  • 🗺️Roadmap
  • GET STARTED
    • 🏦Bonzo Mainnet
      • Connect Wallet
      • Supply Assets
      • Withdraw Assets
      • Enable / Disable Collateral
      • Borrow Assets
      • Repay Loan
      • Dashboard Metrics Explained
    • ❗Troubleshooting
    • 🧪Bonzo Testnet
    • 💸Protocol Fees & Revenue
    • 💧Liquidations
    • 🌐Hedera ($HBAR)
      • Hedera Wallet Setup
      • Obtaining $HBAR
      • Bridging Assets
  • Rewards & Incentives
    • 🥩Single-Sided Staking
    • ✨Native APYs & Liquidity Incentives
    • 🎟️Bonzo Points
      • Pre-Season Points Airdrop
      • Season One Points
      • Season Two Points
    • 🖼️Bonzo NFT Collectables
      • 1st Edition Bonzo NFTs
      • Cybernetic NFT
      • Commemorative NFT
      • Ownership & License Terms
  • SECURITY & RISK
    • ⚠️Risk Framework
    • 🛡️Audits
  • CONTRIBUTORS
    • 🐵Team
    • 👷Careers
    • 🎉Community
  • DEVELOPER
    • 📊Bonzo v1 Data API
    • 📜Protocol Contracts
    • 🤖Liquidation Bots (Beta)
      • 🛸SaucerSwap DEX
      • Environment Setup
      • Liquidator Contract
      • Configuring Hardhat
      • Performing a Liquidation
    • ⚡Flash Loans
    • 🔮Oracles
      • Supra
      • Chainlink
    • 👾GitHub
    • 🐞Bug Bounty
  • RESOURCES
    • 🟢Status Page
    • 🎨Brand Assets
    • 📚Glossary
    • 📞Contact
      • Support
      • Community
  • TRANSPARENCY
  • 🏦Accounts & Contracts
  • LEGAL
    • 📃Terms of Service
    • 🔒Privacy Policy
Powered by GitBook
On this page
  • Prerequisites
  • 1. Clone the Repository
  • 2. Install Dependencies
  • 3. Configure Environment Variables
  • 4. Install Hedera SDK (if not already installed)
  1. DEVELOPER
  2. Liquidation Bots (Beta)

Environment Setup

PreviousSaucerSwap DEXNextLiquidator Contract

Last updated 5 months ago

Prerequisites

Before we begin, make sure you have the following:

  • Basic understanding of Solidity, Hardhat, and JavaScript/TypeScript.

  • Node.js and npm installed on your machine.

  • or another wallet configured for the Hedera network.

  • Hedera testnet account credentials.

1. Clone the Repository

First, clone the repository containing the smart contract and script:

git clone https://github.com/Bonzo-Labs/bonzo-finance-contracts.git
cd bonzo-finance-contracts

2. Install Dependencies

Install the required npm packages (you may need to use the --legacy-peer-deps flag due to older versions of dependencies):

npm install --legacy-peer-deps

3. Configure Environment Variables

Create a .env file in the root directory and add your Hedera account details and other configurations:

PRIVATE_KEY=your-private-key
ACCOUNT_ID=your-account-id
PROVIDER_URL=https://testnet.hashio.io/api
LENDING_POOL_ADDRESS=0x...
DATA_PROVIDER_ADDRESS=0x...
PRICE_ORACLE_ADDRESS=0x...
LIQUIDATOR_CONTRACT_ADDRESS=0x...
  • Replace your-private-key and your-account-id with your actual Hedera testnet account credentials.

4. Install Hedera SDK (if not already installed)

npm install @hashgraph/sdk

Replace 0x... with the actual contract addresses. You can find the mainnet contract addresses .

🤖
HashPack
here