New answers tagged

0

Is it a contract that has functions that require a fee in token to get executed? if yes and the contract is deployed, send an amount the token to the contract address. This should solve your issue.


0

assuming your token is tradeable on pancakeswap you can get your token price interacting with the corresponding pancakePair contract.


0

From BEP20 documentation What is BEP20? A token protocol on BSC which is compatible with BEP2 and ERC20. It extends ERC20 and contains more interfaces, such as getOwner and decimals. BEP-20 compliant doesn't require any support for Pancakeswap.


0

Let's start with your last set of questions. Typically Metamask is used with some website - you go to the website and it asks you to connect Metamask. Therefore it's uses the Metamask from that browser. If you need to open Metamask from outside a website (unsure if that's even possible), it'd probably use your default browser's Metamask. To sign transactions ...


2

No, you can't make it with just smart contracts. Contracts are deterministic, which means they can't access outside resources directly. You will need some sort of off-chain functionality, which acts as the bridge. So you need contracts at both ends of the bridge and the actual bridge which listens to events in the contracts to call the other end of the ...


0

I have been analyzing the code of other tokens in production that use the call to "swapExactTokensForETHSupportingFeeOnTransferTokens" during a transaction. I have found a pattern, all tokens only use this call in sells, that is, when the contract token is "sold" for BNB. I have verified that this problem does not occur in sells. ...


1

A minimal example showing how to integrate 1inch in your smart contract using Brownie https://github.com/smye/1inch-swap this may help you


1

It depends on how Ownership is implemented in these contract. If using OpenZeppelin Ownable approach then this would not work. There, ownership is stored as a single address (which for contract A would be contract B's address) and then restricted functions check to ensure the caller's address is equal to the owner's address, otherwise revert. Thus, if ...


0

You can add a function to B for calling C and transferownershipping. But be careful, you have to use msg.sender for checking the message owner instead of tx.origin


1

From Etherscan API docs: Every block explorer built by Etherscan ( eg. BscScan, PolygonScan, HecoInfo ) requires a different account to be created and hence a different set of API keys Apparently you'll need to create a new API key for BSC. A good tip to keep in mind would be to always leverage the search function in any docs website. Update: The issue is ...


0

maybe try this? It looks like you have the same problem thats described here https://forum.openzeppelin.com/t/how-to-verify-tiki-forks-on-etherscan-bscscan/12599


0

You can check block number in web3 with this code: web3.eth.getBlockNumber() and check it in a specific period. If it is equal to 10509735, then do something. But you have to pay more gas then average to get in that block.


0

You can prevent from transferring tokens to any address (which would stop buying, selling and transferring to contracts/EOAs) by doing something like this bool isPaused = 0 function pauseOrUnPause(bool _isPaused) { isPaused = _isPaused; } then adding require(!isPaused) in your _transfer (the internal one that is called by transfer and transferFrom) ...


0

There is no message in transaction status. It is Etherescan-specific only. Etherescan will show revert string if the contract was compiled with revert strings using solc option --revert-strings, this string will be returned by the contract upon failure, as return value. After Byzantium fork, the Status field was introduced and it returns 0 if transaction ...


0

swapExactTokensForETHSupportingFeeOnTransferTokens is used to sell fee on transfer tokens (e.g. Safemoon) for BNB (on the BSC of course). Its counterpart (swapExactETHForTokensSupportingFeeOnTransferTokens) is probably what you're looking for if you're trying to buy that kind of tokens with BNB (it also works with "normal" tokens but costs more gas ...


0

The contract is running out of gas. The line where the error is show: Operation Gas GasCost ---------------------------- EXTCODESIZE 44 700 The available gas at that point is 44, and EXTCODESIZE requires 700.


Top 50 recent answers are included