- 
                Notifications
    You must be signed in to change notification settings 
- Fork 1k
Allow Native Contracts to be updated #2942
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
          
     Merged
      
      
    
  
     Merged
                    Changes from 10 commits
      Commits
    
    
            Show all changes
          
          
            64 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      24b181f
              
                Update manifest
              
              
                shargon 3c6a1f0
              
                Fix comment
              
              
                shargon a5772bc
              
                Format & fix methods
              
              
                shargon 95335e0
              
                Fix new
              
              
                shargon 7ae51e1
              
                Initialize storage fixes
              
              
                shargon 22d72b5
              
                Fix IsInitializeBlock
              
              
                shargon c7602c6
              
                Fix update
              
              
                shargon b573a00
              
                Fix GetContractState
              
              
                shargon 3adddd2
              
                Optimize
              
              
                shargon 984d3d7
              
                Fix first invoke without sync
              
              
                shargon 6341bad
              
                Remove current methods
              
              
                shargon 4f59c43
              
                Clean usings
              
              
                shargon c85a1cc
              
                Improve reading Initialize
              
              
                shargon 2490280
              
                Clean OnManifestCompose
              
              
                shargon 47317ee
              
                Use cache for all native contracts
              
              
                shargon 8fd8fc2
              
                Fix ut
              
              
                shargon 7ba6274
              
                Move cache to ApplicationEngine
              
              
                shargon 67a9364
              
                Clean code
              
              
                shargon 8eb82db
              
                Allow nullable attribute
              
              
                shargon 8667047
              
                Update src/Neo/SmartContract/Native/ContractEventAttribute.cs
              
              
                 5f41acf
              
                Merge branch 'master' into update-native-contracts
              
              
                 ed33b32
              
                Add base call
              
              
                shargon eea7324
              
                Merge branch 'update-native-contracts' of https://github.com/neo-proj…
              
              
                shargon 594c2e6
              
                Fix one https://github.com/neo-project/neo/pull/2941#discussion_r1382…
              
              
                shargon 64e5cfc
              
                Fix IsInitializeBlock https://github.com/neo-project/neo/pull/2941#di…
              
              
                shargon 1b210ce
              
                Add ContractEventAttribute constructors for ActiveIn
              
              
                shargon 5bb42d2
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon 690b5d4
              
                Ensure ommited hfs
              
              
                shargon 8cef6ce
              
                Rename
              
              
                shargon f114982
              
                Case insensitive hf config
              
              
                shargon 4e27f15
              
                Merge branch 'master' into update-native-contracts
              
              
                 1fee32f
              
                Increase coverage
              
              
                shargon 957a507
              
                Merge branch 'update-native-contracts' of https://github.com/neo-proj…
              
              
                shargon 06f1b23
              
                More uts
              
              
                shargon aee4be3
              
                Rename
              
              
                shargon c4b4a88
              
                Update src/Neo/SmartContract/Native/ContractManagement.cs
              
              
                shargon c5ebf3f
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon 28ac4e6
              
                format code
              
              
                shargon ff852a3
              
                Fix ProtocolSettings
              
              
                shargon f2586ed
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon 53e15b3
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon 8b4d596
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon 405a816
              
                Update src/Neo/SmartContract/ApplicationEngine.cs
              
              
                shargon 4f9739d
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon d621476
              
                format
              
              
                shargon 4ade232
              
                reorder using
              
              
                shargon baa7807
              
                Merge branch 'master' into update-native-contracts
              
              
                 487f4ac
              
                Fix UT
              
              
                shargon 963c557
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon 8c9e0c6
              
                Adding keccak256 (#2925)
              
              
                 7a8bb33
              
                Merge branch 'master' into update-native-contracts
              
              
                 d45fc30
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon c7f0209
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon 6b0916d
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon c13575c
              
                Fix net standard
              
              
                shargon 5940271
              
                Merge branch 'master' into update-native-contracts
              
              
                 48d2349
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon 41914d8
              
                Add ut
              
              
                shargon e87e2b2
              
                Fix update
              
              
                shargon 447583f
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon d00f510
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon 8bcda87
              
                Fix update
              
              
                shargon 40c5d97
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon ef43618
              
                Merge branch 'master' into update-native-contracts
              
              
                shargon File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,134 @@ | ||
| // Copyright (C) 2015-2022 The Neo Project. | ||
|         
                  Jim8y marked this conversation as resolved.
              Outdated
          
            Show resolved
            Hide resolved | ||
| // | ||
| // The neo is free software distributed under the MIT software license, | ||
| // see the accompanying file LICENSE in the main directory of the | ||
| // project or http://www.opensource.org/licenses/mit-license.php | ||
| // for more details. | ||
| // | ||
| // Redistribution and use in source and binary forms with or without | ||
| // modifications are permitted. | ||
|  | ||
| using System; | ||
| using System.Diagnostics; | ||
| using Neo.SmartContract.Manifest; | ||
|  | ||
| namespace Neo.SmartContract.Native | ||
| { | ||
| [DebuggerDisplay("{Descriptor.Name}")] | ||
| [AttributeUsage(AttributeTargets.Constructor, AllowMultiple = true)] | ||
| internal class ContractEventAttribute : Attribute | ||
| { | ||
| public int Order { get; init; } | ||
| public ContractEventDescriptor Descriptor { get; set; } | ||
| public Hardfork? ActiveIn { get; init; } = null; | ||
|  | ||
| public ContractEventAttribute(int order, string name, string arg1Name, ContractParameterType arg1Value) | ||
| { | ||
| Order = order; | ||
| Descriptor = new ContractEventDescriptor() | ||
| { | ||
| Name = name, | ||
| Parameters = new ContractParameterDefinition[] | ||
| { | ||
| new ContractParameterDefinition() | ||
| { | ||
| Name = arg1Name, | ||
| Type = arg1Value | ||
| } | ||
| } | ||
| }; | ||
| } | ||
|  | ||
| public ContractEventAttribute(int order, string name, | ||
| string arg1Name, ContractParameterType arg1Value, | ||
| string arg2Name, ContractParameterType arg2Value) | ||
| { | ||
| Order = order; | ||
| Descriptor = new ContractEventDescriptor() | ||
| { | ||
| Name = name, | ||
| Parameters = new ContractParameterDefinition[] | ||
| { | ||
| new ContractParameterDefinition() | ||
| { | ||
| Name = arg1Name, | ||
| Type = arg1Value | ||
| }, | ||
| new ContractParameterDefinition() | ||
| { | ||
| Name = arg2Name, | ||
| Type = arg2Value | ||
| } | ||
| } | ||
| }; | ||
| } | ||
|  | ||
| public ContractEventAttribute(int order, string name, | ||
| string arg1Name, ContractParameterType arg1Value, | ||
| string arg2Name, ContractParameterType arg2Value, | ||
| string arg3Name, ContractParameterType arg3Value | ||
| ) | ||
| { | ||
| Order = order; | ||
| Descriptor = new ContractEventDescriptor() | ||
| { | ||
| Name = name, | ||
| Parameters = new ContractParameterDefinition[] | ||
| { | ||
| new ContractParameterDefinition() | ||
| { | ||
| Name = arg1Name, | ||
| Type = arg1Value | ||
| }, | ||
| new ContractParameterDefinition() | ||
| { | ||
| Name = arg2Name, | ||
| Type = arg2Value | ||
| }, | ||
| new ContractParameterDefinition() | ||
| { | ||
| Name = arg3Name, | ||
| Type = arg3Value | ||
| } | ||
| } | ||
| }; | ||
| } | ||
|  | ||
| public ContractEventAttribute(int order, string name, | ||
| string arg1Name, ContractParameterType arg1Value, | ||
| string arg2Name, ContractParameterType arg2Value, | ||
| string arg3Name, ContractParameterType arg3Value, | ||
| string arg4Name, ContractParameterType arg4Value | ||
| ) | ||
| { | ||
| Order = order; | ||
| Descriptor = new ContractEventDescriptor() | ||
| { | ||
| Name = name, | ||
| Parameters = new ContractParameterDefinition[] | ||
| { | ||
| new ContractParameterDefinition() | ||
| { | ||
| Name = arg1Name, | ||
| Type = arg1Value | ||
| }, | ||
| new ContractParameterDefinition() | ||
| { | ||
| Name = arg2Name, | ||
| Type = arg2Value | ||
| }, | ||
| new ContractParameterDefinition() | ||
| { | ||
| Name = arg3Name, | ||
| Type = arg3Value | ||
| }, | ||
| new ContractParameterDefinition() | ||
| { | ||
| Name = arg4Name, | ||
| Type = arg4Value | ||
| } | ||
| } | ||
| }; | ||
| } | ||
| } | ||
| } | ||
  
    
      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
    
  
  
    
              
  
    
      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
    
  
  
    
              
              
      
      Oops, something went wrong.
        
    
  
  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.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.