-
Notifications
You must be signed in to change notification settings - Fork 226
Conversation
neo-cli/CLI/MainService.Contracts.cs
Outdated
{ | ||
Signer[] signers = Array.Empty<Signer>(); | ||
if (signerAccounts != null && !NoWallet()) | ||
signers = CurrentWallet.GetAccounts().Where(p => !p.Lock && !p.WatchOnly && signerAccounts.Contains(p.ScriptHash)).Select(p => new Signer() { Account = p.ScriptHash, Scopes = WitnessScope.CalledByEntry }).ToArray(); | ||
signers = CurrentWallet.GetAccounts().Where(p => !p.Lock && signerAccounts.Contains(p.ScriptHash)).Select(p => new Signer() { Account = p.ScriptHash, Scopes = WitnessScope.CalledByEntry }).ToArray(); |
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.
Why WatchOnly address can be signer?
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.
Smart contract withdrawal require a watch only address.
@lock9 could you confirm that it solve your problem? |
If we want to allow to use smart contract as sender, we must modify neo-core first. https://github.com/neo-project/neo/blob/master/src/neo/Wallets/Wallet.cs#L252 https://github.com/neo-project/neo/blob/master/src/neo/Wallets/Wallet.cs#L320 https://github.com/neo-project/neo/blob/master/src/neo/Wallets/Wallet.cs#L396 https://github.com/neo-project/neo/blob/master/src/neo/Wallets/Wallet.cs#L402 |
@shargon I can only test this tomorrow morning, by only checking the code I can't ensure it works |
Co-authored-by: Luchuan <luchuan@ngd.neo.org>
You should add as your smart contract as watch only first. |
Yes, we can't know the pubkey |
I've tried to withdraw gas from a smart contract by using the transfer command. As @Tommo-L has said, the neo-core must be changed as well. I've been researching and this fail is because the |
@meevee98 @Tommo-L please, could you check neo-project/neo#1800 ? |
I have tested it OK. |
@ProDog now with neo-project/neo#1800 (comment) (neo-project/neo@ab971ce) it's not required to add the contract as |
* add sender * Adjust the order * update param * fix signers in invoke * fix sender's order
@erikzhang this need to merge, please review it at sometime. |
Compilation error. |
merge? |
As seen in the talk with @lock9
Require neo-project/neo#1800