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

@ethersproject/contracts

Package Overview
Dependencies
Maintainers
1
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ethersproject/contracts - npm Package Compare versions

Comparing version 5.0.0-beta.150 to 5.0.0-beta.151

2

lib.esm/_version.d.ts

@@ -1,1 +0,1 @@

export declare const version = "contracts/5.0.0-beta.150";
export declare const version = "contracts/5.0.0-beta.151";

@@ -1,1 +0,1 @@

export const version = "contracts/5.0.0-beta.150";
export const version = "contracts/5.0.0-beta.151";

@@ -392,40 +392,62 @@ "use strict";

}
const uniqueFunctions = {};
Object.keys(this.interface.functions).forEach((name) => {
const fragment = this.interface.functions[name];
const uniqueNames = {};
const uniqueSignatures = {};
Object.keys(this.interface.functions).forEach((signature) => {
const fragment = this.interface.functions[signature];
// Check that the signature is unique; if not the ABI generation has
// not been cleaned or may be incorrectly generated
if (uniqueSignatures[signature]) {
logger.warn(`Duplicate ABI entry for ${JSON.stringify(name)}`);
return;
}
uniqueSignatures[signature] = true;
// Track unique names; we only expose bare named functions if they
// are ambiguous
{
const name = fragment.name;
if (!uniqueNames[name]) {
uniqueNames[name] = [];
}
uniqueNames[name].push(signature);
}
// @TODO: This should take in fragment
const run = runMethod(this, name, {});
if (this[name] == null) {
defineReadOnly(this, name, run);
const run = runMethod(this, signature, {});
if (this[signature] == null) {
defineReadOnly(this, signature, run);
}
if (this.functions[name] == null) {
defineReadOnly(this.functions, name, run);
if (this.functions[signature] == null) {
defineReadOnly(this.functions, signature, run);
}
if (this.callStatic[name] == null) {
defineReadOnly(this.callStatic, name, runMethod(this, name, { callStatic: true }));
if (this.callStatic[signature] == null) {
defineReadOnly(this.callStatic, signature, runMethod(this, signature, { callStatic: true }));
}
if (this.populateTransaction[name] == null) {
defineReadOnly(this.populateTransaction, name, runMethod(this, name, { transaction: true }));
if (this.populateTransaction[signature] == null) {
defineReadOnly(this.populateTransaction, signature, runMethod(this, signature, { transaction: true }));
}
if (this.estimateGas[name] == null) {
defineReadOnly(this.estimateGas, name, runMethod(this, name, { estimate: true }));
if (this.estimateGas[signature] == null) {
defineReadOnly(this.estimateGas, signature, runMethod(this, signature, { estimate: true }));
}
if (!uniqueFunctions[fragment.name]) {
uniqueFunctions[fragment.name] = [];
}
uniqueFunctions[fragment.name].push(name);
});
Object.keys(uniqueFunctions).forEach((name) => {
const signatures = uniqueFunctions[name];
Object.keys(uniqueNames).forEach((name) => {
// Ambiguous names to not get attached as bare names
const signatures = uniqueNames[name];
if (signatures.length > 1) {
logger.warn(`Duplicate definition of ${name} (${signatures.join(", ")})`);
return;
}
const signature = signatures[0];
if (this[name] == null) {
defineReadOnly(this, name, this[signatures[0]]);
defineReadOnly(this, name, this[signature]);
}
defineReadOnly(this.functions, name, this.functions[signatures[0]]);
defineReadOnly(this.callStatic, name, this.callStatic[signatures[0]]);
defineReadOnly(this.populateTransaction, name, this.populateTransaction[signatures[0]]);
defineReadOnly(this.estimateGas, name, this.estimateGas[signatures[0]]);
if (this.functions[name] == null) {
defineReadOnly(this.functions, name, this.functions[signature]);
}
if (this.callStatic[name] == null) {
defineReadOnly(this.callStatic, name, this.callStatic[signature]);
}
if (this.populateTransaction[name] == null) {
defineReadOnly(this.populateTransaction, name, this.populateTransaction[signature]);
}
if (this.estimateGas[name] == null) {
defineReadOnly(this.estimateGas, name, this.estimateGas[signature]);
}
});

@@ -432,0 +454,0 @@ }

@@ -1,1 +0,1 @@

export declare const version = "contracts/5.0.0-beta.150";
export declare const version = "contracts/5.0.0-beta.151";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = "contracts/5.0.0-beta.150";
exports.version = "contracts/5.0.0-beta.151";

@@ -464,40 +464,62 @@ "use strict";

}
var uniqueFunctions = {};
Object.keys(this.interface.functions).forEach(function (name) {
var fragment = _this.interface.functions[name];
var uniqueNames = {};
var uniqueSignatures = {};
Object.keys(this.interface.functions).forEach(function (signature) {
var fragment = _this.interface.functions[signature];
// Check that the signature is unique; if not the ABI generation has
// not been cleaned or may be incorrectly generated
if (uniqueSignatures[signature]) {
logger.warn("Duplicate ABI entry for " + JSON.stringify(name));
return;
}
uniqueSignatures[signature] = true;
// Track unique names; we only expose bare named functions if they
// are ambiguous
{
var name_1 = fragment.name;
if (!uniqueNames[name_1]) {
uniqueNames[name_1] = [];
}
uniqueNames[name_1].push(signature);
}
// @TODO: This should take in fragment
var run = runMethod(_this, name, {});
if (_this[name] == null) {
properties_1.defineReadOnly(_this, name, run);
var run = runMethod(_this, signature, {});
if (_this[signature] == null) {
properties_1.defineReadOnly(_this, signature, run);
}
if (_this.functions[name] == null) {
properties_1.defineReadOnly(_this.functions, name, run);
if (_this.functions[signature] == null) {
properties_1.defineReadOnly(_this.functions, signature, run);
}
if (_this.callStatic[name] == null) {
properties_1.defineReadOnly(_this.callStatic, name, runMethod(_this, name, { callStatic: true }));
if (_this.callStatic[signature] == null) {
properties_1.defineReadOnly(_this.callStatic, signature, runMethod(_this, signature, { callStatic: true }));
}
if (_this.populateTransaction[name] == null) {
properties_1.defineReadOnly(_this.populateTransaction, name, runMethod(_this, name, { transaction: true }));
if (_this.populateTransaction[signature] == null) {
properties_1.defineReadOnly(_this.populateTransaction, signature, runMethod(_this, signature, { transaction: true }));
}
if (_this.estimateGas[name] == null) {
properties_1.defineReadOnly(_this.estimateGas, name, runMethod(_this, name, { estimate: true }));
if (_this.estimateGas[signature] == null) {
properties_1.defineReadOnly(_this.estimateGas, signature, runMethod(_this, signature, { estimate: true }));
}
if (!uniqueFunctions[fragment.name]) {
uniqueFunctions[fragment.name] = [];
}
uniqueFunctions[fragment.name].push(name);
});
Object.keys(uniqueFunctions).forEach(function (name) {
var signatures = uniqueFunctions[name];
Object.keys(uniqueNames).forEach(function (name) {
// Ambiguous names to not get attached as bare names
var signatures = uniqueNames[name];
if (signatures.length > 1) {
logger.warn("Duplicate definition of " + name + " (" + signatures.join(", ") + ")");
return;
}
var signature = signatures[0];
if (_this[name] == null) {
properties_1.defineReadOnly(_this, name, _this[signatures[0]]);
properties_1.defineReadOnly(_this, name, _this[signature]);
}
properties_1.defineReadOnly(_this.functions, name, _this.functions[signatures[0]]);
properties_1.defineReadOnly(_this.callStatic, name, _this.callStatic[signatures[0]]);
properties_1.defineReadOnly(_this.populateTransaction, name, _this.populateTransaction[signatures[0]]);
properties_1.defineReadOnly(_this.estimateGas, name, _this.estimateGas[signatures[0]]);
if (_this.functions[name] == null) {
properties_1.defineReadOnly(_this.functions, name, _this.functions[signature]);
}
if (_this.callStatic[name] == null) {
properties_1.defineReadOnly(_this.callStatic, name, _this.callStatic[signature]);
}
if (_this.populateTransaction[name] == null) {
properties_1.defineReadOnly(_this.populateTransaction, name, _this.populateTransaction[signature]);
}
if (_this.estimateGas[name] == null) {
properties_1.defineReadOnly(_this.estimateGas, name, _this.estimateGas[signature]);
}
});

@@ -504,0 +526,0 @@ }

@@ -35,5 +35,5 @@ {

},
"tarballHash": "0x5030e873ef0ebc78913b3a1344a86cd92873b60418a342048ad165f751c342e5",
"tarballHash": "0x918c40fdb8ee8be8cc4d0094b6b936fb8a35203af97b33f227fb80d30b337f5e",
"types": "./lib/index.d.ts",
"version": "5.0.0-beta.150"
"version": "5.0.0-beta.151"
}
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