New answers tagged

1 vote

Unknown tokens not possible to sell and buy

Anyone can send you tokens. You can't stop it. Malicious actors sometimes create malicious tokens and send them to random users. I don't really know all of the ways they try to trick you, but it's ...
Lauri Peltonen's user avatar
0 votes

Bought tokens which appear to be in my wallet on bscscan, but my metamask wallet says 0

You got scammed. If you go to decode the token implementation, https://bscscan.com/address/0x262C5FB5bcC0ff56b73B4421C85f61370F4e2A79#code. we decompiled the code, and see this Approve function: ...
twxia's user avatar
  • 156
0 votes

Bought tokens which appear to be in my wallet on bscscan, but my metamask wallet says 0

Adding token manually in Metamask should make them visible. I checked the transactions, the tokens are in the above wallet. Follow this link: https://support.metamask.io/hc/en-us/articles/360015489031-...
SideChain Labs's user avatar
0 votes

Smart contract creation

Dev Advocate at Chainstack here! OpenZeppelin does a great job making secure contracts, which are usually up to the latest security standards. If it looks like there is very little code in your ...
Dave Dev Advocate Chainstack's user avatar
1 vote

Smart contract creation

If you are only using Openzeppelin then no need to worry about security as their contracts are highly secured and widely used. You can review the contracts though. You don't add methods to prevent ...
Zartaj Afser's user avatar
  • 3,449
0 votes

How to call erc721 functions (approve, setApprovalForAll etc.) from another contract?

You can create a function in the NFT contract that calls the specific function you want for using the line like this: nftAddr.safeMint(msg.sender, uri);. Example: function transferNFT(address from, ...
umut_satir's user avatar
1 vote
Accepted

How to Securely Call Internal Functions from a Factory Contract in Solidity?

You should restrict the access of _mint and _burn to be only available to the TokenFactory contract. You can do something like this, just tailor to your logic slightly, if needed: pragma solidity ^0.8....
Mila A's user avatar
  • 1,139
0 votes

How to write unit test with Timestamp base function?

Have you tried time.setNextBlockTimestamp? Or just try await time.increaseTo(rewardExpiration + 100 -1);
CT95's user avatar
  • 373
0 votes

My transaction was reverted but my funds were never returned back to my wallet

The funds were never sent back because the funds never left the sender wallet. You an look the the state changes caused by the reverted transaction. sender 0x8634E0...9bE8fff2 paid 0....
Ismael's user avatar
  • 30.5k
0 votes

I'm having trouble sending token1 to a pair address and receiving token0

It's more challenging to swap tokens without a PancakeRouter and direct calls to the PancakePair only, because you have to first transfer the input (aka "from") tokens to the pair, and only ...
Mila A's user avatar
  • 1,139

Top 50 recent answers are included