Socket
Socket
Sign inDemoInstall

autest

Package Overview
Dependencies
436
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    autest

Spore - Simple package manager for Ethereum


Version published
Maintainers
1
Created

Readme

Source

Gitter

IMPORTANT: This is a proof of concept prototype and shouldn't be used in production

For fast development of DApps a package management is needed. Spore is a Proof of Concept prototype for a such package manager build on top of truffle, ethereum and ipfs.

Any form on Feedback and contribution is highly wellcome.

{{toc}}

Installation

Make sure you have node v4+ installed:

$ node --version
v4.0.0

Install Spore:

npm i -g eth-spore

On your first run spore will guide you trough a eth-rpc and ipfs configuration.

Currently it is optimized for truffle, you may want to install truffle as well:

npm -g i truffle

For full decentral usage:

Usage

$ spore --help

{{ cli }}

GUI

http://spore.memhub.io

(Decentral version on IPFS will follow shortly)

Workflow

Create a new project:

mkdir mypackage 
cd mypackage
truffle init
spore init

this will create a spore.json in your root project directory:

{
  "name": "mypackage",
  "version": "0.1.0",
  "description": "description",
  "dependencies": {},
  "contracts": [],
  "ignore": [],
  "files": [],
  "tags": []
}

install a dependency:

spore install mortal

import dependency to your contract: contracts/mcontract.sol

import "mortal";

contract mycontract is mortal {
...

link the dependencies:

spore link

add some files:

spore add contracts/mycontract.sol
spore add readme.md

publish the package:

spore publish

Now you can install the package mypackage along with it's dependencies in another project via:

spore install mypackage

Beginner Turorial

How to write a coin tutorial with truffle and spore

API documentation

Read the Full API Documentation here.

Development - Installation

This will guide you trough a local development installation. The contract is not deployed on a global chain, yet.

Make sure you have node v4+ installed:

$ node --version
v4.0.0

Make sure you have solidity installed:

$ solc --version
solc, the solidity compiler commandline interface
Version: 0.1.1-ed7a8a35/Release-Darwin/clang/JIT

Install eth-testrpc for testing/ dev purposes. pip install eth-testrpc

Install truffle. npm install -g truffle

Install ipfs.

clone this repo: git clone https://github.com/mhhf/spore.git

install:

cd spore
npm install
npm link

Run your rpc client( In this case testrpc testrpc )

Deploy the spore ethereum contract with: truffle deploy

Test

Run a local chain: testrpc

Deploy the contract: truffle deploy

Run the test: mocha test

How it works

This Ethereum contract has a name => ipfs-hash mapping and some functionallity to access and manipulate it.

The ipfs-hash is pointing to a package-header which specified by this json schema. An example header for spore is:

{{ spore_json }}

The dependencies property contains packages with their ipfs header file. The root property points to a ipfs directory node which contains the package files.

Next steps

  • filling spore with content
  • integrate a light-wallet into it, so that the user don't need to run a full node to publish packages.
  • extend it to other dev-tools and testing-frameworks like populus or embark
  • add a ( decentral ) plugin system with pre publish and post publish hooks. Use cases could be:
    • different proposals (pull request) for one package
    • ownership based change voting
    • oracle filter which only allows a new version of a package, if all tests succeeded

Keywords

FAQs

Last updated on 09 Mar 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc