@0xcert/ethereum-utils
Advanced tools
Comparing version 0.0.0-alpha7 to 0.0.0-alpha8
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
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
9412
30
1
1
1
8
0
8
+ Addedethers@4.0.0-beta.1
+ Added@types/node@10.17.60(transitive)
+ Addedaes-js@3.0.0(transitive)
+ Addedelliptic@6.3.3(transitive)
+ Addedethers@4.0.0-beta.1(transitive)
+ Addedhash.js@1.1.3(transitive)
+ Addedjs-sha3@0.5.7(transitive)
+ Addedscrypt-js@2.0.3(transitive)
+ Addedsetimmediate@1.0.4(transitive)
+ Addeduuid@2.0.1(transitive)
+ Addedxmlhttprequest@1.8.0(transitive)
- Removedweb3-eth-abi@^1.0.0-beta.36
- Removed@ethereumjs/rlp@4.0.1(transitive)
- Removed@ethereumjs/util@8.1.0(transitive)
- Removed@ethersproject/abi@5.7.0(transitive)
- Removed@ethersproject/abstract-provider@5.7.0(transitive)
- Removed@ethersproject/abstract-signer@5.7.0(transitive)
- Removed@ethersproject/address@5.7.0(transitive)
- Removed@ethersproject/base64@5.7.0(transitive)
- Removed@ethersproject/bignumber@5.7.0(transitive)
- Removed@ethersproject/bytes@5.7.0(transitive)
- Removed@ethersproject/constants@5.7.0(transitive)
- Removed@ethersproject/hash@5.7.0(transitive)
- Removed@ethersproject/keccak256@5.7.0(transitive)
- Removed@ethersproject/logger@5.7.0(transitive)
- Removed@ethersproject/networks@5.7.1(transitive)
- Removed@ethersproject/properties@5.7.0(transitive)
- Removed@ethersproject/rlp@5.7.0(transitive)
- Removed@ethersproject/signing-key@5.7.0(transitive)
- Removed@ethersproject/strings@5.7.0(transitive)
- Removed@ethersproject/transactions@5.7.0(transitive)
- Removed@ethersproject/web@5.7.1(transitive)
- Removed@noble/curves@1.4.2(transitive)
- Removed@noble/hashes@1.4.01.6.1(transitive)
- Removed@scure/base@1.1.9(transitive)
- Removed@scure/bip32@1.4.0(transitive)
- Removed@scure/bip39@1.3.0(transitive)
- Removedbn.js@4.11.65.2.1(transitive)
- Removedelliptic@6.5.4(transitive)
- Removedethereum-bloom-filters@1.2.0(transitive)
- Removedethereum-cryptography@2.2.1(transitive)
- Removedethjs-unit@0.1.6(transitive)
- Removedhash.js@1.1.7(transitive)
- Removedhmac-drbg@1.0.1(transitive)
- Removedis-hex-prefixed@1.0.0(transitive)
- Removedjs-sha3@0.8.0(transitive)
- Removedmicro-ftch@0.3.1(transitive)
- Removedminimalistic-crypto-utils@1.0.1(transitive)
- Removednumber-to-bn@1.7.0(transitive)
- Removedrandombytes@2.1.0(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstrip-hex-prefix@1.0.0(transitive)
- Removedutf8@3.0.0(transitive)
- Removedweb3-eth-abi@1.10.4(transitive)
- Removedweb3-utils@1.10.4(transitive)