feat: Add Neo Smart Contract Solution template with unit tests#1502
Open
feat: Add Neo Smart Contract Solution template with unit tests#1502
Conversation
Add a new template 'neocontract' that creates a complete solution structure: - Contract project with Neo.SmartContract.Framework and Analyzer packages - Unit test project with Neo.SmartContract.Testing package - Solution file linking both projects - Sample smart contract with owner management functionality - Sample test file with MSTest setup The template uses NuGet package references (version 3.9.1) for all dependencies.
- Update all templates from Neo version 3.8.1-* to 3.9.1 - Fix nccs debug argument from '-d' to '-d Extended' for proper debug info generation - Applied to neocontractnep17, neocontractowner, neocontractoracle, and neocontractsolution templates
shargon
approved these changes
Jan 31, 2026
Wi1l-B0t
reviewed
Jan 31, 2026
| public delegate void OnSetOwnerDelegate(UInt160 previousOwner, UInt160 newOwner); | ||
|
|
||
| [DisplayName("SetOwner")] | ||
| public static event OnSetOwnerDelegate OnSetOwner; |
Contributor
There was a problem hiding this comment.
It's OK if the DisplayName of this event is SetOwner and there is a SetOwner method?
Contributor
Author
There was a problem hiding this comment.
it actually does not matter, but udpated anyway
Jim8y
commented
Feb 1, 2026
...eo.SmartContract.Template/templates/neocontractsolution/NeoContractSolution/SmartContract.cs
Show resolved
Hide resolved
Wi1l-B0t
approved these changes
Feb 1, 2026
Member
|
ut fault |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new solution template
neocontractthat creates a complete smart contract project structure with unit tests.Changes
New Template:
neocontractCreates a solution with:
Template Updates
-dto-d Extendedfor proper debug infosourceNamereplacementUsage
Verification
dotnet test tests/Neo.SmartContract.Template.UnitTests/Neo.SmartContract.Template.UnitTests.csprojFiles Added
src/Neo.SmartContract.Template/templates/neocontractsolution/(8 new files)tests/Neo.SmartContract.Template.UnitTests/templates/neocontractsolution/Files Modified