All Questions

Filter by
Sorted by
Tagged with
2 votes
0 answers
112 views

Base Fee vs Gas Price EIP1559

With the new eip1559 on August 5, I was wondering whether we have to use BaseFee or GasPrice, many dexes like uniswap still specify a gasPrice (ex: 20 gwei) but what confuses me is that with the new ...
0 votes
0 answers
1k views

Fee on transfer causing error "Uniswap invariant not satisfied"

I am working on building an ERC20 token with the help of the OpenZeppelin project. I wanted to add a burn fee on transfer, so I overrode my transfer function as follows: function transfer(address _to, ...
16 votes
1 answer
4k views

Sending transactions after London Fork considering EIP 1559

I have an application that sends legacy transactions containing to, from, gasPrice, gasLimit, value and data properties. I know that following the London Fork there is backward compatibility with ...
1 vote
2 answers
1k views

Address to String solidity

I am using this code in converting address to string in solidity function toAsciiString(address x) public returns (string memory) { bytes memory s = new bytes(40); for (uint i = 0; i < 20; ...
1 vote
1 answer
455 views

Shadowing Inherited State Variables

I was editing and trying out the code from https://solidity-by-example.org/shadowing-inherited-state-variables and got the following output. pragma solidity >=0.8.0 <0.9.0; //SPDX-License-...
1 vote
0 answers
299 views

Uniswap (pair/liquidity) creation in contrat constructor. How is it possible?

Many of the new tokens create pair on Pancakeswap/Uniswap at the token constructor. I understand that the token constructor runs when the contract is created. constructor() public { ...
1 vote
2 answers
138 views

What are contract Variables and how are they different from normal varables declaration

pragma solidity ^0.4.2; import DappToken; contract DappTokenSale { address admin; DappToken public tokenContract; function DappTokeSale(DappToken _tokenContract) public { ...
0 votes
1 answer
43 views

Reactjs tutorial [closed]

I am following the following tutorial: Reactjs example When I run "npm start" as written in the tutorial, a window pops up and I am getting following error message: ./src/index.js Attempted ...
1 vote
1 answer
154 views

a uint storage variable can't be reset to 0

when test a contract i meet a confusing condition, so i tracked it by commented out per line, and distinguish it's a uint storage variable be reset to 0. To make it clear, i write a test contract like ...
0 votes
0 answers
25 views

Stack too deep, try removing local variables when using remix [duplicate]

while compiling in remix i get the above error: CompilerError: Stack too deep, try removing local variables. --> work/youkie.sol:1015:80: | 1015 | (uint256 rAmount, uint256 ...
0 votes
1 answer
217 views

TransferFrom function does not work even with approve

I'm trying to create a market contract using the token I created as the currency. The market works by placing asks and bids and then using transferFrom function to hold onto the tokens. However the ...
0 votes
1 answer
93 views

Says Transaction not executed but the funds still went through

Mac Ethereum wallet says "transaction not executed" but the funds still went through: https://ropsten.etherscan.io/tx/0x11ac91b6aac99eb02afe078b8786a9f1672929f65c73ee68e51b9e0ccc91036a But my ...
0 votes
2 answers
942 views

Alternatives to deploying smart contract with high gas fees?

I have a dApp contract that costs ~ 80 USD to deploy at 46 gwei. I just have 10 USD to do this. Is there any way I can do this in less? I don't mind deploying it to a network other than ETH Mainnet.
7 votes
2 answers
8k views

Aborting/resuming state snapshots all the time

I get this behaviour after updating to 1.10. Is this normal? - I mean, aborting & resuming "state snapshot generation" all the time. Please feel free to explain in more depth what's ...
13 votes
3 answers
31k views

How to connect to the Ropsten test-net using web3.js

I want to connect to the Ropsten test-net: // Is there is an injected web3 instance? if (typeof web3 !== 'undefined') { App.web3Provider = web3.currentProvider; web3 = new Web3(...
0 votes
0 answers
466 views

What is the requirement of bsc archive full node

I want to run a bsc archive node with aws ec2 with spot instance. What would be the disk space/cpu/ram requirement? Any tips on how to spend least amount of money?
2 votes
0 answers
443 views

Simple Contract to supply eth to aave

I'm trying programatically deposit using into Aave V2 Contract Aave's Code Examples // SPDX-License-Identifier: MIT pragma solidity >= 0.4.22 < 0.8.7; import { IERC20, ILendingPool, ...
1 vote
2 answers
502 views

How to automate sending Ethereum transactions while using Trezor to pre-sign them

I have a program running on a remote server which occasionally needs to send an Ethereum transaction. That transaction will need to be signed with my private key which I keep on a Trezor wallet on my ...
1 vote
2 answers
106 views

MEW says not a valid erc20 token but don't see errors

I created a token prior to this one that is fine. I used the same template, followed the same exact steps to create another token but getting the not valid erc20 error. https://ropsten.etherscan.io/...
1 vote
0 answers
282 views

listen "disconnect" click event (metamask wallet ui) with multiple accounts in metamask

I'm using metamask in my vue app. User flow is similar to this docs section. User has several accounts in wallet and the problem is when user clicking a "disconnect" button in metamask UI. ...
2 votes
2 answers
915 views

EcRecover signed message does not match PublicAddress

I am trying to create a C# webservice back end API that handles the code logic found in Step #5 here: https://www.toptal.com/ethereum/one-click-login-flows-a-metamask-tutorial Their code looks like ...
1 vote
0 answers
31 views

Why ethereum has multiple cli?

Bitcoin has just a single cli while ethereum has multiple cli. what is the need of multiple CLI ?
3 votes
2 answers
88 views

In Casper, what is the incentive to store the entire chain?

Do the validators need information from the blockchain to produce blocks, or is it enough just to store a few recent blocks? What is the incentive to use large amounts of storage to store the complete ...
0 votes
1 answer
109 views

can not find specific events and list events of the past the last 1day

I'm wrote this sample but I want to filter specific events 'unsealBid' and list events of the past (e.g. the last 1 or 2 days). const Web3 = require('web3'); const web3 = new Web3('https://mainnet....
0 votes
0 answers
41 views

I've been working on a smart contract but keep getting Parser Error expected identifier but got 'internal'

Pragma solidity >=0.6.6 contract Quapura is BEP20('Quapura', 'APUR') { /// @notice Creates `_amount` token to `_to`. Must only be called by the owner (QuapuraRouter). function mintTo(...
0 votes
1 answer
128 views

Are Transactions and Receipts 1-to-1?

Ethereum maintains an Transaction Trie and a Receipts Trie and I'm trying to visualize how that data would be contained in a relational database. I believe both Tries would have a primary key of ...
1 vote
1 answer
3k views

Transfer Token value is decimal when define decimals in smart contract?

I am new to ethereum block-chain. I create a ERC20 base smart contract. I set decimals values 18. When I call transfer function and pass the address and value parameters. So it's convert no.of token ...
0 votes
1 answer
203 views

Setting token price on a Dex [closed]

There are various opinions and parameters when it comes to the setting of a token price. What are the best practices when setting the token price on a Dex?
1 vote
1 answer
113 views

Truffle migrate ERC820Registry

I use Truffle and Ganache and I want to test some contracts that use the ERC820 Registry. I'm new to Truffle (and JavaScript in general) and I'm struggling to follow the instructions described in EIP-...
8 votes
2 answers
949 views

eth.gasPrice is returning less value than expected

As mentioned in documentation eth.gasPrice returns the current gas price. The gas price is determined by the x latest blocks median gas price. I was relying on this method to estimate current gas ...
2 votes
0 answers
79 views

What will happen to the current txs in the mempool post EIP-1559?

The London hardfork is estimated to go live in ~3 hours at the time of posting this question, which introduces a major change in the transaction pricing mechanism of Ethereum, EIP-1559. What will ...
1 vote
1 answer
220 views

Failed to extract secret from Hashicorp vault production mode - EthSigner - Hashicorp Vault

Working in hashicorp vault dev mode everything works fine but when I use a hashicor vault in production mode I am not able to connect ethsigner. However, i have been checkin if I can extract the ...
0 votes
1 answer
76 views

Why is it considered a good practice to generate private key from mnemonic words?

If I understand things correctly - we can use 12 mnemonic words to generate a private key. Having 2048 possible mnemonic words it means that there will be 2048^12 possible states. Private key is 256 ...
1 vote
1 answer
693 views

How to Parse the Data Returned by a Solidity Function

I have the following solidity code, to get the data that has been mapped to an address, function showOrg(address org) external view returns(uint identifier, string memory organization_name, bool ...
0 votes
1 answer
3k views

How to remove Fake token contact signed

I participated in multiple airdrops and recently checked the account on etherscan which was showing multiple Coins in my wallet... I approved one of them and got some sort of "sign" pop up ...
1 vote
1 answer
306 views

How to fix TypeError in a Solidity contract?

I am having issues with getting the contract below to compile. Here is the contract I am trying to compile in Remix IDE. The issue has been commented below <--- ISSUE IS HERE. // SPDX-License-...
0 votes
0 answers
172 views

Wallet with Tether and ERC20 networks

I am just starting my research in blockchain development, and after some time surfing in this website, I realized that it would be better if I ask my specific question by myself. I am trying to find ...
0 votes
1 answer
100 views

Ethereum - Can we expect a stable job opportunity?

I am not sure if this is a right place for this type of questions. I have done Java development and follow agile methodology. As you know we have sprints in which you would keep on releasing new ...
3 votes
2 answers
9k views

Is there a way to download Remix IDE locally and access it from the Terminal (Linux)?

Is there a way to download Remix IDE locally and access it from the Terminal (Linux)? Hi, I think I have read that it should be possible to download Remix IDE and use it offline. In the latest ...
0 votes
1 answer
283 views

Verify and Publish in BSC Scan not working

I have a contract, where I compiled it optimized in 200. When I go to publish in BSC Scan, it gives me some messages as attached. I'm informing in bsc scan the optimization in 200. It points out ...
0 votes
1 answer
65 views

Is it possible to link 2 public address to another one?

i've seen this in exchanges wallets. so if u transfer some coins to the address which is use for deposits even after it change, it would still link to your wallet. so i want to make a gateway for my ...
0 votes
0 answers
539 views

swapExactTokensForTokens "this should not happen"

I can't find any answer about this : I'm calling swapExactTokensForTokens and get this message : "this should not happen" I'm using NodeJs & ethers.utils. const Provider = new ethers....
0 votes
0 answers
642 views

Limit the gas consumption in the loops

Here's the situation. The contract has a function that iterates through the struct array, which can also contain arrays. That is, the function will contain a loop within a loop. I understand that if ...
2 votes
1 answer
262 views

How do Abstract classes help prevent reentrancy for multiple accounts?

I was reading through the openZeppelin contracts and saw the ReentrancyGuard contract, and realized I don't know how the EVM deals with these contracts. Assuming you have a class: contract someClass ...
1 vote
1 answer
93 views

Problems with Geth 1.8.19-stable

I am trying to add static peers by static-nodes.json file but with this version it does not work. What is the way to do it ? If I add peers with admin.addPeer() it works, but if I am using --syncmode ...
3 votes
0 answers
449 views

How to perform a gasless erc20 transfer from the backend?

I'm trying to use a relayer to handle my transactions. Initially, I was going for Infura Transactions. Then I saw GSN. And then OpenZeppelin Defender. All of them can help me send gasless transactions ...
3 votes
2 answers
2k views

What is best to use - Private Key or Mnemonic?

Is there a best practice for which one to use? Many tutorials online take various approaches - the older ones seems to use mnemonic whereas the newer ones tends to utilize private key. I understand ...
0 votes
1 answer
197 views

Geth node resyncs entire ledger after adding --rpc.gascap 0`

I have a fully synced mainnet full node running Geth 1.10.6, and when I try to add --rpc.gascap 0 into the startup command, it starts syncing from block 0, even though it has a fully synced ledger in ...
1 vote
1 answer
78 views

Question that relates to a smart contract, EVM, and mining in race condition

I have one question that relates to a smart contract, EVM, and mining. contract Test { event Transfer( address indexed _from, address indexed _to, uint256 _amount, uint256 _seq ); ...
1 vote
1 answer
101 views

How to track ether received from smartcontracts without internal transactions?

I want to track the ether received from smart contracts, in the case of uniswap we can track using withdraw function, but if the smart contract does not raise this event it's difficult to track the ...

15 30 50 per page
1
487 488
489
490 491
1074