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.3.0 to 0.3.1

2

event-watcher.js

@@ -76,3 +76,3 @@ //#########################################################################################

EventSynchronizer.prototype.historyFromBlock = function(fromBlock, callback) {
if(this.events.length==0) if(callback) callback("No event registered!", null);
if(this.events.length==0) { if(callback) callback("No event registered!", null); return;}
this.historyToBlock = this.events[0].instance._eth.blockNumber;

@@ -79,0 +79,0 @@ var toBlock = (+this.historyToBlock);

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

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

@@ -7,3 +7,3 @@

//#########################################################################################
var path=require('path');
var SolidityCompiler = function(web3) {

@@ -84,3 +84,3 @@ this.web3 = web3; // instance of the connection to the geth node

}
const solidityFolder = process.env.PWD+"/.ethereum_contracts";
const solidityFolder = path.resolve(process.env.PWD,".ethereum_contracts");
// save the ABI and Code (unlinked) to a folder for reloading without compilation

@@ -94,4 +94,4 @@ SolidityCompiler.prototype.persist = function() {

// same format generation as what solc --bin --abi Contract.sol would generate.
fs.writeFileSync(solidityFolder+"/"+contract+".abi", JSON.stringify(self.DictContract[contract].abi));
fs.writeFileSync(solidityFolder+"/"+contract+".bin", self.DictContract[contract].unlinkedCode.substr(2));
fs.writeFileSync(path.resolve(solidityFolder, contract+".abi"), JSON.stringify(self.DictContract[contract].abi));
fs.writeFileSync(path.resolve(solidityFolder, contract+".bin"), self.DictContract[contract].unlinkedCode.substr(2));
});

@@ -102,3 +102,3 @@ }

if(! fs.existsSync(solidityFolder)) throw new Error("a folder "+solidityFolder+" is expected to locate the contract abi and binary" );
const abifile = solidityFolder+"/"+contract+".abi";
const abifile = path.resolve(solidityFolder,contract+".abi");
if(fs.existsSync(abifile)) {

@@ -113,3 +113,3 @@ const abi = JSON.parse(fs.readFileSync(abifile));

//this.LibToken[contract]= ("__"+obj.substr(0,36)+"_".repeat(38)).substr(0,40); // 40 is the size of the target address
const binfile=solidityFolder+"/"+contract+".bin";
const binfile= path.resolve(solidityFolder, contract+".bin");
if(fs.existsSync(binfile)) {

@@ -116,0 +116,0 @@ const code="0x"+fs.readFileSync(binfile).toString();

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