-
Notifications
You must be signed in to change notification settings - Fork 5
Tool to "compile" and create spending condition tx — Part 1 #15
Description
Bounty
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...222and so on.
Output:
A<contract>.jsfile 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