Skip to content

Tool to "compile" and create spending condition tx — Part 1 #15

@troggy

Description

@troggy

Bounty

⚠️Bounty has EXPIRED. If you want to work on this issue, chime in into comments first ⚠️

This issue takes #5 couple of steps further.

Currently, it is a big deal to create a spending condition transaction. First, you need to create an address, which is fairly easy still requires some boilerplate. Second, when you are about to create a spending condition tx you need to a) know which inputs and outputs to supply b) write more boilerplate like including LEAP input with script and encoded msgData. As a user you will need to study the spencon code to effectively execute it, which makes adoption harder.

Proposal is to create a tool to generate a helper object for each spencon. This helper can be then dropped in a client app and used to simplify making spending condition tx.

Scope

  • create a tool like this:
    Input:

    • path to a contract json file made by Truffle compiler or contract json itself
    • list of parameters for placeholder substitution. Placeholders are expected to be deterministic: 0x1111...111, 0x2222...222 and so on.

    Output:
    A <contract>.js file exporting an object (SpenCon object) with:

    • spencon script
    • spencon address
    • contract code (solidity or link to ipfs)
    • function to generate a base for spending condition tx: input with fee, script and encoded msgData
  • allow to run the tool from command line

  • allow to use the tool programmatically in javascript code (allow require)

  • publish the tool in npm (leapc 😃)

  • add an instruction to docs.leapdao.org

Deliverables

  • command line tool published on npm
  • updated documentation

Gain for the project

  • foster network adoption by providing easier developer experience

Publicly visible delivery

  • updated docs.leapdao.org
  • maybe tweet?

Roles

bounty gardener: @troggy / 10%
bounty worker: name / share
bounty reviewer: name / share

Funded by

Dev Circle

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions