N3developertoolkit / neo3-visual-tracker

Neo N3 blockchain explorer that is directly available within Visual Studio Code for developer usage and development scenarios.
https://marketplace.visualstudio.com/items?itemName=ngd-seattle.neo3-visual-tracker
MIT License
7 stars 11 forks source link

Contract Invocation Panel needs Witness Scope support #89

Closed devhawk closed 3 years ago

devhawk commented 3 years ago

The signers of a N3 transaction can specify the scope of their signatures. By default, signatures are CalledByEntry meaning "The signature is only effective to the contract script called by Entry". For example, the signer of a contract invoking ContractManagement.Deploy would not be effective for the _deploy method in the contract being deployed.

Neo Express contract deploy and contract invoke commands support the --witness-scope argument to allow the user to specify None (i.e. signature is not effective, even for the contract being directly invoked), Global (i.e. the signature is effective for the contracts being directly invoked as well as any contract it invokes) or CalledByEntry (i.e. the default)

Contract Invocation Panel at a minimum needs a mechanism to allow user to specify None, Global and CalledByEntry witness scope.

Additionally, there are two other possible WitnessScopes: CustomContracts (i.e. the caller can specify which contracts the signature is effective for) and CustomGroups (used for identifying a set of mutually trusted contracts - for example, all the contracts of a single dApp published by a single party). We can open a separate issue for tracking CustomContracts and CustomGroups support, but it would be great if we added at least CustomContracts support as part of the work to add support for None, Global and CalledByEntry

More details on witness scope here: https://docs.neo.org/docs/en-us/basic/concept/transaction.html#signers

gsmachado commented 3 years ago

@djnicholson and @devhawk Just to tell you that there's some demand from our side to get this feature implemented. 😄 👍