-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Allow smart contract verification #1800
Merged
Merged
Changes from 37 commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
0ce0b58
Allow sc verify
shargon 83e2850
Create DeployedContract
shargon 19a8c94
Merge branch 'master' into allow-sc-verify
shargon 4668955
Fix fee
shargon 21536a4
Fix
shargon 26905d4
Change to exceptions
shargon 4ce99fb
Allow static variables during verification
shargon 37f6670
Simplify DeployedContract
erikzhang 898f1c6
Change verify call flags
shargon d541f80
Change to ReadOnly
shargon b1c9772
Merge remote-tracking branch 'origin/allow-sc-verify' into allow-sc-v…
shargon 467c47b
Add error description
shargon 51b8352
Allow cosigners in makeTransaction
shargon d8bf588
Verify as APPCALL
shargon e8d59a9
Fix fee
shargon 817b552
Revert "Fix fee"
shargon 29f1ad2
Revert "Verify as APPCALL"
shargon aa83e12
Auto stash before revert of "Allow cosigners in makeTransaction"
shargon 71cc3f6
None
shargon 6b7ce69
Add comment
shargon ea03ae6
Merge pull request #16 from shargon/other-version
shargon 211fd52
Merge branch 'master' into allow-sc-verify
shargon d2b94bc
Fix CustomGroups
shargon 4caa025
Merge branch 'master' into allow-sc-verify
shargon b26bf2e
Fix UT
shargon c59d474
Merge branch 'allow-sc-verify' of github.com:shargon/neo into allow-s…
shargon 0f93d89
Update DeployedContract.cs
erikzhang 94bd4c2
Optimize MakeTransaction()
erikzhang 2d6d7cd
Update Wallet.cs
erikzhang 62bbfad
Fix
erikzhang 55426f4
Fix fee calculation
shargon 06e8fd6
Optimize CalculateNetworkFee()
erikzhang ab971ce
Try sc verification when the account it's null
shargon c98d61d
Update Wallet.cs
erikzhang ce30cd7
Update Wallet.cs
shargon df0d29c
Add true verify test
shargon 47e8b52
Update Wallet.cs
erikzhang d972416
Merge branch 'master' into allow-sc-verify
shargon b495fc4
Remove check account in wallet
shargon c1c2fa4
Fix UT
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 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 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 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,24 @@ | ||
using Neo.Ledger; | ||
using Neo.SmartContract.Manifest; | ||
using System; | ||
using System.Linq; | ||
|
||
namespace Neo.SmartContract | ||
{ | ||
public class DeployedContract : Contract | ||
{ | ||
public override UInt160 ScriptHash { get; } | ||
|
||
public DeployedContract(ContractState contract) | ||
{ | ||
if (contract is null) throw new ArgumentNullException(nameof(contract)); | ||
|
||
Script = null; | ||
ScriptHash = contract.ScriptHash; | ||
ContractMethodDescriptor descriptor = contract.Manifest.Abi.GetMethod("verify"); | ||
if (descriptor is null) throw new NotSupportedException("The smart contract haven't got verify method."); | ||
|
||
ParameterList = descriptor.Parameters.Select(u => u.Type).ToArray(); | ||
} | ||
} | ||
} |
This file contains 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 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 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.
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.
So as neo-project/neo-node#628 (comment), we don't need this judgment.
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.
Done