ethereum / remix-project

Remix is a browser-based compiler and IDE that enables users to build Ethereum contracts with Solidity language and to debug transactions.
https://remix-ide.readthedocs.io
MIT License
2.42k stars 925 forks source link

Tokens transfered to metamask #5212

Closed fullForced closed 2 days ago

fullForced commented 1 week ago

Describe the bug I deployed the cotract 0x3C703c87B6329a727853a4B27b4c1BF250c10201 (FunToken) where 2 transfers were made at the time and block to the same wallet,. the contract says 4.8% would the transfered to the dev and 95,2% to the creator, but the creator and the dev are the same wallet. 2 transfers were made as expected, the bscscan recognize and shows the transfers, but in the wallet apperas just 95,2% of the total supply, the second transfer 4,8% did not get in the wallet.

Screenshots resumobscfun resumobscfun

I went to the metamask chat support and they asked me to contact the plataform where I have deployed the smart contract to see what happened.

Expected behavior I expected to get the both transfers in the same wallet, and get 100% of the total supply.

Desktop (please complete the following information):

Additional context none

Aniket-Engg commented 5 days ago

@fullForced It is difficult to analyse anything with that info. Can you verify your contract to explorer?

Aniket-Engg commented 5 days ago

Hello @fullForced , FYI Darrell is not part for Remix Support Team and not connected to Remix in any manner. That's why the comment was deleted. There is no support tickets for Remix Project.

fullForced commented 5 days ago

Bad jerks, thanks Anyket, in that support they were asking me to sync my acc with them or share the sercrets.... the return law never fails.. thank you.

Em seg., 23 de set. de 2024 06:21, Aniket @.***> escreveu:

Hello @fullForced https://github.com/fullForced , FYI Darrell is not part for Remix Support Team and not connected to Remix in any manner. That's why the comment was deleted. There is no support tickets for Remix Project.

— Reply to this email directly, view it on GitHub https://github.com/ethereum/remix-project/issues/5212#issuecomment-2367658315, or unsubscribe https://github.com/notifications/unsubscribe-auth/BJKFVHXFEXULTXVWNPWYXYTZX7MSFAVCNFSM6AAAAABOTU27PKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNRXGY2TQMZRGU . You are receiving this because you were mentioned.Message ID: @.***>

fullForced commented 4 days ago

@fullForced It is difficult to analyse anything with that info. Can you verify your contract to explorer? Hi @Aniket-Engg, I am trying to verify and publish my smart contract on the blockchain explorer (BscScan), but I am encountering an error during the compilation process, which prevents the contract from being verified. The error message is as follows:

ParserError: Source "@openzeppelin/contracts/security/ReentrancyGuard.sol" not found: File import callback not supported
 --> myc:4:1:
   |
4 | import "@openzeppelin/contracts/security/ReentrancyGuard.sol"
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It seems that the explorer is unable to handle the external import of OpenZeppelin's ReentrancyGuard.sol. I have tried different solutions, including modifying the contract, but the issue persists, and the contract cannot be verified. BUT I have attached the smart contrat compiled and deployed at remix, for your consideration. FunToken.txt

Any help or suggestions on how to resolve this issue would be greatly appreciated. Thank you!

Aniket-Engg commented 2 days ago

@fullForced In your code, you have written:

       balanceOf[developer] = developerTokens;
        emit Transfer(address(0), developer, developerTokens);

        // Tokens restantes para o proprietário (criador)
        uint256 creatorTokens = totalSupply - developerTokens;
        balanceOf[owner] = creatorTokens;

With balanceOf[owner] = creatorTokens; , you replace any token values already assigned to owner. For your case, it can better be balanceOf[owner] = balanceOf[owner] + creatorTokens;

This is an issue with your contract code and not related to Remix IDE, so closing this.