Giter Club home page Giter Club logo

neo-lux's Issues

GetStorage method bug

NeoRPC.cs row 58
public override byte[] GetStorage(string scriptHash, byte[] key)
{
var response = QueryRPC("getstorage", new object[] { key.ByteToHex() });
var result = response.GetString("result");
if (string.IsNullOrEmpty(result))
{
return null;
}
return result.HexToBytes();
}
you missed the param of "scriptHash", it should be the first param in new object[]

DemoForUnity has lots of error on building.

Thanks for your work.
There are some obvious errors in file "NeoDemo.cs".
eg:
using NeoLux; using Neo; using Neo.Cryptography; using Neo.VM;

Base on your lastest Neo-Lux it should like
using Neo; using Neo.Lux; using Neo.Lux.Core; using Neo.Lux.Utils; using Neo.Lux.Cryptography;

It will be greatly helpfull if you can fix them .
Thanks in advance

Support for custom networks

Some users might need to test their dApps in a private test net, Neo-Lux must have a way to support this.

Update nuget package

I can see from source code that .NET Core standard is added, but I guess it isn't published to nuget.

Are you planning to publish it ?

Support for Withdraw()

Should be possible to call a method Withdraw(from_address, to_address) which will create a transaction that requests an asset withdrawal or token withdrawal.

.net core ?

Hi guys .
Please tell me when your library is coming to .net ?

How to get a DataNode On a CallContract

Thanks for your wonderful work

It's realy helpful on working with unity.
I want to get a datanode object on calling a method from contract.
but now I got a transaction from which nothing usedfull data is included.

Any advice is appreciated.

Bug in `WaitForTransaction`... [includes fix]

The logic in WaitForTransaction was wrong for finding the confirmed block that contained a specific Tx. I've fixed it.
I found this by running my console app side by side with the NEO-GUI transaction log.

CallContract would only succeed after the previous Tx was confirmed in NEO-GUI and WaitForTransaction was returning too quickly ...relative to what I was seeing in NEO-GUI.

Wait times are about 40-50 seconds (FYI).

Fixes:
https://github.com/mwherman2000/neo-lux/blob/master/Neo.Lux/Core/NeoAPI.cs#L1019
https://github.com/mwherman2000/neo-lux/blob/master/Neo.Lux/Core/NeoAPI.cs#L1069

The fix uses a derivative of my "batches of blocks" looping pattern that I first used in the NeoEventMonitor1 class: https://github.com/mwherman2000/neo-lux/blob/master/NEO.mwherman2000.MonitorEvents/NeoEventMonitor1.cs#L81

neo-lux fails to build

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS0103	The name 'NeoDB' does not exist in the current context	Neo.Lux.Demo	D:\repos\neo-lux\Neo.Lux.Demo\Demo.cs	14	Active
Error	CS1579	foreach statement cannot operate on variables of type '?' because '?' does not contain a public definition for 'GetEnumerator'	Neo.Lux.Demo	D:\repos\neo-lux\Neo.Lux.Demo\Demo.cs	26	Active
Error	CS0103	The name 'NeoDB' does not exist in the current context	Neo.Lux.Demo	D:\repos\neo-lux\Neo.Lux.Demo\Demo.cs	34	Active
Error	CS0103	The name 'NeoDB' does not exist in the current context	Neo.Lux.Tests	D:\repos\neo-lux\Neo.Lux.Tests\NEP5.cs	15	Active

Add MyWish to NeoRPC.cs file under ForPrivateNet method

Hi all,

