You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
May an address be differently invoked depending on the function used? In other words, sometimes the variable is passed as a byte[] (hexstring), and sometimes as string(Base58).
Does it hurt usability?
How can I use the CheckWitness and evaluate if the address is a member at the same time?
thrownewInvalidOperationException("Provide a valid destiny address.");
May I use the dual behaviour of an Address at the same invoke function with a conversion such as .AsByteArray()? Or an explicit conversion like the below is enough?
Yes, the address may be passed differently by each function, however it is not good for usability, nor to code readability.
No need to use CheckWitness, just check if the address has a register in the smart contract environment. Only byte[] is needed for that.
No, one format limits the operation of the other. On the present case, the purpose of the ifclause is duplicated. The latter condition is enough to evaluate if an address is a valid option or not.
Activity
[-]The dual behaviorr of an 'Address'[/-][+]The dual behaviour of an 'Address'[/+]yurigabrich commentedon Mar 13, 2020
CheckWitness, just check if the address has a register in the smart contract environment. Onlybyte[]is needed for that.ifclause is duplicated. The latter condition is enough to evaluate if an address is a valid option or not.