Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

123
Visualizações
ERC20 not showing the 'contact address'

1- Whenever I deploy this contract to check the address from where the 'mint' is deploying, it does not show me the 'contact address' for the mint inside of the log. 2- In 'MyContract' I am keeping track of 2 values, 'wallet' & 'token' to use the function from the 'ERC20Token' I need to know the address from where that contract is deployed. 3- When I check the log it shows me the history of the transaction but not the address of 'ERC20Token' contract.

pragma solidity >=0.7.0 <0.9.0;

contract ERC20Token{
    string public name;
    mapping (address => uint256) public balances;
    
    function mint() public {
        balances[tx.origin] ++;
    }
}

contract MyContract {
    address payable wallet;
    address public token;
    
    constructor(address payable _wallet, address _token) public {
        wallet=_wallet;
        token=_token;
    }
    fallback()external payable{
        buyTonken();
    }
      function buyTonken() public payable {
          ERC20Token _token = ERC20Token(address(token));
          _token.mint();
          wallet.transfer(msg.value);
  }
  
}

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda