-
Notifications
You must be signed in to change notification settings - Fork 30
Open
Labels
ODHack8Only dust 8Only dust 8difficulty: mediumTo resolve the issue, it is necessary to gain an understanding of some aspects of the codebaseTo resolve the issue, it is necessary to gain an understanding of some aspects of the codebasegood first issueGood for newcomersGood for newcomerslang:cairoWork on the Starknet part of the application; you need to know Cairo lang.Work on the Starknet part of the application; you need to know Cairo lang.priority: medium
Description
Description
We need to extend our NFT orderbook smart contract to support ERC-20 tokens in addition to the currently supported token standards. This addition will allow for fungible token trading within our orderbook system.
Current Status
- The smart contract currently supports ERC-721 tokens and is being updated to support ERC-1155.
- We need to adapt the structure to accommodate ERC-20 tokens, which have different characteristics from NFTs.
Tasks
- Deploy an ERC-20 token contract on a devnet for testing purposes.
- Add support for the ERC-20 standard to the orderbook smart contract:
- Implement dedicated functions for ERC-20 interactions.
- Modify existing logic to handle token quantities.
- Implement logic to handle non-existing token IDs (as ERC-20 tokens don't have individual IDs).
Implementation Details
- The primary changes for ERC-20 support will be:
- Handling token quantities (similar to ERC-1155 support).
- Removing the concept of token IDs for ERC-20 transactions.
- Existing functions and data structures should be reviewed and updated to accommodate these changes.
- New functions specific to ERC-20 operations will need to be added.
Acceptance Criteria
- ERC-20 token contract successfully deployed on devnet
- Orderbook smart contract updated to support ERC-20 tokens
- All existing functionality for other token standards remains intact
- New ERC-20 specific functions are implemented and tested
- Quantity handling is correctly implemented for ERC-20 tokens
- Logic for handling non-existing token IDs is implemented and tested
- All tests pass, including new tests for ERC-20 functionality
Additional Notes
- Ensure backwards compatibility with existing supported token standards
- Update documentation to reflect new ERC-20 support
- Consider gas optimization when implementing quantity handling
- Implement appropriate checks to distinguish between different token standards in the contract
Metadata
Metadata
Labels
ODHack8Only dust 8Only dust 8difficulty: mediumTo resolve the issue, it is necessary to gain an understanding of some aspects of the codebaseTo resolve the issue, it is necessary to gain an understanding of some aspects of the codebasegood first issueGood for newcomersGood for newcomerslang:cairoWork on the Starknet part of the application; you need to know Cairo lang.Work on the Starknet part of the application; you need to know Cairo lang.priority: medium