Skip to main content

All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
40 views

Strange 0 ETH transactions that don't go to contracts with structured message

I was researching EOA->EOA transactions that took more than 21k gas when I found multiple transactions that don't transfer any ETH value nor do they call a contract but have a not null data field. ...
David Davó's user avatar
1 vote
1 answer
56 views

Redundant byte offset requirement in the Contract ABI Specification?

I've had the pleasure of finding out that, contrary to what I've been used to in the other byte-transferring/-interpretation systems (e.g. the C/C++ languages, the communication protocols, etc.), ...
Iaroslav's user avatar
  • 410
7 votes
2 answers
561 views

How transaction fee is calculated in case of L2?

In case of L1, the transaction fee is typically calculated as the product of gas price and gas usage, i.e., txFee = gasPrice * gasUsage One such example can be seen in this transaction. In which the ...
SYED ASAD KAZMI's user avatar
0 votes
1 answer
89 views

Transaction Hijacking?

So I created a wallet and sent it some funds then I submitted a few invalid transactions. I approved the correct address for transferring wrapped eth. After the approval my script immediately sent the ...
Samuel Wagner's user avatar
1 vote
1 answer
219 views

Wrapping ETH into WETH via ethers -- WETH coins on my balance won't appear

I'm attempting to wrap ETH on Goerli into WETH by calling deposit function using ethers. Even though several TX already have been confirmed and successfully mined, nothing will appear on my WETH ...
Camila326's user avatar
  • 115
1 vote
2 answers
2k views

Can you fetch the whole transaction history of specific contracts somewhere?

I know you can validate the data of specific tx hashes using web3js or the etherscan api. But is there a service which allows to query all transactions performed by or connected to a specific smart ...
rajohs's user avatar
  • 195
0 votes
1 answer
63 views

Do i need to fund my contracts with eth

I have a protocol composed of multiple contracts which interact with each other, when a user call a transaction in one of the contracts, the contract calls other contracts functions . The question is :...
noro meb's user avatar
  • 368
0 votes
0 answers
110 views

why cant smart contract receive ether like externally owned account without a receive/fallback function?

why do smart contracts requires a receive function to accept ether? what prevents the smart contract from receiving ether like an externally owned account(EOA) directly without any functions? What was ...
Bobby Sebastian's user avatar
0 votes
0 answers
26 views

Does transferring funds from a contract to an unclaimed address create a new account?

I sent funds to some addresses via a proxy contract and later couldn't find those addresses on a block explorer. Sending directly from metamask to one of those addresses did reveal the address on the ...
kuco 23's user avatar
  • 308
0 votes
1 answer
35 views

How does a single getter call get chosen by a node if there's no reward associated?

A tx uses gas to incentivize being picked up by a node. On the other hand, a getter doesn't. It just returns the value. How does a single getter call get chosen by a node if there's no reward ...
fseitun's user avatar
  • 21
0 votes
1 answer
296 views

What role does ABI-encoding play in digital signature?

I have two questions regarding the ABI. 1. When does it happen? A digital signature is made by creating a transaction data structure, RLP-encoded serializing the data, hashing it through keccak-256, ...
Kevvv's user avatar
  • 797
1 vote
1 answer
38 views

How to know contract functionality given only bytcode and address

Let's assume that we only have access to the address and bytecode of a smart contract (pure decentralization, no 3rd party tools such as etherscan etc). How can we understand or deduce what the ...
bioround's user avatar
  • 113
0 votes
1 answer
60 views

Is a transaction between 2 contracts possible if the tx origin is one of those contracts?

In other words, can a contract initiate a transaction by itself, without someone activating it's code? An example would be if a contract can do that when times eg. reaches a specific point.
Giorgos Zazanis's user avatar
1 vote
1 answer
599 views

The longer a smart contract interaction's code is, the higher the gas?

It seems that different contract interactions cost different amounts of gas. For example, minting an NFT costs much more gas than the action of transferring some ether to another wallet. Are these gas ...
user610620's user avatar
  • 1,568
0 votes
1 answer
342 views

How do smart contract transfer funds if they do not have private keys?

I am reading a book on ethereum and I saw this: Only externally owned accounts have a corresponding private key. Private keys are used for signing new transactions sent to the network as a means of ...
Finlay Weber's user avatar
1 vote
1 answer
1k views

Having trouble figuring out EIP-1599 params for contract transaction in ethers.js

I am following contracts documentation at https://docs.ethers.io/v5/api/contract/contract/#contract-functionsSend And got to the point where my contract call looks something like this (someMethod and ...
Ilja's user avatar
  • 436
5 votes
2 answers
4k views

How can I get the hexadecimal equivalent for a method name in an Ethereum contract using Python?

The function to call is called xyz(). My code: web3.sha3("xyz()").substr(0,10) Error: AttributeError: module 'web3' has no attribute 'sha3' In newer versions of web3, the above error ...
aste123's user avatar
  • 243
0 votes
2 answers
677 views

Why is transaction reverting with custom smart contract?

I have deployed a smart contract to the Polygon Mumbai Testnet (it shouldn't really matter where I deployed it). When sending a transaction to call a function on this contract, the transaction fails, ...
David Callanan's user avatar
0 votes
0 answers
97 views

Recreate transaction log in solidity code

I have this log and i want to code a solidity contract/function that would do the same. What i understand reading this transaction is that WBNB contract (0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c) is ...
Rémi Baldy's user avatar
0 votes
1 answer
41 views

Smart contracts calling each other, costs and atomicity doubt

According to what I know, If you invoke function F on Contract C, you pay the gas fees related to F's operations and if for some reason something goes wrong, all state changes performed by F until ...
Alberto Molina's user avatar
2 votes
1 answer
3k views

i stupidily wrapped my ether to weth from metamask using uniswap,

I stupidly wrapped my ether to WETH from MetaMask using Uniswap. I then used https://relay.radar.tech/ to unwrap it but its taking so long. Here is the transaction hash ...
M Panayi's user avatar
1 vote
2 answers
249 views

How to send Ethereum to smart contract address without using keyword "payable"?

I have tried to send Ethereum from my wallet to the smart contract address by using the below code: pragma solidity >=0.6.10; contract NoUsePayable { function getBalance() public view returns (...
Kingpant's user avatar
2 votes
2 answers
4k views

How can I invoke an approve() function call from the user and not the contract?

I am working on a basic staking platform for practice. I understand that the user of the platform has to call the approve() function and pass the contract into it in order for the contract to use the ...
user68609's user avatar
2 votes
2 answers
1k views

How to read uniswap TX input to find out what swap was made?

Look at this tx : https://etherscan.io/tx/0x9854f2249f86802cb0edcff0aa6747de6c49d89b0ba0dc2038b00372b949356b it says 0.3RTH send to uniswap and 6,447.815435380239985848 L3P got from uniswap. However ...
Heetola's user avatar
  • 181
1 vote
1 answer
49 views

Why is the math code causing transactions to fail

Ok so This is my first time working on solidity contracts and I'm at a loss how to debug this code. This code fails: function claimReturns(address claimant) private { uint otherTotals = ...
Dan Anderson's user avatar
2 votes
1 answer
629 views

Cancelled Transaction in MetaMask USDC leads to loss of funds

I had attempted to transfer 992 USDC from MetaMask to a Ledger Account but had decided to cancel the transaction. On cancelling, MetaMask reports that the cancellation succeeded, but my MetaMask USDC ...
Eddie Lim's user avatar
3 votes
1 answer
2k views

Find a Function Call Across All Contract Transactions

Is it possible to search for a particular function call across all transactions of a smart contract? I'm doing due diligence on 1inch's smart contract in order to see if renounceOwnership was called ...
AdamHurwitz's user avatar
0 votes
1 answer
26 views

What happens when you send a non-state-changing transaction to the transaction pool

I understand that there are 2 endpoints for smart contracts. Call() for running view/pure function and SendTransaction() for state-changing transactions. Obviously a state-changing transaction sent to ...
RhinoBomb's user avatar
  • 171
0 votes
0 answers
22 views

How to find out what happened with a contract transaction

I have a question regarding one transaction which happened at the 17th of January 2018: https://etherscan.io/tx/0xabe5ac6176e1096bf4fbfa983cb8b04262ae1d57daf94ebb1668b5d45e3145f4 It should be ...
Peleke's user avatar
  • 101
1 vote
1 answer
2k views

Can someone help me get my funds back in my possession from a contract?

So first off, buyer beware: do not mess around with gameswap.org it appears I made a mistake in doing so. Luckily I never invest more than I can stand to lose unless I really trust the project. So not ...
Legionz's user avatar
  • 47
4 votes
1 answer
4k views

Uniswap v2 pair before liquidity add

I have a token contract and I want to add liquidity to Uniswap (mytoken + ETH). Before that, I would like to know the pair address in order to set it in my contract. Is it possible to create a pair on ...
4NDR34's user avatar
  • 61
0 votes
1 answer
31 views

Do smart contract transactions get signed?

When you send a transaction to a smart contract by using the contract.methods.methodName().send() is it signed by the sender? If not how can I link the sender to that transaction call
user3316323's user avatar
3 votes
1 answer
532 views

When a contract calls other contracts, is it an atomic operation?

If a contract calls several external methods of other contract(s), is it as a whole one atomic transaction (reverted as a whole if an exception happens)?
porton's user avatar
  • 1,854
5 votes
3 answers
412 views

Regular address turns into a contract after receiving a transfer?

To accept payments in ether myself, I first tried how others have implemented it. So I bought an item in a store that uses Coinbase Commerce to accept crypto payments and paid for my item with ether. ...
Roman Vinogradov's user avatar
0 votes
2 answers
429 views

Transactions not happening in Ropsten Test Network

I'm learning to set up a simple front-end website that executes smart contract methods in a testing environment, but even though MetaMask confirms the deployment of the contract, the transaction is ...
Kevvv's user avatar
  • 797
1 vote
1 answer
736 views

How do you know if a contract is destroyed?

I'm using web3.py to interact with contracts. I was wondering, after calling a function with selfdestruct or suicide(address), how do I find out that the contract is in fact dead?
Huadong Feng's user avatar
1 vote
1 answer
205 views

Can you activate Contract Functions just by receiving Ether alone?

Noob Question here. I have a Dapp that has no actual need of a web interface. What is the best way to activate functions if someone did something as simple as send Ether to an address it controls from ...
Redundant Design's user avatar
1 vote
1 answer
184 views

getEthToTokenInputPrice miner hack?

Plan to use getEthToTokenInputPrice in a Dapp. I was going to just use a larger sample size spread out over a large time period to mitigate flash loan price manipulation. Someone said this was ...
Redundant Design's user avatar
2 votes
1 answer
6k views

ENS on Rinkeby - Network does not support ENS?

I was able to register the ENS domain on Rinkeby, as the network supports ENS. My TX: https://rinkeby.etherscan.io/tx/0xd42b64ab03387d7ca405e7ba7b85ce893444a141e7a7de174f0361e2c4231674 My subdomain: ...
Mars Robertson's user avatar
2 votes
0 answers
124 views

How to know the reason of transaction's reversion in parity?

I am testing ERC20 USDT contract locally with parity. I imported contract to my private testnet and manually generated raw transaction that calls "transfer" method of contract. I send it to the node ...
Oroffe's user avatar
  • 263
1 vote
1 answer
78 views

How keccak hashing and for loop happening in pure function?

I put a keccak hashing inside pure function, it works and return me the result.It also works in a for loop. I studied that hashing the data and loop consumes consider amount of gas. Do we need to ...
Naveen Kumar's user avatar
6 votes
1 answer
15k views

Execute transaction Approve directly against contract address (without ABI)

Solved For now, you will always need the ABI to execute a call against the ethereum network with web3. A simple way is to reconstruct the function you wish to execute is to, either create a separate ...
Fifth Dimension Dragon's user avatar
1 vote
2 answers
397 views

How to read data returned by a function? [duplicate]

Counter.sol: pragma solidity >=0.5.0 <0.7.0; contract Counter { uint public _counter = 0; function GenNextID() public returns (uint) { return _counter++; } } I use ...
warchantua's user avatar
0 votes
0 answers
132 views

How can execute function that send ether in geth console?

I want to execute the send function that sends ether from the sender to the receiver, the code is as shown below. contract Sender { function send(address _receiver , uint amount) public ...
atti's user avatar
  • 21
1 vote
2 answers
8k views

Is it possible to insert some custom data in the DATA field of an Ethereum Transaction?

i am working on trying to get some data encoded/inserted into an ethereum transaction. Let me describe my environment first, i am using Web3py, Ganache and Remix IDE. I am able to successfully ...
Muhammad Yasir's user avatar
5 votes
2 answers
2k views

Who is msg.sender in a nested call chain?

I read about who is msg.sender when calling a contract from a contract, but who is msg.sender when calling a contract from a contract that calls another contract and so on and so forth?
Paul Razvan Berg's user avatar
0 votes
1 answer
111 views

How to get the call graph of a mainchain transaction?

Simple question, but I couldn't find the answer. There are transactions like this one which involve many chained contracts. But as storage modify the functions being called and calldata doesn t ...
user2284570's user avatar
  • 1,029
0 votes
2 answers
557 views

msg.sender.balance inside contract

what does/should msg.sender.balance return when used inside contract? Assume we have contract A, calling B, which is calling C. msg.sender is propagated with the calls down to B and C The user is ...
KNK's user avatar
  • 679
1 vote
1 answer
51 views

How does contract of dapp figure out who buyer is?

How does contract of dapp(eg. market place) figure out who buyer is? If buyer wants to purchase servive(or product) at certain dapp, he should transfer tokens to contract address of the dapp. At ...
lagoiz's user avatar
  • 147
1 vote
1 answer
1k views

How is it possiblle - Although one or More Error Occured [Reverted] Contract Execution Completed?

How is it possible that the txn is reverted due to some error but completed? https://etherscan.io/tx/0xc35fde759557f7742224373ea0777cc7ec36bac98dd678aa621ab96063c29e1c
Sowmay Jain's user avatar