Giter VIP home page Giter VIP logo

Comments (4)

ascjones avatar ascjones commented on June 14, 2024 1

Yes should be able to support multiple optional args with jsonrpc-derive, see here. Just need to fill in the missing ones with None.

from parity-zcash.

ascjones avatar ascjones commented on June 14, 2024 1

@svyatonik jsonrpc-derive is now merged, I've added an issue paritytech/jsonrpc#363 to implement multiple trailing params. I'm happy to do the work to rebase your branch - just let me know.

By the way the issue with failing to deserialize single tuple was because of a missing comma. Single param tuple should be (u64,).

from parity-zcash.

svyatonik avatar svyatonik commented on June 14, 2024

This is currently blocked by the fact that currently jsonrpc_macro doesn't support more than one optional Trailing argument && we need more in some RPC methods (createrawtransaction is the first example). So we need either to support this case in jsonrpc (preferable) or to do a custom args parsing in pzec.

I was researching if that's easy-to-add-feature to the existing jsonrpc_macro && looks like it is, but the problem is that it would require custom macro of ~150 LOCs for every number of trailing args that we're going to support (i.e. if there'll be RPC with 6 optional trailing args, we'll need ~1KLOC), which isn't ideal. Moreover, today I stumbled upon this PR, which should obsolete jsonrpc_macro. So I'm currently researching if this is easy/possible to support multiple optional args in jsonrpc-derive. If so, then we'll probably switch to custom jsonrpc branch until new version is merged && published.

from parity-zcash.

svyatonik avatar svyatonik commented on June 14, 2024

@ascjones Thanks! I'll open PR a bit later && will cc you :)

from parity-zcash.

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.