Skip to main content

All Questions

745 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1 vote
0 answers
44 views

Why two different source code generate same control flow graph in ethereum smart contract?

I analyzed control flow graph of two contracts written in solidity with different source code, one having vulnerability and other after resolving it. https://swcregistry.io/docs/SWC-107#modifier-...
Rue Lawliet's user avatar
1 vote
1 answer
78 views

I tried to make a function that does the same operation both in ERC20, ETH. But I don't know how to do modularize it considering payable

I wanted to do commit both on ERC20 Token and ETH. _addCommitment function is about update local commit value. It will be better if two functions that work the same function can be combined into one, ...
Pia's user avatar
  • 11
1 vote
1 answer
130 views

What is difference between ZK Rollups and Polygon?

ZK Rollups and Polygon mainnet are both layer 2 solution built for ethereum scaling solution. So what's the difference between these two solutions and which one to prefer?
Rishabh Raghwendra's user avatar
1 vote
0 answers
36 views

TypedData signature using Quorum Key Manager is failing/not verified

I am trying to create a TypedData transaction using OpenZeppelin Defender. I am using the OpenZeppelin MinimalForwarder to verify the authenticity of the signer. To create the signature, I am using ...
Subhadeep Karmakar's user avatar
1 vote
0 answers
150 views

Understanding Uniswap V2: removeLiquidityETHWithPermitSupportingFeeOnTransferTokens event log

I am new to Ethereum world and I'm trying to understand how liquidity pools work. While I understand the basic concept, I am having a hard time following this transaction: This is transaction log for ...
MojoJojo's user avatar
  • 111
1 vote
0 answers
433 views

How to get tx hash after tx was signed | Ethers js

