Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[r2r] hardhat migration from truffle and ganache #5

Merged
merged 17 commits into from
Feb 7, 2024

Conversation

laruh
Copy link
Member

@laruh laruh commented Jan 24, 2024

issue #4

Dependency Changes

Upgrades and Additions:

  1. Added Hardhat Dependencies:
    • hardhat: ^2.19.4
    • @nomicfoundation/hardhat-ethers: ^3.0.5 (This plugin integrates Hardhat with ethers.js).
    • ethers: ^6.10.0 (Upgraded to a newer version for compatibility with Hardhat).

Removals:

  1. Removed Ganache:

    • ganache: No longer required as Hardhat provides an Ethereum environment for deploying contracts, running tests, and performing other tasks.
  2. Removed Web3.js:

    • web3: Replaced with ethers.js which is more compatible with the Hardhat environment.
  3. Removed Unnecessary Dependencies:

    • request, request-promise-native, sol-merger: Not required in the updated project setup.

Retained Dependencies:

  1. Chai and Chai-as-Promised:

    • chai: ^4.3.10
    • chai-as-promised: ^7.1.1
    • Both retained for assertions in tests.
  2. OpenZeppelin Contracts:

    • @openzeppelin/contracts: ^5.0.0
    • Used for secure, standard Solidity contracts.
  3. RIPEMD160:

    • ripemd160: ^2.0.1
    • Kept for cryptographic functions.

Context for Changes:

The migration from Truffle to Hardhat necessitated these changes. Hardhat is used for compiling, deploying, testing, and debugging Ethereum software. The switch to ethers.js from Web3.js aligns with Hardhat's native support for ethers.js, providing a more streamlined and efficient development workflow.

@laruh laruh force-pushed the hardhat-migration branch from 024b9dc to 2a01bb5 Compare January 26, 2024 10:16
@laruh laruh force-pushed the hardhat-migration branch from 2f0a0a6 to 5af741a Compare January 29, 2024 07:28
@laruh laruh changed the title [wip] hardhat migration from truffle and ganache [r2r] hardhat migration from truffle and ganache Jan 29, 2024
@artemii235 artemii235 self-requested a review January 30, 2024 07:50
Copy link
Member

@artemii235 artemii235 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got the error after following the environment setup guide from Readme:

docker-compose exec workspace hardhat test
OCI runtime exec failed: exec failed: unable to start container process: exec: "hardhat": executable file not found in $PATH: unknown

@laruh I assume additional installation steps should be done in workspace Dockerfile.

README.md Outdated Show resolved Hide resolved
Copy link
Member

@artemii235 artemii235 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few more questions 🙂

test/EtomicSwap.js Outdated Show resolved Hide resolved
test/EtomicSwap.js Outdated Show resolved Hide resolved
test/EtomicSwap.js Outdated Show resolved Hide resolved
Copy link
Member

@artemii235 artemii235 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more note.

test/EtomicSwap.js Outdated Show resolved Hide resolved
Copy link
Member

@artemii235 artemii235 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Few more notes.

rpc.Dockerfile Outdated Show resolved Hide resolved
hardhat.config.js Outdated Show resolved Hide resolved
workspace.Dockerfile Outdated Show resolved Hide resolved
Copy link
Member

@artemii235 artemii235 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work 🔥

@artemii235 artemii235 merged commit e17e6dc into dev Feb 7, 2024
@artemii235 artemii235 deleted the hardhat-migration branch February 7, 2024 04:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants