New answers tagged

0 votes

How does the real Ether work in ERC20 protocol?

To clear things up there are multiple things to keep in mind: Ethers are just numerical values "baked in" Ethereum, which means that ETH is the fundamental 'money' unit in the protocol. ...
Josif Hamed's user avatar
0 votes

How does the real Ether work in ERC20 protocol?

An ERC20 token contract is just a measure of value, (in some cases) shares or power, and is not transformable to native Ether per se. There're no built-in purchase methods in the ERC20 token standard. ...
Mila A's user avatar
  • 738
0 votes

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
  • 738
0 votes

Can ERC-20 tokens be used in a smart contract?

Is the payment you are talking about the transaction fee payment? Generally the answer to your question is yes. However it's still ethereum that you need to run transactions on dApps.
CryptoDude's user avatar
1 vote

Can ERC-20 tokens be used in a smart contract?

Uniswap, Compound, Decentraland, all of them use ERC-20 tokens as a form of payment or for any other interaction.
Canard Coca's user avatar
0 votes

Can I use safeTransfer from OpenZeppelin to send ETH along with ERC20 token?

No, there's no safe way of doing this all-in-one-transaction, because either the transaction will fail (because most ERC20 methods are not payable), or the ether will be stuck in an ERC20's Proxy ...
Mila A's user avatar
  • 738
0 votes

ApproveUSDT function not working internally, how do I fix this?

You are trying to call approve function of token contract in another contract("Pre Sale"). This wont work because it will try to approve Pre Sale contract for Pre Sale contract.You are ...
Abdulhakim's user avatar
0 votes

Bridge of tokens to L2?

You can simply use any open permissionless bridge to move your tokens. Note that bridged tokens have their own smart contract code running on L2, not your code. whether such an idea is unnecessary in ...
Mikko Ohtamaa's user avatar
1 vote

Ethereum transactions: how decode already decoded input data?

Depending on the commands parameter the inputs parameter elements should be decoded in different way ( check the Dispatcher.sol contract ). For example the inputs in this specific transaction can be ...
Miroslav Nedelchev's user avatar
1 vote

How to scrape txn fee data from etherscan.io?

You can get this information from any Ethereum node for example using Python. No Etherscan needed for anything.
Mikko Ohtamaa's user avatar
0 votes

I have 1000 BUSD and some BNB stuck in an ERC-20 contract

To withdraw the tokens the contract has to use IERC20.transfer() or IERC20.approve() & IERC20.transerFrom(). Unfortunately there's no such type of interaction in the contract. To withdraw the BNB ...
Ismael's user avatar
  • 30.5k
0 votes
Accepted

Permit and transferFrom function called on an ERC20 which drained a specific token in my wallet

Maybe you signed the permit authorization information on the phishing website. This operation does not require you to pay gas fees to call the contract. The authorized person can use your signature ...
EthanOK's user avatar
  • 441

Top 50 recent answers are included