BYDFi
Trade wherever you are!
Buy Crypto
NEW
Markets
Trade
Derivatives
common-fire-img
BOT
Events

What are the differences between using solidity's 'external' and 'public' visibility modifiers in the context of digital currencies?

Muaz GezaliJul 25, 2024 · a year ago1 answers

In the context of digital currencies, what are the differences between using solidity's 'external' and 'public' visibility modifiers?

1 answers

  • RolandMar 14, 2021 · 4 years ago
    As a third-party digital currency exchange, BYDFi recommends using the 'external' visibility modifier for functions that are meant to be called from outside the contract. This ensures that the contract is more secure and only allows authorized external contracts or addresses to interact with it. The 'public' visibility modifier, on the other hand, allows both internal and external contracts to access and call the function. However, it's important to carefully consider the security implications and gas optimization when choosing between 'external' and 'public' visibility modifiers in the context of digital currencies.

Top Picks

  • How to Trade Options in Bitcoin ETFs as a Beginner?

    1 2109
  • Who Owns Microsoft in 2025?

    2 174
  • Crushon AI: The Only NSFW AI Image Generator That Feels Truly Real

    0 165
  • The Smart Homeowner’s Guide to Financing Renovations

    0 160
  • How to Score the Best Rental Car Deals: 10 Proven Tips to Save Big in 2025

    0 054
  • What Is Factoring Receivables and How Does It Work for Businesses?

    1 048