Code Monkey home page Code Monkey logo

Comments (6)

RafaDSan avatar RafaDSan commented on June 3, 2024

Hello! I am interested in this task. I have some experience in writing tests using typescript and chai for smart contracts.
@0xneves

from swaplace-contracts.

0xneves avatar 0xneves commented on June 3, 2024

Well go for it, can't barely wait to see the PR @RafaDSan 👍

from swaplace-contracts.

0xneves avatar 0xneves commented on June 3, 2024

Hey @RafaDSan , how is the task going? Do you need anything to help you with?

from swaplace-contracts.

0xjoaovpsantos avatar 0xjoaovpsantos commented on June 3, 2024

Hey @0xneves, if this task isn't started, I'm interested to get

from swaplace-contracts.

RafaDSan avatar RafaDSan commented on June 3, 2024

@0xneves I've added some new tests to the TestMockContracts.test.ts file but I am having some problems importing the ERC20 code.
Here is what I am doing:

  1. Copied the erc20 contract of blockful and pasted in the MockERC20.sol
  2. Changed the line abstract contract ERC20 is IERC20, IERC20Permit, IERC20Errors for and removed the abstract
  3. Added the following files to the interfaces directory: IERC20.SOL, IERC20Errors.sol, IERC20Permit.sol
  4. Run the command npx hardhat test and receive the following error Error: missing argument: in Contract constructor (count=0, expectedCount=2, code=MISSING_ARGUMENT, version=contracts/5.7.0) which I am trying to figure it out rn.

from swaplace-contracts.

0xneves avatar 0xneves commented on June 3, 2024

Hello @RafaDSan, I think you are misunderstanding the behavior of this task, let me summarize...

The ERC20 in blockful-contracts is abstract because it is an implementation, inside the 'contracts/test' folder you can find the token implementing the ERC.

In essence, the task is:

  • Get the ERC20 related contracts from the blockful-contracts repo and place them in the MockERC20 of Swaplace.
  • Copy the tests in the 'blockful-contracts/tests' folder and place them in the Swaplace tests folder.

The error you were getting was from changing the contract from abstract to non-abstract. Remember you should not change any aspects of the ERC20 contract, and only change the import of the MockERC20 from OpenZeppelin to the local contracts imported from 'blockful-contracts'.

from swaplace-contracts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.