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

@0xcert/ethereum-utils

Package Overview
Dependencies
Maintainers
2
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xcert/ethereum-utils - npm Package Compare versions

Comparing version 0.0.0-alpha7 to 0.0.0-alpha8

dist/lib/big-number.d.ts

2

dist/index.d.ts
export * from './lib/abi';
export * from './lib/normalize-address';
export * from './lib/sha';
export * from './lib/big-number';

@@ -8,3 +8,3 @@ "use strict";

__export(require("./lib/normalize-address"));
__export(require("./lib/sha"));
__export(require("./lib/big-number"));
//# sourceMappingURL=index.js.map

@@ -1,4 +0,2 @@

export declare function encodeFunctionCall(abi: any, data: any): any;
export declare function encodeParameters(abi: any, data: any): any;
export declare function decodeParameters(abi: any, data: any): any;
export declare function decodeParameter(type: string, data: any): any;
export declare function encodeParameters(types: any, values: any): any;
export declare function decodeParameters(types: any, data: any): any;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const eth = require("web3-eth-abi");
function encodeFunctionCall(abi, data) {
return eth.encodeFunctionCall(abi, data);
const abi_coder_1 = require("ethers/utils/abi-coder");
const coder = new abi_coder_1.AbiCoder();
function encodeParameters(types, values) {
return coder.encode(types, values);
}
exports.encodeFunctionCall = encodeFunctionCall;
function encodeParameters(abi, data) {
return eth.encodeParameters(abi, data);
}
exports.encodeParameters = encodeParameters;
function decodeParameters(abi, data) {
const output = eth.decodeParameters(abi, data);
return output;
function decodeParameters(types, data) {
return coder.decode(types, data);
}
exports.decodeParameters = decodeParameters;
function decodeParameter(type, data) {
return eth.decodeParameter(type, data);
}
exports.decodeParameter = decodeParameter;
//# sourceMappingURL=abi.js.map
{
"files": {
"packages/0xcert-ethereum-utils/README.md": "a4f7b69c2c6dd7a7b42f18d4b54c6c47d39d116e",
"packages/0xcert-ethereum-utils/nodemon.json": "82b893373db9861f1df4b55d8ea68a5d37b118de",
"packages/0xcert-ethereum-utils/package.json": "d77e3a7d22b3e7320813419b312fa9bea945c7d2",
"packages/0xcert-ethereum-utils/src/index.ts": "496aa52d350408a3807496bcb72deeec1a32249b",
"packages/0xcert-ethereum-utils/src/lib/abi.ts": "ff40889d558e848ae1c88ac833952ca85378a240",
"packages/0xcert-ethereum-utils/package.json": "6ae37b4ec0eba232df32ee7608c4df434ee204f9",
"packages/0xcert-ethereum-utils/src/index.ts": "7572a5bccc32fd2d321a3e80ed303e6a944d0f08",
"packages/0xcert-ethereum-utils/src/lib/abi.ts": "9c257bbbc44db4b4495f02ec8f7b8453754779a5",
"packages/0xcert-ethereum-utils/src/lib/big-number.ts": "12fe3d0e7d721fd0beb939467104cdc4c99bef09",
"packages/0xcert-ethereum-utils/src/lib/normalize-address.ts": "298f0d0dfd374ef8039ed334614be4a82923d0d3",
"packages/0xcert-ethereum-utils/src/lib/sha.ts": "961948fda25711783927f414711102feb284f1c6",
"packages/0xcert-ethereum-utils/src/tests/encode-parameters.test.ts": "e8c7395cea9868d1dc97bf60b80bf85adfe15b91",
"packages/0xcert-ethereum-utils/src/tests/index.test.ts": "4158bc2c5b392389a4edcfd938158a0acad3a9e2",
"packages/0xcert-ethereum-utils/tsconfig.json": "4aeac3c20e45b7e477e82012eb7788f7dbb11bf3",
"common/config/rush/npm-shrinkwrap.json": "b5af47441ed8345fd5cfe61bc37d9d7008283a33"
"common/config/rush/npm-shrinkwrap.json": "8f19ba9dbdefd16dc6af9aff055b174191c3e0b8"
},
"arguments": "npm run clean; npx tsc "
"arguments": "npx specron test "
}
{
"name": "@0xcert/ethereum-utils",
"version": "0.0.0-alpha7",
"description": "Ethereum utils for 0xcert protocol.",
"version": "0.0.0-alpha8",
"description": "General Ethereum utility module with helper functions for the Ethereum blockchain.",
"main": "./dist/index.js",

@@ -23,15 +23,49 @@ "types": "./dist/index.d.ts",

},
"repository": {
"type": "git",
"url": "git+https://github.com/0xcert/framework.git"
},
"bugs": {
"url": "https://github.com/0xcert/framework/issues"
},
"homepage": "https://github.com/0xcert/framework#readme",
"keywords": [
"0xcert",
"framework",
"protocol",
"asset",
"value",
"values",
"currency",
"token",
"non-fungible",
"fungible",
"erc-721",
"erc-20",
"blockchain",
"javascript",
"typescript",
"nodejs",
"vuejs",
"nuxtjs",
"npm",
"libraries",
"smart-contract",
"ethereum",
"zxc"
],
"license": "MIT",
"devDependencies": {
"@0xcert/ethereum-sandbox": "0.0.0-alpha7",
"@specron/cli": "^0.5.0",
"@specron/spec": "^0.5.0",
"solc": "^0.5.1",
"@0xcert/ethereum-sandbox": "0.0.0-alpha8",
"@specron/cli": "^0.5.1",
"@specron/spec": "^0.5.1",
"solc": "0.5.1",
"ts-node": "^7.0.1",
"typescript": "^3.1.1",
"web3": "^1.0.0-beta.36"
"web3": "^1.0.0-beta.36",
"@0xcert/utils": "0.0.0-alpha8"
},
"dependencies": {
"web3-eth-abi": "^1.0.0-beta.36"
"ethers": "4.0.0-beta.1"
}
}
export * from './lib/abi';
export * from './lib/normalize-address';
export * from './lib/sha';
export * from './lib/big-number';

@@ -1,30 +0,11 @@

// TODO: Refacto all !!!!!!!
import { AbiCoder } from 'ethers/utils/abi-coder';
import * as eth from 'web3-eth-abi';
const coder = new AbiCoder();
export function encodeFunctionCall(abi: any, data: any) {
return eth.encodeFunctionCall(abi, data);
export function encodeParameters(types: any, values: any) {
return coder.encode(types, values);
}
export function encodeParameters(abi: any, data: any) {
return eth.encodeParameters(abi, data);
export function decodeParameters(types: any, data: any) {
return coder.decode(types, data);
}
export function decodeParameters(abi: any, data: any) {
const output = eth.decodeParameters(abi, data);
// for (const i in abi) {
// switch(abi[i].type) {
// case 'uint256':
// output[i] = new Big(output[i]);
// break;
// }
// }
return output;
}
export function decodeParameter(type: string, data: any) {
return eth.decodeParameter(type, data);
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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