-
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
Conversation
Using the same test used in neo-project/neo-node#628 (comment): I was able to sign and relay the transaction, but the transfer itself doesn't execute. This only happened when transferring from smart contracts. I'm not sure what's causing the problem, but |
@meevee98 please take a look again. I think that it's fixed |
@shargon ,I have tested and it's error, |
Could you show me your script and manifest? I tested it with this code,
|
A simplified contract. script(hex string):
manifest:
|
I think that the problem could be that you use static variables and |
Also |
@ProDog plase take a look again, now you should be able to use a static variable during verify, but check this error please #1800 (comment) |
Yes, I will check it. My contract:
|
The problem was that |
@ProDog it was signed by |
Yes, so signers doesn't contains it. |
Could you try with neo-project/neo-node@c186c36 or with |
@ProDog could you do the last test? |
src/neo/Wallets/Wallet.cs
Outdated
@@ -250,12 +251,12 @@ public Transaction MakeTransaction(TransferOutput[] outputs, UInt160 from = null | |||
else | |||
{ | |||
if (!Contains(from)) | |||
throw new ArgumentException($"The address {from.ToString()} was not found in the wallet"); | |||
throw new ArgumentException($"The address {from} was not found in the wallet"); |
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
Another usage scenario, we use
So it shouldn't be Line 212 in 47e8b52
Now the CLI can't specified the sender to |
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.
Tested OK.
* Allow sc verify * Create DeployedContract * Fix fee * Fix * Change to exceptions * Allow static variables during verification * Simplify DeployedContract * Change verify call flags * Change to ReadOnly * Add error description * Allow cosigners in makeTransaction * Verify as APPCALL * Fix fee * Revert "Fix fee" This reverts commit e8d59a9. * Revert "Verify as APPCALL" This reverts commit d8bf588. * Auto stash before revert of "Allow cosigners in makeTransaction" * None * Add comment * Fix CustomGroups * Fix UT * Update DeployedContract.cs * Optimize MakeTransaction() * Update Wallet.cs * Fix * Fix fee calculation * Optimize CalculateNetworkFee() * Try sc verification when the account it's null * Update Wallet.cs * Update Wallet.cs * Add true verify test * Update Wallet.cs * Remove check account in wallet * Fix UT Co-authored-by: erikzhang <erik@neo.org>
Required for neo-project/neo-node#628 (comment)
Verification
.Verification
.Verification