I would like to add MyWish (http://neoscan.mywish.io) to NeoRPC.cs file as PrivateNet.

I have added the following lines, but it does not work.

Could you help me about how to add MyWish as RemoteRPCNode?

Thank you.

public static NeoRPC ForPrivateNet()
        {
            return new RemoteRPCNode(20332, "http://neo.mywish.io", NEONodesKind.MYWISH);
        }

Also, I have added this code structure to NeoRPC.cs file.

 case NEONodesKind.MYWISH:
                    {
                        nodes = new string[4];
                        for (int i = 0; i < nodes.Length; i++)
                        {
                            nodes[i] = $"http://neo.mywish.io:{port}";
                            port = port + 1;
                        }
                        break;
                    }

Can't call `public static object Main(string operation, params object[] args)` from `Demo.cs`

I'm playing around with neo-lux tonight. Trying to call my NPCdApp:

Script Hash: 0x7074acf3f06dd3f456e11053ebf61c5b04b07ebc (testnet)

public static object Main(string operation, params object[] args) (link to source)

win-gui parameter type: 0710

I tried to change your Demo.cs in a simple way but I'm just getting a null result back (should get back the string "success"). Here's the 4 lines I added to your Demo.cs:

https://github.com/mwherman2000/neo-lux/blob/master/neo-lux-demo/Demo.cs#L51

var NPCdAppContractHash = "0x7074acf3f06dd3f456e11053ebf61c5b04b07ebc".Replace("0x", "");
var response2 = api.TestInvokeScript(NPCdAppContractHash, "test2", new object[] { new BigInteger(5) } );
var result2 = System.Text.Encoding.ASCII.GetString((byte[])response2.result);
Console.WriteLine("result2" + result2);

Is there a simple fix?

Here's the Main() for my SC: https://github.com/mwherman2000/neo-persistibleclasses/blob/master/NPCdApp/NPCdApp.cs#L96

Cheers,
Michael

Any sample or demo for api.CallContract() ?

How to use api.CallContract?

public Transaction CallContract (KeyPair key, UInt160 scriptHash, string operation, object[] args, string attachSymbol = null, IEnumerable<Transaction.Output> attachTargets = null);

New fork and clone to my laptop: Demo.cs doesn't build

These are the errors...

Severity	Code	Description	Project	File	Line	Suppression State
Error	CS0117	'NeoRPC' does not contain a definition for 'ForMainNet'	neo-lux-demo	D:\repos\neo-lux\neo-lux-demo\Demo.cs	31	Active
Error	CS0117	'NeoRPC' does not contain a definition for 'ForTestNet'	neo-lux-demo	D:\repos\neo-lux\neo-lux-demo\Demo.cs	11	Active
Error	CS1579	foreach statement cannot operate on variables of type '?' because '?' does not contain a public definition for 'GetEnumerator'	neo-lux-demo	D:\repos\neo-lux\neo-lux-demo\Demo.cs	23	Active
Error	CS0117	'NeoRPC' does not contain a definition for 'ForTestNet'	neo-lux-light-wallet	D:\repos\neo-lux\neo-lux-light-wallet\WalletForm.cs	11	Active
Error	CS0117	'NeoRPC' does not contain a definition for 'ForMainNet'	neo-sender	D:\repos\neo-lux\neo-sender\Sender.cs	36	Active
Error	CS0117	'NeoRPC' does not contain a definition for 'ForTestNet'	neo-sender	D:\repos\neo-lux\neo-sender\Sender.cs	37	Active
Error	CS7036	There is no argument given that corresponds to the required formal parameter 'port' of 'NeoRPC.NeoRPC(string, int)'	neo-sender	D:\repos\neo-lux\neo-sender\Sender.cs	38	Active

Unable to process transaction using api.InvokeScript .. null transaction is returned

I am trying to invoke a smartcontract and make a transaction over a private network but there is some issue that i am unable to resolve. Will be grateful if someone help me solve the issue.

This is my smart contract code:
image

This is how i am trying to invoke the contract from api code:
image

image

Transaction and result are always returned as null as shown below
image

List all demos with descriptions

Since there are already lots of demos, the readme should be updated with a table containing list of demos and descriptions / notes for each

ScriptBuilder emitting trimmed hexstring

The ScriptBuilder is emitting a trimmed hexstring for BigInteger representation. Usually, the BigInteger is represented as a 16 character hexstring. Trimming may occur for excess zeroes. However, this trimming is causing an issue as the node seems to be unable to process the trimmed BigInteger.

Take for example, 78a1552b1a4cf1eb04a9cfa4998965603a0beb148a80354f0d2d58ef5aeb58c2 on testnet. The VM script uses a trimmed hexstring for the amount and the user reports that the transaction did not effect a change in tokens.

I had this experience in neon-js too and the solution was to always use 8 bytes to represent a BigInteger.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.