CRYPTO NEWS

Private variables with public view functions

In the Openzeppelin ERC721.sol contract, there are private variables introduced:

// Token name string private _name;  // Token symbol string private _symbol; 

These variables are then assigned a public view functions to display their content:

 /**  * @dev See {IERC721Metadata-name}.  */ function name() public view virtual override returns (string memory) {     return _name; }  /**  * @dev See {IERC721Metadata-symbol}.  */ function symbol() public view virtual override returns (string memory) {     return _symbol; } 

Why are these private instead of public? Nobody can change the values in either of the cases, as mentioned here.

Mani Marley

#Mani Marley #TheSupremeTeam Artist Name: Mani Marley Who are you? We’ll I’ve been rapping for 10 years plus so I mastered how to record a song an also engineer it so I’m versatile dedicated music artist who can have diff types of sounds every song Where are you from? Brooklyn ,NYC it’s mostly drill laud::Listen

#Mani Marley #TheSupremeTeam
Artist Name: Mani Marley

Who are you?

We’ll I’ve been rapping for 10 years plus so I mastered how to record a song an also engineer it so I’m versatile dedicated music artist who can have diff types of sounds every song

Where are you from?

Brooklyn ,NYC it’s mostly drill laud but I have my own unique sounds that’s isn’t like anybody else’s.

How can we follow you?

Song Title: Back 2 Back

Listen to Mani Marley:

Source: https://supremepr.us/

Private variables with public view functions

Shopping cart
There are no products in the cart!
Continue shopping
0