• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Evaluaciones
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

186
Vistas
How do I make imported ERC20 Token functions private?

I'm designing a token to fit the ERC20 standard in Remix, and I'd like to make all the default functions that come with importing the ERC20 interface private. Is there any way to do this? Here's a screenshot of the functions I'm talking about once you deploy using Injected Web3, and also the list of imports we're using Imports Example of functions I'm trying to hide

about 3 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

You can not change the visibility of an inherited function. Depending on the inherited contract, however, you can override it to be pointless.

You can do it in with openzeppelin's ERC20 too. All ERC20 public functions are virtual. So with a little workaround like this:

 function transfer(address to, uint256 amount) public virtual override returns (bool) {
        return false;
    }

Your exposed transfer function is now pointless.

about 3 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda