Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
typos tips_and_tricks.md
  • Loading branch information
cypherpepe authored Nov 19, 2024
commit dc8c77d2cbafcb209127650c06226711f7ad7a1e
4 changes: 2 additions & 2 deletions 4 docs/docs/guides/05_smart_contracts/tips_and_tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ The Solidity code:

pragma solidity >=0.8.20 <0.9.0;

contract TestOverlading {
contract TestOverloading {
function funcWithParamsOverloading(uint256 userId) public pure returns (string memory) {
return "called for the parameter with the type 'uint256'";
}
Expand Down Expand Up @@ -138,6 +138,6 @@ Multiple methods found that are compatible with the given inputs. Found 2 compat

Future releases of web3.js, specifically version 5.x, will replace the warning with an error whenever multiple methods match a call without explicit overloading. This aims to foster greater precision in method invocation.

### Key Takeaway for function overlading: Method Specification
### Key Takeaway for function overloading: Method Specification

When working with overloaded smart contract methods, it's imperative to specify the intended method by appending its parameter types within parentheses, such as `funcWithParamsOverloading(address)` versus `funcWithParamsOverloading(uint256)`. This ensures the accuracy of method invocation, leading to more efficient and clearer contract interactions.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.