neo-one
neo-one copied to clipboard
Implement `AssetDescriptor` class from Neo C# code
Look at AssetDescriptor.cs
. What is it used for? Do we need it? Implement it. Add documentation and tests.
For the AssetDescriptor
this is actually a bit trickier than implementing the AssetDescriptor class like they do. This is because we split up node logic and client logic into separate packages. We don't import any node
packages into any client
packages. So when they use their ApplicationEngine
inside their client-side code we have to determine how to split that up in a way that doesn't use the ApplicationEngine/VM in our client package. So for this situation it looks like they use the AssetDescriptor
class inside neo-node
in their CLI. For us this would translate to creating client APIs that would construct a transaction, relay it to the node, the node would test the transaction/run the script, then return the information to the client, which would then provide that information for the Client API to use. So instead of creating an AssetDescriptor
class it would look more like creating an AssetDescriptor
interface in the client I think. Then creating/modifying totalSupply
, balanceOf
, and transfer
methods in our client that would return information in the shape of that AssetDescriptor
interface and use it the way they use it in their wallet methods.