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

@eth-sdk/utils

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@eth-sdk/utils - npm Package Compare versions

Comparing version 0.1.4 to 0.1.5

2

build/abi/decode.d.ts
import { IItemParam, IDecoded } from './interfaces';
export declare function decode<T = IDecoded>(params: IItemParam[], data: string): T;
export declare function decode<T = IDecoded>(params: IItemParam[], data: string, indexed?: boolean): T;

@@ -46,8 +46,10 @@ "use strict";

}
function decode(params, data) {
function decode(params, data, indexed = true) {
let result = null;
if (hex_1.isHex(data, 'data')) {
result = {
length: 0,
};
result = indexed
? {
length: params.length,
}
: {};
data = data.slice(2);

@@ -87,4 +89,6 @@ for (let i = 0; i < params.length; i += 1) {

}
result = Object.assign(Object.assign({}, result), { [name]: value, [i]: value });
result.length += 1;
result = Object.assign(Object.assign({}, result), { [name]: value });
if (indexed) {
result = Object.assign(Object.assign({}, result), { [i]: value });
}
}

@@ -91,0 +95,0 @@ }

@@ -30,3 +30,3 @@ import { TType, TItemStateMutability, TItemType } from './types';

[key: number]: any;
length: number;
length?: number;
}
{
"name": "@eth-sdk/utils",
"version": "0.1.4",
"version": "0.1.5",
"description": "Eth sdk utils",

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

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