Updates dist files (for CI).

This commit is contained in:
Richard Moore 2020-02-12 14:39:03 -05:00
parent ec198fdb93
commit fa25e61f77
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651
11 changed files with 11236 additions and 11202 deletions

22370
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -1 +1 @@
export declare const version = "tests/5.0.0-beta.150";
export declare const version = "tests/5.0.0-beta.151";

@ -1 +1 @@
export const version = "tests/5.0.0-beta.150";
export const version = "tests/5.0.0-beta.151";

@ -3,6 +3,7 @@ import assert from "assert";
import { ethers } from "ethers";
import contractData from "./test-contract.json";
const provider = new ethers.providers.InfuraProvider('rinkeby');
const TIMEOUT_PERIOD = 120000;
const contract = (function () {
return new ethers.Contract(contractData.contractAddress, contractData.interface, provider);
})();
@ -38,13 +39,29 @@ function TestContractEvents() {
});
function waitForEvent(eventName, expected) {
return new Promise(function (resolve, reject) {
let done = false;
contract.on(eventName, function () {
if (done) {
return;
}
done = true;
let args = Array.prototype.slice.call(arguments);
let event = args.pop();
event.removeListener();
equals(event.event, args, expected);
resolve();
});
const timer = setTimeout(() => {
if (done) {
return;
}
done = true;
contract.removeAllListeners();
reject(new Error("timeout"));
}, TIMEOUT_PERIOD);
if (timer.unref) {
timer.unref();
}
});
}
return new Promise(function (resolve, reject) {
@ -67,11 +84,11 @@ function TestContractEvents() {
}
describe('Test Contract Objects', function () {
it('parses events', function () {
this.timeout(120000);
this.timeout(TIMEOUT_PERIOD);
return TestContractEvents();
});
it('ABIv2 parameters and return types work', function () {
this.timeout(120000);
this.timeout(TIMEOUT_PERIOD);
let p0 = '0x06B5955A67D827CDF91823E3bB8F069e6c89c1D6';
let p0_0f = '0x06B5955a67d827cDF91823e3bB8F069E6c89c1e5';
let p0_f0 = '0x06b5955a67D827CDF91823e3Bb8F069E6C89c2C6';
@ -99,13 +116,13 @@ describe('Test Contract Objects', function () {
return seq;
});
it('collapses single argument solidity methods', function () {
this.timeout(120000);
this.timeout(TIMEOUT_PERIOD);
return contract.testSingleResult(4).then((result) => {
assert.equal(result, 5, 'single value returned');
});
});
it('does not collapses multi argument solidity methods', function () {
this.timeout(120000);
this.timeout(TIMEOUT_PERIOD);
return contract.testMultiResult(6).then((result) => {
assert.equal(result[0], 7, 'multi value [0] returned');
assert.equal(result[1], 8, 'multi value [1] returned');

@ -8,7 +8,7 @@ const blockchainData = {
addresses: [
{
address: "0xAC1639CF97a3A46D431e6d1216f576622894cBB5",
balance: bnify("4918774100000000"),
balance: bnify("4813414100000000"),
code: "0x"
},
// Splitter contract

@ -1 +1 @@
export declare const version = "tests/5.0.0-beta.150";
export declare const version = "tests/5.0.0-beta.151";

@ -1,3 +1,3 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "tests/5.0.0-beta.150";
exports.version = "tests/5.0.0-beta.151";

@ -7,6 +7,7 @@ var assert_1 = __importDefault(require("assert"));
var ethers_1 = require("ethers");
var test_contract_json_1 = __importDefault(require("./test-contract.json"));
var provider = new ethers_1.ethers.providers.InfuraProvider('rinkeby');
var TIMEOUT_PERIOD = 120000;
var contract = (function () {
return new ethers_1.ethers.Contract(test_contract_json_1.default.contractAddress, test_contract_json_1.default.interface, provider);
})();
@ -42,13 +43,29 @@ function TestContractEvents() {
});
function waitForEvent(eventName, expected) {
return new Promise(function (resolve, reject) {
var done = false;
contract.on(eventName, function () {
if (done) {
return;
}
done = true;
var args = Array.prototype.slice.call(arguments);
var event = args.pop();
event.removeListener();
equals(event.event, args, expected);
resolve();
});
var timer = setTimeout(function () {
if (done) {
return;
}
done = true;
contract.removeAllListeners();
reject(new Error("timeout"));
}, TIMEOUT_PERIOD);
if (timer.unref) {
timer.unref();
}
});
}
return new Promise(function (resolve, reject) {
@ -71,11 +88,11 @@ function TestContractEvents() {
}
describe('Test Contract Objects', function () {
it('parses events', function () {
this.timeout(120000);
this.timeout(TIMEOUT_PERIOD);
return TestContractEvents();
});
it('ABIv2 parameters and return types work', function () {
this.timeout(120000);
this.timeout(TIMEOUT_PERIOD);
var p0 = '0x06B5955A67D827CDF91823E3bB8F069e6c89c1D6';
var p0_0f = '0x06B5955a67d827cDF91823e3bB8F069E6c89c1e5';
var p0_f0 = '0x06b5955a67D827CDF91823e3Bb8F069E6C89c2C6';
@ -103,13 +120,13 @@ describe('Test Contract Objects', function () {
return seq;
});
it('collapses single argument solidity methods', function () {
this.timeout(120000);
this.timeout(TIMEOUT_PERIOD);
return contract.testSingleResult(4).then(function (result) {
assert_1.default.equal(result, 5, 'single value returned');
});
});
it('does not collapses multi argument solidity methods', function () {
this.timeout(120000);
this.timeout(TIMEOUT_PERIOD);
return contract.testMultiResult(6).then(function (result) {
assert_1.default.equal(result[0], 7, 'multi value [0] returned');
assert_1.default.equal(result[1], 8, 'multi value [1] returned');

@ -12,7 +12,7 @@ var blockchainData = {
addresses: [
{
address: "0xAC1639CF97a3A46D431e6d1216f576622894cBB5",
balance: bnify("4918774100000000"),
balance: bnify("4813414100000000"),
code: "0x"
},
// Splitter contract

@ -33,7 +33,7 @@
"scripts": {
"test": "exit 1"
},
"tarballHash": "0x6934f6ce2dcc6360227954303709404ba6d758881c139eeac5cad3b33efc1b36",
"tarballHash": "0xeda2af2bca9cb7626428bc674ba63e9a4a8f07b519d5a14325246d9745f3d765",
"types": "./lib/index.d.ts",
"version": "5.0.0-beta.150"
"version": "5.0.0-beta.151"
}

@ -1 +1 @@
export const version = "tests/5.0.0-beta.150";
export const version = "tests/5.0.0-beta.151";