Basic Integration (Ethers)

Introduction

The MagnifyCashV1 contract is a decentralized lending platform that allows users to lend and borrow against their NFT assets. This integration guide will walk you through the process of interacting with the MagnifyCashV1 contract using the Ethers.js library. You'll learn how to initialize new lending desks, set loan configurations, deposit and withdraw liquidity, and initiate new loans.

Integration Steps

This guide covers the following key functionalities:

  • Initializing a new lending desk

  • Setting new loan configs for a lending desk

  • Depositing liquidity into a lending desk

  • Withdrawing liquidity from a lending desk

  • Initializing a new loan

You'll need to replace the following placeholders with your actual values:

  • your-ethereum-node-url: The URL of your Ethereum node (e.g., Infura, Alchemy, or your own node)

  • your-private-key: The private key of the Ethereum account you'll be using to interact with the contract

  • contract-address: The address of the deployed MagnifyCashV1 contract

  • 0x...: The addresses of the ERC20 token, NFT collection, and other contract-specific addresses

Code

Last updated