@eth-sdk/utils
Advanced tools
Comparing version 0.1.0-alpha.1 to 0.1.0-alpha.2
@@ -52,3 +52,10 @@ "use strict"; | ||
for (let i = 0; i < params.length; i += 1) { | ||
const { type, name } = params[i]; | ||
const { type } = params[i]; | ||
let { name } = params[i]; | ||
if (!name) { | ||
name = 'result'; | ||
} | ||
else if (name.startsWith('_')) { | ||
name = name.slice(1); | ||
} | ||
let paramData = data.slice(i * 64, (i + 1) * 64); | ||
@@ -78,3 +85,3 @@ if (type === 'string' || | ||
} | ||
result = Object.assign(Object.assign({}, result), { [name.startsWith('_') ? name.slice(1) : name]: value }); | ||
result = Object.assign(Object.assign({}, result), { [name]: value }); | ||
} | ||
@@ -81,0 +88,0 @@ } |
@@ -0,3 +1,4 @@ | ||
export declare function randomAddress(): string; | ||
export declare function isAddress(value: string): boolean; | ||
export declare function toChecksumAddress(address: string): string; | ||
export declare function computeCreate2Address(creator: string, salt: string, byteCode: string): string; |
@@ -6,2 +6,6 @@ "use strict"; | ||
const keccak_1 = require("./keccak"); | ||
function randomAddress() { | ||
return toChecksumAddress(hex_1.randomHex(20)); | ||
} | ||
exports.randomAddress = randomAddress; | ||
function isAddress(value) { | ||
@@ -8,0 +12,0 @@ return (hex_1.isHex(value, 'data') && |
{ | ||
"name": "@eth-sdk/utils", | ||
"version": "0.1.0-alpha.1", | ||
"version": "0.1.0-alpha.2", | ||
"description": "Eth sdk utils", | ||
@@ -52,3 +52,3 @@ "author": { | ||
}, | ||
"gitHead": "88d02aef4becc490bc2d98b0236daf9a774c36ab" | ||
"gitHead": "202d144473224cb6b918c127f3e52697c6a380f4" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57402
900