Coder Social home page Coder Social logo

oo7-parity's Introduction

oo7-parity

A library to provide Bond-related functionality for the Parity Ethereum implementation and other compatible systems.

See the oo7-parity reference for more information on usage.

Installation

npm install oo7-parity --save

Usage

var oo7parity = require('oo7-parity'),
  bonds = oo7parity.bonds,
  formatBlockNumber = oo7parity.formatBlockNumber;

// Prints a nicely formatted block number each time there's a new block.
bonds.blockNumber.map(formatBlockNumber).tie(console.log);

Tests

npm test

Contributing

In lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.

Release History

  • 0.1.2 Add contract reading bonds
  • 0.1.1 Initial release

oo7-parity's People

Contributors

derhuerst avatar gavofyork avatar ngotchac avatar stemmr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oo7-parity's Issues

[BUG] eth_getBalance(["0x","latest"]): -32602: Invalid length.

Sample code:

import {bonds, formatBlockNumber, formatBalance} from 'oo7-parity';

import React from 'react';

import {Rspan} from 'oo7-react';

export class Screenshot05 extends BaseScene {
	render() {
		return (
			<div>
				Current block author's balance is:&nbsp;
				<Rspan style={{
					fontWeight: 'bold'
				}}>
					{bonds
						.balance(bonds.head.author)
						.map(formatBalance)}
				</Rspan>
			</div>
		);
	}
}

Screenshot:
screenshot from 2017-05-27 23-18-05

Broken build

% npm i --save oo7-parity
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/oo7" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/fangyi/.npm/_logs/2017-11-15T13_51_54_080Z-debug.log
[1] % npm i --save [email protected]
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/oo7" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/fangyi/.npm/_logs/2017-11-15T13_52_01_101Z-debug.log
[1] % npm i --save [email protected]
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/oo7" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/fangyi/.npm/_logs/2017-11-15T13_52_03_611Z-debug.log
[1] % npm i --save [email protected]
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/oo7" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/fangyi/.npm/_logs/2017-11-15T13_52_07_661Z-debug.log
[1] % npm i --save [email protected]
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/oo7" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/fangyi/.npm/_logs/2017-11-15T13_52_10_211Z-debug.log
[1] % npm i --save [email protected]
npm WARN saveError ENOENT: no such file or directory, open '/Users/fangyi/playground/oo7/package.json'
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN enoent ENOENT: no such file or directory, open '/Users/fangyi/playground/oo7/package.json'
npm WARN oo7 No description
npm WARN oo7 No repository field.
npm WARN oo7 No README data
npm WARN oo7 No license field.

+ [email protected]
added 10 packages in 1.9s

All releases after 0.6.9 are broken

Could not install from "node_modules/oo7" as it does not contain a package.json file.

When I try to install 007-parity with npm install --save oo7-parity it got the following error message:

$ npm install --save oo7-parity
npm ERR! code ENOLOCAL
npm ERR! Could not install from "node_modules/oo7" as it does not contain a package.json file.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/schmidsi/.npm/_logs/2017-11-10T09_59_49_517Z-debug.log

That said, it worked when I first installed 007: npm install oo7 --save

It seems to me that the error roots in this line in package.json:
https://github.com/paritytech/oo7-parity/blob/master/package.json#L33

I think this is the wrong method to list a peerDependency. Furthermore, I don't think it should be a peerDependency at all. As far as I understand, peerDependecies are mainly for avoiding double loading of the same package in the browser. A simple dependency would be sufficient here. Correct me if I'm wrong.

However, if someone sheds clarification on the intent, I'm happy to make a pull-request.

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.