Socket
Socket
Sign inDemoInstall

web3-eth-contract

Package Overview
Dependencies
Maintainers
4
Versions
452
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web3-eth-contract - npm Package Compare versions

Comparing version 4.3.1-dev.526c6f5.0 to 4.3.1-dev.5341c3a.0

7

lib/commonjs/contract.js

@@ -552,2 +552,3 @@ "use strict";

const methodSignature = (0, web3_eth_abi_1.encodeFunctionSignature)(methodName);
abi.methodNameWithInputs = methodName;
abi.signature = methodSignature;

@@ -641,5 +642,7 @@ // make constant and payable backwards compatible

}
else {
else if (applicableMethodAbi.length > 1) {
[methodAbi] = applicableMethodAbi; // take the first item in the array
// TODO: Should throw a new error with the list of methods found.
console.warn(`Multiple methods found that is compatible with the given inputs.\n\tFound ${applicableMethodAbi.length} compatible methods: ${JSON.stringify(applicableMethodAbi.map(m => `${m.methodNameWithInputs} (signature: ${m.signature})`))} \n\tThe first one will be used: ${methodAbi.methodNameWithInputs}`);
// TODO: 5.x Should throw a new error with the list of methods found.
// Related issue: https://github.com/web3/web3.js/issues/6923
// This is in order to provide an error message when there is more than one method found that fits the inputs.

@@ -646,0 +649,0 @@ // To do that, replace the pervious line of code with something like the following line:

@@ -549,2 +549,3 @@ /*

const methodSignature = encodeFunctionSignature(methodName);
abi.methodNameWithInputs = methodName;
abi.signature = methodSignature;

@@ -638,5 +639,7 @@ // make constant and payable backwards compatible

}
else {
else if (applicableMethodAbi.length > 1) {
[methodAbi] = applicableMethodAbi; // take the first item in the array
// TODO: Should throw a new error with the list of methods found.
console.warn(`Multiple methods found that is compatible with the given inputs.\n\tFound ${applicableMethodAbi.length} compatible methods: ${JSON.stringify(applicableMethodAbi.map(m => `${m.methodNameWithInputs} (signature: ${m.signature})`))} \n\tThe first one will be used: ${methodAbi.methodNameWithInputs}`);
// TODO: 5.x Should throw a new error with the list of methods found.
// Related issue: https://github.com/web3/web3.js/issues/6923
// This is in order to provide an error message when there is more than one method found that fits the inputs.

@@ -643,0 +646,0 @@ // To do that, replace the pervious line of code with something like the following line:

{
"name": "web3-eth-contract",
"version": "4.3.1-dev.526c6f5.0+526c6f5",
"version": "4.3.1-dev.5341c3a.0+5341c3a",
"description": "Web3 module to interact with Ethereum smart contracts.",

@@ -48,9 +48,9 @@ "main": "./lib/commonjs/index.js",

"dependencies": {
"web3-core": "4.3.3-dev.526c6f5.0+526c6f5",
"web3-errors": "1.1.5-dev.526c6f5.0+526c6f5",
"web3-eth": "4.5.1-dev.526c6f5.0+526c6f5",
"web3-eth-abi": "4.2.1-dev.526c6f5.0+526c6f5",
"web3-types": "1.5.1-dev.526c6f5.0+526c6f5",
"web3-utils": "4.2.3-dev.526c6f5.0+526c6f5",
"web3-validator": "2.0.6-dev.526c6f5.0+526c6f5"
"web3-core": "4.3.3-dev.5341c3a.0+5341c3a",
"web3-errors": "1.1.5-dev.5341c3a.0+5341c3a",
"web3-eth": "4.5.1-dev.5341c3a.0+5341c3a",
"web3-eth-abi": "4.2.1-dev.5341c3a.0+5341c3a",
"web3-types": "1.5.1-dev.5341c3a.0+5341c3a",
"web3-utils": "4.2.3-dev.5341c3a.0+5341c3a",
"web3-validator": "2.0.6-dev.5341c3a.0+5341c3a"
},

@@ -72,6 +72,6 @@ "devDependencies": {

"typescript": "^4.7.4",
"web3-eth-accounts": "4.1.2-dev.526c6f5.0+526c6f5",
"web3-providers-ws": "4.0.8-dev.526c6f5.0+526c6f5"
"web3-eth-accounts": "4.1.2-dev.5341c3a.0+5341c3a",
"web3-providers-ws": "4.0.8-dev.5341c3a.0+5341c3a"
},
"gitHead": "526c6f518f6a23438907b119aadbc868b06fbcd6"
"gitHead": "5341c3ab30aee24f678fc155d3e41483e3f5e68f"
}

@@ -991,2 +991,3 @@ /*

const methodSignature = encodeFunctionSignature(methodName);
abi.methodNameWithInputs = methodName;
abi.signature = methodSignature;

@@ -1108,5 +1109,20 @@

[methodAbi] = applicableMethodAbi; // take the first item that is the only item in the array
} else {
} else if (applicableMethodAbi.length > 1) {
[methodAbi] = applicableMethodAbi; // take the first item in the array
// TODO: Should throw a new error with the list of methods found.
console.warn(
`Multiple methods found that is compatible with the given inputs.\n\tFound ${
applicableMethodAbi.length
} compatible methods: ${JSON.stringify(
applicableMethodAbi.map(
m =>
`${(m as { methodNameWithInputs: string }).methodNameWithInputs} (signature: ${
(m as { signature: string }).signature
})`,
),
)} \n\tThe first one will be used: ${
(methodAbi as { methodNameWithInputs: string }).methodNameWithInputs
}`,
);
// TODO: 5.x Should throw a new error with the list of methods found.
// Related issue: https://github.com/web3/web3.js/issues/6923
// This is in order to provide an error message when there is more than one method found that fits the inputs.

@@ -1113,0 +1129,0 @@ // To do that, replace the pervious line of code with something like the following line:

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

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