Giter Club home page Giter Club logo

Comments (21)

Relfos avatar Relfos commented on August 27, 2024 1

Support for RPC is partially working now, so you can use it with private nets that are running Neo-cli. Only checking balances and testinvokes work, sending assets is not possible yet.

from neo-lux.

Relfos avatar Relfos commented on August 27, 2024

Partially done, supports custom urls as API source.

from neo-lux.

dprat0821 avatar dprat0821 commented on August 27, 2024

Hi Relfos. Thanks for your hard work. My project may need this feature very urgently so I tried to add a function in NeoRPC.cs

public static NeoRPC ForPrivateNet(string endpoint) { return new NeoRPC(endpoint); }

But when I used the private net IP (endpoint = "http://xxx.xx.xxx.xx") I got a timeout. Did I miss something? My code called in Unity is like:

var balances = NeoRPC.ForPrivateNet("http://xxx.xx.xxx.xx").GetBalancesOf(this.keys.address);

Thanks very much!

from neo-lux.

Relfos avatar Relfos commented on August 27, 2024

Hi @dprat0821.
NeoLux is written in a way to support multiple backends. There a couple different APIs that allow interaction with the blockchain, like the "official" Neo-cli RPC, the Neon-db API and the Neo-Scan API.

Currently NeoLux only supports Neon-db API, so if you supply a custom IP address, that should be a valid Neon-db server, not a Neo-cli node. However adding support for Neo-cli should be quite fast, I will give it a try today.

from neo-lux.

dprat0821 avatar dprat0821 commented on August 27, 2024

Thanks Relfos. Thanks very much!

from neo-lux.

dprat0821 avatar dprat0821 commented on August 27, 2024

Hi Relfos, Thanks very much. Would you please advice what I can add to the latest NEO-Lux if I need to implement sending assets (tokens, gas) in private net? Documents, sample code, etc. I can try that by myself.

from neo-lux.

Relfos avatar Relfos commented on August 27, 2024

Hi, in latest version I split the main classes into NeoRPC and NeoDB, both have same interface, with NeoDB you can do everything but you will need to have the Neon DB API running in private net, heres a link with instructions:
https://gist.github.com/birmas/689c37e43c7f55745233d3aeb794f833

If using NeoRPC you just need neo-cli in private net, but sending assets does not work yet due to to neo-cli missing an api method to fetch unspent inputs of an address.

from neo-lux.

Relfos avatar Relfos commented on August 27, 2024

With latest version it is possible to use Neo.Lux with private nets if having NeoScan installed at the privatenet:
https://github.com/slipo/neo-scan-docker

from neo-lux.

Dannynz avatar Dannynz commented on August 27, 2024

Hi Relfos,
I am using Neo.Lux to invoke the smart contract on private chain (attached file). I debugged and saw response.state = FAULT and response.transaction = null, it means it could not add data to private chain, is it right? how can I test my smart contract with Neo.Lux on private chain? When you are available, please have a look then give me a hand. Thank you for your time.
neoluxtest

from neo-lux.

Relfos avatar Relfos commented on August 27, 2024

from neo-lux.

Dannynz avatar Dannynz commented on August 27, 2024

Hi Relfos,
Thank you for your feedback. Yes, there are a lots of NEO and GAS. I give you some the screenshots that what I did.

from neo-lux.

Dannynz avatar Dannynz commented on August 27, 2024

Hi Relfos,
I am using NeoLux with NeoScan on Private net, I can get asset balance with NEO 100,000,000 and GAS 16,024 by using api.GetAssetBalancesOf(keys.address). Now I try to deploy smart contract by using api.DeployContract(...) method we expect to see an output for the "result" parameter as true but we keep returning false. Could you please look at these screenshots and give us some feedback. thank you for your help.
contract
debug
method

from neo-lux.

Relfos avatar Relfos commented on August 27, 2024

from neo-lux.

Dannynz avatar Dannynz commented on August 27, 2024

Hi Relfos,
Thank you so much for your feedback. I try to create another contract with string parameter type, but still get the same result = false. Is these some thing missing? When you are available, please give me a hand. Thank you so much for your help.
image
image

from neo-lux.

Relfos avatar Relfos commented on August 27, 2024

from neo-lux.

Dannynz avatar Dannynz commented on August 27, 2024

Hi @Relfos Relfos,
Thank you for your quick reply. I will have a try. Have a nice day.

from neo-lux.

Dannynz avatar Dannynz commented on August 27, 2024

Hi @Relfos ,
Just give you an update. After restart docker, It works well now. Thank you so much for your help.

from neo-lux.

Dannynz avatar Dannynz commented on August 27, 2024

Hi @Relfos ,
After I deployed smart contract successfully. Then I try to add data to Private chain by calling the SetHello method, follow the debugger I got the result with state = FAULT and stack = empty. When you are available, please have a look then give some advice. Thank you for your help.
image
image
invokescript

from neo-lux.

Relfos avatar Relfos commented on August 27, 2024

from neo-lux.

Dannynz avatar Dannynz commented on August 27, 2024

Hi @Relfos ,
Thank you for your feedback. I have tried providing a reversed scripthash string "0x884fd32dba7e664627f16312dd544847d41e7094", but still got the same result. When you are available, please have a look then give me some advice. Thank you so much. Have a nice day.
test2

from neo-lux.

Dannynz avatar Dannynz commented on August 27, 2024

Hi @Relfos ,
Finally I tried to debug and found out the issue that if using void Main(string operation), there was an error message at Neo.VM (look at a screenshot) then I changed to bool Main(string operation), it works fine. Just give you an update. Thank you so much for your help and have a nice weekend.
image

from neo-lux.

Related Issues (20)

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.