Skip to content

CLI for generating javascript modules from Solidity Contracts for Decentralized Apps

License

Notifications You must be signed in to change notification settings

Lucas-gronlund/dapp-scratch

Repository files navigation

Dapp Scratch

A command line interface for generating a Javascript module for interacting with a Solidity contract.

Tutorial

Dapp Scratch: a CLI for Building Dapps (and tutorial for building your first one)

install

npm install okwme/dapp-scratch -g

run

$ dapp-scratch <ContractName>
$ dapp-scratch <ContractName> --address 0x1234567890123456789012345678901234567890
$ dapp-scratch <ContractName> --ABI './build/contracts/ContractName.json'
$ dapp-scratch <ContractName> --contract './contracts/ContractName.sol'
$ dapp-scratch build
$ dapp-scratch -h

Usage: dapp-scratch [options] [command]
Options:
-V, --version   output the version number
    -a, --address   Address
    -b, --abi       ABI
    -c, --contract  Contract
    -h, --help      output usage information
Commands:
* <filename>  Build Wrapper from Contract
build         Build a dummy solidity contract for testing

results

$ dapp-scratch ContractName
ABI found at ./build/contracts/ContractName.json
bignumber.js installed
web3 installed
web3-provider-engine installed
@aeternity/[email protected] installed
Wrapper Created at ./dapp-scratch-wrapper/ContractName/index.js
/*
 * To use ContractName just import it into your project:
 */
import ContractName from './dapp-scratch-wrapper/ContractName'
let contractName = new ContractName()
ContractName.helloWorld()
/*
 * Have Fun : )
 */

develop

git clone [email protected]/okwme/dapp-scratch
cd dapp-scratch
npm install
npm run dev

test

npm run test

About

CLI for generating javascript modules from Solidity Contracts for Decentralized Apps

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%