Merge branch 'master' of github.com:ethers-io/ethers.js

This commit is contained in:
Richard Moore 2017-11-19 22:26:41 -05:00
commit 424abc3395
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295
11 changed files with 31 additions and 15 deletions

View File

@ -5556,6 +5556,12 @@ function checkTransaction(transaction) {
transaction.gasLimit = transaction.gas;
}
// Some clients (TestRPC) do strange things like return 0x0 for the
// 0 address; correct this to be a real address
if (transaction.to && utils.bigNumberify(transaction.to).isZero) {
transaction.to = '0x0000000000000000000000000000000000000000';
}
// Rename input to data
if (transaction.input != null && transaction.data == null) {
transaction.data = transaction.input;
@ -5662,9 +5668,7 @@ var formatTransactionReceipt = {
function checkTransactionReceipt(transactionReceipt) {
var status = transactionReceipt.status;
var root = transactionReceipt.root;
if (!((status != null) ^ (root != null))) {
throw new Error('invalid transaction receipt - exactly one of status and root should be present');
}
var result = check(formatTransactionReceipt, transactionReceipt);
result.logs.forEach(function(entry, index) {
if (entry.transactionLogIndex == null) {

File diff suppressed because one or more lines are too long

10
dist/ethers.js vendored
View File

@ -8446,6 +8446,12 @@ function checkTransaction(transaction) {
transaction.gasLimit = transaction.gas;
}
// Some clients (TestRPC) do strange things like return 0x0 for the
// 0 address; correct this to be a real address
if (transaction.to && utils.bigNumberify(transaction.to).isZero) {
transaction.to = '0x0000000000000000000000000000000000000000';
}
// Rename input to data
if (transaction.input != null && transaction.data == null) {
transaction.data = transaction.input;
@ -8552,9 +8558,7 @@ var formatTransactionReceipt = {
function checkTransactionReceipt(transactionReceipt) {
var status = transactionReceipt.status;
var root = transactionReceipt.root;
if (!((status != null) ^ (root != null))) {
throw new Error('invalid transaction receipt - exactly one of status and root should be present');
}
var result = check(formatTransactionReceipt, transactionReceipt);
result.logs.forEach(function(entry, index) {
if (entry.transactionLogIndex == null) {

4
dist/ethers.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -11,7 +11,7 @@
},
"dependencies": {
"ethers-contracts": "^2.1.5",
"ethers-providers": "^2.1.9",
"ethers-providers": "^2.1.11",
"ethers-utils": "^2.1.6",
"ethers-wallet": "^2.1.4"
},

View File

@ -1,6 +1,6 @@
{
"name": "ethers-providers",
"version": "2.1.10",
"version": "2.1.11",
"description": "Service provider for Ethereum wallet library.",
"bugs": {
"url": "http://github.com/ethers-io/ethers.js/issues",

View File

@ -188,6 +188,12 @@ function checkTransaction(transaction) {
transaction.gasLimit = transaction.gas;
}
// Some clients (TestRPC) do strange things like return 0x0 for the
// 0 address; correct this to be a real address
if (transaction.to && utils.bigNumberify(transaction.to).isZero) {
transaction.to = '0x0000000000000000000000000000000000000000';
}
// Rename input to data
if (transaction.input != null && transaction.data == null) {
transaction.data = transaction.input;

View File

@ -324,8 +324,8 @@ function testProvider(providerName, networkName) {
// HACK! Etehrscan is being cloudflare heavy right now and I need
// to release a new version; temporarily turning off these tests
console.log('WARNING: Test cases being skipped! Temporary. Please turn backon soon.');
if (providerName === 'EtherscanProvider' && networkName !== 'homestead') { return; }
//console.log('WARNING: Test cases being skipped! Temporary. Please turn backon soon.');
//if (providerName === 'EtherscanProvider' && networkName !== 'homestead') { return; }
testProvider(providerName, networkName);
});

View File

@ -142,5 +142,6 @@ function bigNumberify(value) {
module.exports = {
isBigNumber: isBigNumber,
bigNumberify: bigNumberify
bigNumberify: bigNumberify,
BigNumber: BigNumber
};

View File

@ -36,6 +36,7 @@ module.exports = {
stripZeros: convert.stripZeros,
bigNumberify: bigNumber.bigNumberify,
BigNumber: bigNumber.BigNumber,
hexlify: convert.hexlify,

View File

@ -1,6 +1,6 @@
{
"name": "ethers-utils",
"version": "2.1.6",
"version": "2.1.7",
"description": "Utilities for the Ethers Ethereum library.",
"bugs": {
"url": "http://github.com/ethers-io/ethers.js/issues",