Socket
Socket
Sign inDemoInstall

ethereum-web3-plus

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethereum-web3-plus - npm Package Compare versions

Comparing version 0.2.7 to 0.2.8

2

package.json
{
"name": "ethereum-web3-plus",
"version": "0.2.7",
"version": "0.2.8",
"description": "Adds some simplifications to the web3 package such as compilation, instance creation, call sequencing, events readers",

@@ -5,0 +5,0 @@ "main": "index.js",

# Documentation page for ethereum-web3-plus
Package that sits on top of web3 package by frozeman.
This package adds 2 main functionalities:
- The Solidity compilation simplified with automatic linkeage of libraries and contract deployment simplification
- A block watcher and a waitFor (and waitForAll from version 0.2.2)function to get notified when a submitted transaction is completed and considered canonical.
Note that in this version the solidity compiler is the one loaded by the geth node.
This package adds 3 main functionalities:
- The Solidity compilation simplified with automatic linkeage of libraries and contract deployment simplification and quick to use functions added to the Web3 prototype.
- A block watcher and a waitFor (and waitForAll from version 0.2.2) function to get notified when a submitted transaction(s) is(are) completed and considered canonical. Note that in this version the solidity compiler is the one loaded by the geth node.
- A simplified eventSynchronizer (from version 0.2.4) that mixed with the [multi-http-provider] auto resubscribe capability makes life easier to get the history of events from the blocks and listen to new ones.

@@ -68,3 +67,3 @@

### Using the contract functions
### Using the contract functions (newInstanceTx and instanceAt)
```js

@@ -78,2 +77,9 @@ // request the publication of the contract. Returns the tx hash of that request

```
### Getting a deployed library (instanceLibrary)
To get a web3 instance of a library deployed with web3.solidityCompiler.addDeployedLib. Usefull to get the lib in a different module than the one where you set the address.
```js
var compiler = web3.solidityCompiler();
compiler.addDeployedLib("MapString", "0x48f59e9fbce7880a11acd90dc2f99b28accc47f6");
var MapString = web3.instanceLibrary("MapString");
```

@@ -124,3 +130,5 @@ ### Using the block watcher functionalities

- dropAfter: <number>, default=99999999. tells the watcher to drop this transaction if not mined after dropAfter blocks. This in case the local node has been killed before sending the tx to other nodes and/or the watcher loosing the events listener.
- startBlock: <number>, default=eth.blockNumber. tells from which block number interpret the above options. (from version 0.2.7)
```
Note that if you pass a transaction hash that has been done in the past (blocks before the current block) then the waitFor will still activate the callback after verifying the status of the transaction. I.e. you can call this function to check the status of an old transaction.

@@ -210,2 +218,4 @@ ### web3.waitForAll (from version 0.2.2)

The call set the historyToBlock attribute of the EventSynchronizer to the current block number and the history will return the events matching the filter between the provided fromBlock and the historyToBlock. This filed is also used in the watching.
### web3.eventSynchronizer - Watching (from version 0.2.4)

@@ -220,3 +230,4 @@ in the same way as above, you can get notifications when new events matching the filters are stored in the blockchain.

```
The log object has the same format as above, but the isNew flag is set to true.
The log object has the same format as above, but the isNew flag is set to true.
The watching subscribes to future events from block historyToBlock __+1__ to 'latest'.

@@ -229,7 +240,15 @@ ### web3.completeLog (from version 0.2.4)

## Change log
### v 0.2.8
Just republish to NPM with the correct documentation
### v 0.2.7
-
- Added to github
- The EventSynchronizer now sets a historyToBlock variable to the current block at the time of requesting the history or starting the watch so that there are no duplicate between the history request and the watch scope.
- The newInstanceTx has been change to only send the "estimateGas" amount of gas rather than "gasLimit". The previous version is kept under web3.newInstanceTxOld in case you have trouble with the amount of gas.
- creation of web3.instanceLibrary to retieve a web3 instance of a deployed library.
- addition of the fromBlock option in the waitFor function.
- bug corrections
- change name of historyFromBlock
- control of a valid callback before calling
- reset of the filter in the block watcher when stopping.

@@ -236,0 +255,0 @@ ### v 0.2.6 and v 0.2.5

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc