Comments (6)
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.
Where can I create and insert the descriptions and requirements for the interface to remove them from the main contract?
from swaplace-contracts.
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.
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.
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.
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)
- bug: refactor and other templates presenting issues
- refactor: Adding a test case for testing parseData() and packData()
- refactor: sloads and increments in assembly for gas optimization.
- refactor: drastically lowering cancelSwap gas consumption HOT 1
- refactor: Set the value of `config` as zero directly instead of packing `allowed` and `expiry` in the `acceptSwap()`.
- refactor: events must emit addresses involved in the operation for better dApp indexing HOT 3
- feat: create DefiLlama adapter to measure TVL HOT 2
- Smart Contract Issues HOT 5
- fix: incorrect event emission on acceptSwap HOT 2
- refactor: repo scripts section HOT 2
- chore: create revision branch and merge with local fork revision
- epic: native ether and ERC1155 swaps HOT 3
- test: create unitary tests for building native ether transfers in `TestSwapFactory.test.ts` HOT 2
- test: create unitary tests to implement native ether transfers in `TestSwaplace.test.ts` HOT 3
- test: create unitary tests for building ERC1155 assets in `TestSwapFactory.test.ts` HOT 2
- test: create unitary tests to implement ERC1155 assets for 1-1, 1-N and N-N HOT 2
- refactor: scripts for running the test suit with makefile need to be upgraded because of native ether feature HOT 2
- refactor: include ERC1155 mock to be deployed with the other types with the test suit scripts HOT 2
- refactor: include ERC1155 to be minted and approved with the other token types HOT 2
- refactor: include ERC1155 in the createSwap() and acceptSwap() scripts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swaplace-contracts.