When i run this code i get undefined logged in the console. const send = async () => { const params = { from: App.currentAccount, to: recipient, value: amount, data: ...
Chris's user avatar
  • 11
1 vote
2 answers
295 views

how does EVM track gas and interrupt the execution of a transaction?

As we know, the EVM will revert a transaction when out of gas. How it works? I guess the EVM put a check before executing EVERY instruction like this: accumulatedGas += gasOfLastInstruction; if ...
user861746's user avatar
1 vote
1 answer
113 views

Why burn ether?

I am trying to understand the below statements and also the intuition behind burning ether. Could you elaborate on the below statements from https://ethereum.org/en/developers/docs/intro-to-ether/. ...
Anand Kannan's user avatar
1 vote
0 answers
19 views

MetaMask Registering Contract Methods - Not Working

I was following these docs: https://docs.metamask.io/guide/registering-function-names.html#verify After verifying my contract and using the write section, my methods still aren't verified by MetaMask, ...
ozftm's user avatar
  • 33
1 vote
1 answer
90 views

ERROR: from solidity:ParserError: Expected identifier but got '('. Occurs whenever I add the line described below

I am working on creating a smart contract with a random mint function. The solidity compiler keeps spitting out the following error: from solidity:ParserError: Expected identifier but got '(', every ...
user107923's user avatar
1 vote
0 answers
11 views

Where the event logs bind to?

I have question regarding to how event log bind to an address Let said: Contract A which handle logic Contract B is erc20 token contract For the flow, Contract A call transfer token on Contract B So ...
Thanh Le's user avatar
1 vote
0 answers
144 views

Unable to perform transaction: Transaction has been reverted by the EVM: Not showing any clear message

Error display on Etherscan Fail with error 'ERC721: transfer from incorrect owner' I used the transaction hash and found the above error Error while trying to sell nft Data of the NFT, this function ...
Bharat Singh's user avatar
1 vote
1 answer
358 views

Why is there a public burn function in this Fantom Smart contract?

I was reviewing some of the smart contracts on Fantom and came across this function in ZOO: https://github.com/ZooEcosystem/ZooCoin/blob/main/contracts/ZOO.sol Whilst they have an internal burn ...
ozftm's user avatar
  • 33
1 vote
0 answers
277 views

Parameters that can be passed in curly braces for message call and delegate call

When I use "call" in solidity I am able to pass parameters in parenthesis and in curly braces. What is the full list of parameters I can pass in curly braces? What is the main difference ...
AGJoYy's user avatar
  • 447
1 vote
1 answer
677 views

How to cause a .call to revert in hardhat test

I am trying to cover all of my lines in my smart contract unit tests with hardhat, and I am not sure how to test the Raffle__TransferFailed() error. Is there some way to force this transaction to fail?...
Rohan Nero's user avatar
  • 1,725
1 vote
0 answers
126 views

Does Ethereum 2.0 support 100K TPS per shard or totally?

Hello recently i read that Ethereum 2.0 will handle 100K also i read that it will support 64 shards. Thus i think that the 100k TPS is an estimation for a total of 64 shards not 100k per shard because ...
Mixalis Navridis's user avatar
1 vote
2 answers
752 views

Is there any way to transfer ETH in a contract function just like transferFrom for ERC20 tokens?

I know that you can request an authorization and the transfer of ERC20 tokens from a contract user to another address with approval() and transferFrom(). But it here any equivalent to do the same for ...
Sebastien VAX's user avatar
1 vote
0 answers
159 views

geth error exceeds block gas limit"

im running a local geth node to increase transactions speeds for nfts minting however during a nft mint that had a contract set Gas limit to 250k there was gas wars and eth gwei went up to 500 gwei ...
user104887's user avatar
1 vote
0 answers
95 views

Can't full sync node

My node can't catch up actual block, it stays around 70-100 block to latest block. I installing node on Windows10. In logs what i see in geth.exe it show me what i am importing a latest block headers, ...
relict's user avatar
  • 11
1 vote
0 answers
164 views

How to create smart contract using openzeppelin metatx relayer to receive and withdraw usdt erc20 token using metamask?

Here is what I need to do, Create a smart contract that can use a relayer account from Openzeppelin defender and do the gasless meta transactions. Which I already created and sent some Ethereum too. ...
Abu Sayeed Mondal's user avatar
1 vote
2 answers
2k views

“Personal address detected. Import the collectible contract address” error while importing an NFT from Opensea

Let me share my problem in short here. So I did a course on Buildspace that was on Creating your first smart contract. On completing it, I got a Buildspace NFT from their side but I was not able to ...
littleironical's user avatar
1 vote
0 answers
60 views

How to differentiate 'normal transaction' values from 'internal transaction' values, avoiding duplicate values

I'm aggregating data from the Etherscan API and I'm trying to add all normal transactions and internal transactions together and then calculating the balance of ETH for a wallet based on the past ...
Rasmus Lian's user avatar
1 vote
0 answers
4k views

How to use Web3 with C++?

So this is less of a question about how to use web3 for C++ but rather where to start learning how to use and install Libraries for C++! Related: How to interact with contracts in C++ application? In ...
Chunky Panda's user avatar
1 vote
1 answer
642 views

I keep getting this error while trying to compile my contract trough the HardHat feature

Here is the script in my deploy.js: const main = async () => { // We get the contract to deploy const Transactions = await hre.ethers.getContractFactory("Transactions"); const ...
temitope's user avatar
1 vote
1 answer
97 views

Enumerate non-enumerated NFTs in web3.js

I want to call the ownerOf() function on all of the NFT's in a contract. If the address matches the website user address I want to add the tokenID to an array so I can eventually display all nft's ...
Jordan T's user avatar
1 vote
1 answer
126 views

What settings should a private PoA blockchain have to be free to use? ( No ether in use )

I am a total noob in creating blockchains, and I am trying to make one using geth with PoA. I want to make a PoA private blockchain where transactions and smart contracts ( usage and deployments ) are ...
MrFrenzoid's user avatar
1 vote
1 answer
53 views

How to send ether on Ethereum main net avoiding all middle men

Is there a way to send ether from my address to another address on ethereum main net without using any intermediary tools or services. That is, I don't want to use third party wallets or web sites or ...
Shanto Mathew's user avatar
1 vote
1 answer
952 views

Code to convert crypto wallet passphrase to 32 byte private key

What function in nodejs, or using the relevant crypto packages (web3, ethers, cryptojs, etc) can do this? For example, need a function within node that can turn something that looks like this: "...
user2330237's user avatar
1 vote
0 answers
239 views

Unable to clear pending transaction on current Nonce by increasing fees

I have a pending transaction from 1 week ago, I tried every step to clear it that I can find online. I know which nonce it is, and I doubled and tripled the gas limit and fees, but it still won't ...
stucknonce's user avatar
1 vote
0 answers
11 views

How are updates rolled out?

if an update to Ethereum or any other cryptocurrency is rolled out, how to ensure that everyone in the network is running the same 'version'. Especially if the update is not backward-compatible with ...
Nerox's user avatar
  • 11
1 vote
0 answers
617 views

how to add tax fees to transactions/transfers and Use fees toward liquidity

We have decided to launch a crypto token in support of new social streaming platform. And we would like to be able to add a tax fee that will be added to the liquidity of the token itself on pancake ...
Cyncrohnis's user avatar
1 vote
1 answer
138 views

Chain Link oracle : Fail with error 'First word must be requestId'

I just span up an oracle contract using "@chainlink/contracts/src/v0.7/Operator.sol"; I am using Operator.sol specifically for the fulfillRequest2 function since i need to return data in the ...
0xD1x0n's user avatar
  • 140
1 vote
1 answer
181 views

Chainlink Oracle : Fail with error 'Must have a valid requestId'

Facing a slight issue with my Oracle.sol that I deployed for my Naas node. whenever its fulfilling the request back to the contract, it throws this error. I deployed the contract using "@...
0xD1x0n's user avatar
  • 140
1 vote
2 answers
957 views

Sending entire ether balance to another wallet

I found the same question but it was asked over 4 years ago but it doesn't seem to work anymore? How do I send the entire ether balance from one account to another account? const Web3 = require('web3')...
Little Ball's user avatar
1 vote
0 answers
147 views

transaction got reverted after call deposit function of weth, very strange behavior

address private immutable owner; IWETH private constant WETH = IWETH(0x358AA13c52544ECCEF6B0ADD0f801012ADAD5eE3); receive() external payable { if (msg.value > 0) { WETH....
Lewis's user avatar
  • 111
1 vote
0 answers
287 views

admin.addpeers is not working on geth

This is the info i get when i run admin.addpeer on geth . i have used same genesis file on both aws instances, also rpcport and ports are different on both instances. the info is as follows: WARN [12-...
Jignasha Dalal's user avatar
1 vote
0 answers
12 views

What is Special Chakra NFT from Comics NFT

The Chakra NFT from comics is the trendsetter of recent days in the crypto space. The NFT lineups are making a huge difference here and to say in precise, Special chakra NFT of the crypto space will ...
Olivia Noah's user avatar
1 vote
1 answer
1k views

Sell Function on Pancakeswap with Ether Library on Node.js

I am trying to swap my busd tokens for bnb (wbnb) by using pancakeswap router v2 on testnet. Though I am having CALL_EXCEPTION. Before I dive into code, I have the same issue on bscscan. I don't know ...
starkm's user avatar
  • 111
1 vote
0 answers
197 views

Is it true that there are 2 wETH and do they differ in safety?

When miners mine on Ethermine, they can choose to get wETH, but it seems like it is wrapped on Polygon? It has the contract: 0x7ceb23fd6bc0add59e62ac25578270cff1b9f619 I think there is also a wETH ...
nonopolarity's user avatar
1 vote
0 answers
26 views

Unusual transaction activity on side chain

Hey everyone so I have a question that has me completely lost. I am developing for some software that interacts with an ethereum bridge chain. So the idea is to buy NFT's X blocks after it has been ...
W1ngBoy's user avatar
  • 11
1 vote
0 answers
58 views

What would the following code block do?

Recently I came across this code in solidity: fallback() external { (bool result,) = address(delegate).delegatecall(msg.data); if (result) { this; } } I know what happens till a ...
Vandan Rohatgi's user avatar
1 vote
0 answers
55 views

How to minimize iterations after deleting the elements in the array?

I have an array of struct, where I'm storing two uint variables. The user can keep adding values to the array and I'm simply deleting the elements/deposits which are withdrawn completely. The question ...
cyberhawk's user avatar
1 vote
0 answers
757 views

How to parse Ethereum transactions to extract all the details that we see on Etherscan?

Please consider this transaction: https://etherscan.io/tx/0x800391d2328e82e2cea40fd2cf2600f505baeefeb568e5bd5e75ebdeddcdd888 When I fetch this transaction using web3.eth.getTransaction, I get the ...
Haider's user avatar
  • 111
1 vote
0 answers
32 views

Why is Ethereum Uncle rate so low?

In Ethereum 1.0, the block creation time is only about 12-15 seconds. So, we may expect that there will be many uncles. But, practically, the uncle rate is very small. Why is the uncle rate is low?
Corentin's user avatar
1 vote
0 answers
32 views

Crowdsale contract problem

I want to do that if another token arrives on a contract, it can be taken out by the other token. function withdrawTeamSale() public { require(IBEP20(address(this)).transferFrom(msg.sender, ...
Grecz Balázs's user avatar
1 vote
0 answers
39 views

Sending required eth to a contract

I'm currently developing a NFT with a sort of marketplace. The NFT info is based on a struct containing it's price. In the marketplace I'm trying to implement a buy function that fetches the price ...
yieniggu's user avatar
  • 131
1 vote
1 answer
368 views

How haven't flash loans completly destabilized the ethereum blockchain?

Now bare with me here, I might have kinda misunderstood what a flashloan actually is. Internet tells me that it's a type of uncollaterized lending, where a smart contract takes money out of a pool, ...
as-Sirat's user avatar
1 vote
0 answers
128 views

Funding the Polygon Chain Without Gas Fees

From what I hear, the big value point of the Polygon chain is that it has low gas fees. As far as I can tell, the only way to fund a wallet on the Polygon chain is by converting Ether into Polygon ...
Ben Pearce's user avatar
1 vote
1 answer
248 views

Automatic conversion from token to stable coin

I have an idea for a smart contract where 0.05% of each transaction would be converted to a stable coin from within the smart contract and sent to a separate account. I was planning on having DAI be ...
GoodGooglyMoogli's user avatar
1 vote
1 answer
1k views

Review contract function response by block number

I am looking way to create a report on how specific function responses change block by block. Something like: const responses = [] for(let i = 0; i < blockNumberList.length; i++){ ...
Edgaras Karka's user avatar

1 2 3
4
5
15