Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zos-lib

Package Overview
Dependencies
Maintainers
4
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zos-lib - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

.idea/dictionaries/facu.xml

15

lib/decodeLogs.js
const SolidityEvent = require('web3/lib/web3/event.js');
function decodeLogs (logs, contract) {
return logs.map(log => {
const event = new SolidityEvent(null, contract.events[log.topics[0]], '0x0');
return event.decode(log);
});
const decodedLogs = [];
for (const log of logs) {
const eventName = log.topics[0];
if (eventName in contract.events) {
const eventType = new SolidityEvent(null, contract.events[eventName], '0x0');
decodedLogs.push(eventType.decode(log));
}
}
return decodedLogs;
}
module.exports = decodeLogs
const abi = require('ethereumjs-abi')
function encodeCall(name, arguments = [], rawValues = []) {
function encodeCall(name, args = [], rawValues = []) {
const values = rawValues.map(value => value.toString()) // convert BigNumbers to string
const methodId = abi.methodID(name, arguments).toString('hex');
const params = abi.rawEncode(arguments, values).toString('hex');
const methodId = abi.methodID(name, args).toString('hex');
const params = abi.rawEncode(args, values).toString('hex');
return '0x' + methodId + params;

@@ -8,0 +8,0 @@ }

{
"name": "zos-lib",
"version": "0.1.4",
"version": "0.1.5",
"description": "zeppelin_os library",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

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