Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,45 @@
/**
* @fileoverview Configuration file for the Compound borrowing guide project.
* Defines project metadata, scripts, and dependencies needed for Ethereum development
* and interaction with the Compound protocol using Hardhat and web3.js.
*/
{
"name": "compound-borrow-guide",
"version": "2.0.0",
"description": "Code examples for borrowing Ethereum assets from the Compound Protocol. https://compound.finance/",
"description": "Code examples for borrowing Ethereum assets from the Compound Protocol. Designed for use with a local Hardhat mainnet fork.",
"main": "index.js",
"scripts": {
// Command to start the Hardhat local fork.
"start": "node ./scripts/run-localhost-fork.js",
"test": "echo \"Error: no test specified\" && exit 1"
// Standard Hardhat test command placeholder.
"test": "hardhat test"
},
"keywords": [
"compound finance",
"ethereum",
"web3"
"web3",
"defi",
"hardhat"
],
"author": "Compound Labs, Inc.",
"license": "MIT",
"dependencies": {
// Only includes core runtime libraries if needed outside of development
"@compound-finance/compound-js": "^0.4.1",
"web3": "^1.6.0" // Kept as a 'dependency' if used in the main runtime scripts.
},
"devDependencies": {
// Development/testing tools are moved to devDependencies.
// Use the latest major version range (e.g., ^2.10.0 or greater).
"hardhat": "^2.10.0",

// Hardhat plugins for Ethers and Web3 interaction.
// The required 'ethers' library is managed internally by hardhat-ethers.
"@nomiclabs/hardhat-ethers": "^2.0.2",
"@nomiclabs/hardhat-web3": "^2.0.0",
"ethers": "^5.4.7",
"hardhat": "^2.6.6",
"web3": "^1.6.0"

// Removed explicit "ethers" dependency to prevent conflicts with Hardhat's internal version.
// If a specific version of ethers is required, it should be listed here, but generally avoided.
"dotenv": "^16.0.0" // Recommended addition for managing sensitive environment variables (like provider URLs/keys).
}
}