pull/315/head
pubkey 4 years ago
parent 601f4ee66c
commit b73f9134ca
  1. 4
      dist/es/hash.js
  2. 2
      dist/es/tx-data-by-compiled.js
  3. 4
      dist/lib/hash.js
  4. 4
      dist/lib/tx-data-by-compiled.js
  5. 2
      package.json

4
dist/es/hash.js vendored

@ -1,4 +1,4 @@
import { keccak256 as solidityKeccak256 } from 'ethers/utils/solidity.js';
import { utils as ethersUtils } from 'ethers';
export function keccak256(params) {
var types = [];
@ -12,7 +12,7 @@ export function keccak256(params) {
values.push(p.value);
});
}
return solidityKeccak256(types, values);
return ethersUtils.solidityKeccak256(types, values);
}
export var SIGN_PREFIX = '\x19Ethereum Signed Message:\n32';

@ -1,4 +1,4 @@
import { ContractFactory } from 'ethers/contract.js';
import { ContractFactory } from 'ethers';
export default function txDataByCompiled(abi, bytecode, args) {
// solc returns a string which is often passed instead of the json

4
dist/lib/hash.js vendored

@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
exports.SIGN_PREFIX = undefined;
exports.keccak256 = keccak256;
var _solidity = require('ethers/utils/solidity.js');
var _ethers = require('ethers');
function keccak256(params) {
var types = [];
@ -20,7 +20,7 @@ function keccak256(params) {
values.push(p.value);
});
}
return (0, _solidity.keccak256)(types, values);
return _ethers.utils.solidityKeccak256(types, values);
}
var SIGN_PREFIX = exports.SIGN_PREFIX = '\x19Ethereum Signed Message:\n32';

@ -10,7 +10,7 @@ var _toConsumableArray3 = _interopRequireDefault(_toConsumableArray2);
exports['default'] = txDataByCompiled;
var _contract = require('ethers/contract.js');
var _ethers = require('ethers');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
@ -19,7 +19,7 @@ function txDataByCompiled(abi, bytecode, args) {
if (typeof abi === 'string') abi = JSON.parse(abi);
// Construct a Contract Factory
var factory = new _contract.ContractFactory(abi, '0x' + bytecode);
var factory = new _ethers.ContractFactory(abi, '0x' + bytecode);
var deployTransaction = factory.getDeployTransaction.apply(factory, (0, _toConsumableArray3['default'])(args));

@ -1,6 +1,6 @@
{
"name": "eth-crypto",
"version": "1.6.0",
"version": "1.7.0",
"description": "Cryptographic functions for ethereum and how to use them with web3 and solidity",
"keywords": [
"ethereum",

Loading…
Cancel
Save