Harry Pierson

Results 114 comments of Harry Pierson

Tokens/TokensOf should return IAsyncEnumerable. Possible implementation (as extension methods): ```cs public static IAsyncEnumerable TokensOfAsync(this RpcClient rpcClient, UInt160 scriptHash, UInt160 owner) { const string METHOD = "tokensOf"; var script = Neo.VM.Helper.MakeScript(scriptHash,...

And a possible implementation of PropertiesAsync ```cs public static async Task PropertiesAsync(this RpcClient rpcClient, UInt160 scriptHash, ByteString tokenId) { const string METHOD = "properties"; var script = Neo.VM.Helper.MakeScript(scriptHash, METHOD, tokenId.GetSpan().ToArray());...

Is there an issue tracking the problem this PR is intended to address

> > Is there an issue tracking the problem this PR is intended to address > > No, just for make the code cleaner and readable Making *contract* code cleaner...

@shargon Can you test compiling the contracts in this zip file using nccs 3.3.0? There are two single-file contracts in this zip file. ``` > nccs AssertContract.cs error NC1002: Unknown...

For AssertContract, nccs is throwing in `ConvertExtern` even though the `ExecutionEngine.Assert(bool, string)` overload is not an extern method From https://github.com/neo-project/neo-devpack-dotnet/blob/master/src/Neo.Compiler.CSharp/MethodConvert.cs#L123 ``` cs public void Convert(SemanticModel model) { // when converting...

Note, SomeToken contract ends up in `ConvertExtern` when trying to compile `TotalSupply` as well. I will update the issue title to reflect this

FYI, it appears both of these contracts also fail to compile under nccs v3.1.0

I think I know what's going on here. In nccs, depending on the command line parameters the execution path goes thru either `CompilationContext.CompileProject` or `CompilationContext.CompileSources`. The `CompileSources` path simply adds...

FYI, I'm going to tackle this bug after I do #760