This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Description
Is there an existing issue for this?
Current Behavior
If we have a contract with overloaded methods, the types does not support those.
contract FuncOverload {
address owner;
constructor() public {
owner = msg.sender;
}
function transfer(address _to, uint _amount) public returns (bool) {
return doTransfer(_to, _amount);
}
function transfer(address _to) public returns (bool) {
return doTransfer(_to, 1 ether);
}
}
Expected Behavior
The type should detect and throw error on compile time, if user pass different number of arguments for overloaded functions.
Steps to Reproduce
await myContract.methods.transer(address).send();
await myContract.methods.transer(address, 10000).send();
Web3.js Version
4.x
Environment
- Operating System:
- Browser:
- Node.js Version:
- NPM Version:
Anything Else?
In alpha release of 4.x the the behavior exists but the types does not support. For now use as any to bypass this check.