Code Monkey home page Code Monkey logo

Comments (6)

Mitish98 avatar Mitish98 commented on June 4, 2024

In the link OpenZepelin, should I only study the file ERC-20.sol inside the "utils" folder? Which other files will be important for this task?

from swaplace-contracts.

Mitish98 avatar Mitish98 commented on June 4, 2024

Where can I create and insert the descriptions and requirements for the interface to remove them from the main contract?

from swaplace-contracts.

Mitish98 avatar Mitish98 commented on June 4, 2024

If the 'internal' and 'view' functions don't need an interface, is it not necessary to create descriptions and requirements if they are not connected with other contracts? Do we need to remove the front-end references to the 'internal' and 'view' functions?

from swaplace-contracts.

0xneves avatar 0xneves commented on June 4, 2024

In the link OpenZepelin, should I only study the file ERC-20.sol inside the "utils" folder? Which other files will be important for this task?

Every single contract, doesn't matter the file, will have the same pattern, you can compare them and realize the similarities!

from swaplace-contracts.

0xneves avatar 0xneves commented on June 4, 2024

Where can I create and insert the descriptions and requirements for the interface to remove them from the main contract?

Sorry, I didn't get the questions properly... Every function in the code has a NatSpec documentation on top of them, If the subject is still unclear, I highly recommend you search for a tutorial about NatSpec, which will clarify it for you

from swaplace-contracts.

0xneves avatar 0xneves commented on June 4, 2024

If the 'internal' and 'view' functions don't need an interface, is it not necessary to create descriptions and requirements if they are not connected with other contracts? Do we need to remove the front-end references to the 'internal' and 'view' functions?

Interface (type of smart contract) should not be confused with the NatSpec documentation. Internal functions don't have an interface because external contracts cannot connect to them, neither they can be called from outside the blockchain but they still need documentation explaining what they do!

Public functions with a view header most times are not accessed by other smart contracts, take ERC721 for example, there is a public function called "name" to describe the contract name, but they are non-existant in the interface, because the name itself doesn't hold any values for other contracts to fetch. But function such as ownerOf, which describes who own a token, are commonly called to verify ownership in the ecosystem, thus it is available in the interface.

Since you are showing interest in the task, which is awesome, I think you should perhaps document everything first and them we can optimize based on the architecture of the contract!

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.