-
Notifications
You must be signed in to change notification settings - Fork 0
refactor code, init arc 1400 token implementation #1
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the code structure and implements support for ARC1400 token standards. The primary purpose is to modernize the token service architecture by organizing models into specific token type categories and adding comprehensive support for various blockchain token standards including ERC20, ASA, ARC3, ARC200, and the newly introduced ARC1400 tokens.
Key changes include:
- Restructured model organization with separate folders for each token type (ERC20, ASA, ARC3, ARC200, ARC1400, AVM, EVM)
- Updated service interfaces and implementations to support multiple token types
- Added comprehensive token deployment endpoints for all supported standards
- Updated configuration structure to support multiple EVM chains and application settings
Reviewed Changes
Copilot reviewed 66 out of 69 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| BiatecTokensApi/Services/ | Refactored service architecture with new interfaces and implementations for each token type |
| BiatecTokensApi/Models/ | Reorganized models into token-type specific folders with proper inheritance hierarchy |
| BiatecTokensApi/Controllers/TokenController.cs | Updated controller with endpoints for all supported token types |
| BiatecTokensApi/Configuration/ | Updated configuration classes to support multiple chains and app settings |
| BiatecTokensTests/ | Updated test files to use new model structure and service interfaces |
| BiatecTokensApi/ABI/ | Added new token contract ABI files for mintable and preminted variants |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| } | ||
|
|
||
| break; | ||
| case TokenType.ARC200_Preminted: |
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The validation case uses TokenType.ARC200_Preminted but this is in the ERC20TokenService. This should be TokenType.ERC20_Preminted to match the service's purpose.
| case TokenType.ARC200_Preminted: | |
| case TokenType.ERC20_Preminted: |
| var acc = ARC76.GetAccount(_appConfig.CurrentValue.Account); | ||
| var algod = GetAlgod(request.Network); | ||
|
|
||
| var client = new Generated.Arc200Proxy(algod, 0); |
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Generated.Arc200Proxy class is referenced but the Generated folder is marked as empty in the project file. This will cause compilation errors unless the generated code is present.
| var acc = ARC76.GetAccount(_appConfig.CurrentValue.Account); | ||
| var algod = GetAlgod(request.Network); | ||
|
|
||
| var client = new Generated.Arc1644Proxy(algod, 0); |
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Generated.Arc1644Proxy class is referenced but the Generated folder is marked as empty in the project file. This will cause compilation errors unless the generated code is present.
| [ProducesResponseType(typeof(EVMTokenDeploymentResponse), StatusCodes.Status200OK)] | ||
| [ProducesResponseType(StatusCodes.Status400BadRequest)] | ||
| [ProducesResponseType(StatusCodes.Status500InternalServerError)] | ||
| public async Task<IActionResult> ERC20PremnitedTokenCreate([FromBody] ERC20PremintedTokenDeploymentRequest request) |
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Method name contains a typo: 'ERC20PremnitedTokenCreate' should be 'ERC20PremintedTokenCreate' (missing 'i' in 'Preminted').
| public async Task<IActionResult> ERC20PremnitedTokenCreate([FromBody] ERC20PremintedTokenDeploymentRequest request) | |
| public async Task<IActionResult> ERC20PremintedTokenCreate([FromBody] ERC20PremintedTokenDeploymentRequest request) |
| if (tokenType == TokenType.ASA_FT) | ||
| { | ||
| if (request is ASANonFungibleTokenDeploymentRequest nftRequest) | ||
| { | ||
| return CreateNFTAsync(nftRequest); | ||
| } | ||
| } |
Copilot
AI
Sep 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic is incorrect - when tokenType == TokenType.ASA_FT, it should handle ASAFungibleTokenDeploymentRequest, not ASANonFungibleTokenDeploymentRequest. This condition should check for TokenType.ASA_NFT.
No description provided.