Skip to main content

All Questions

Filter by
Sorted by
Tagged with
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: ...
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 ...
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. ...
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 ...
1 vote
2 answers
823 views

How to track incoming to smart contract transactions using web3js?

I've got one Ethereum smart contract which calls functions of the other one. How could I track these calls using web3js or some other tool if it is possible at all? I need it because I want to execute ...
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.), ...
1 vote
1 answer
682 views

How to simulate multiple consecutive transactions and get the resulting state?

I'm trying to simulate a transaction on the public blockchain that invokes a contract's method with certain parameters. Then I want to make a follow-up transaction with some other method call. I ...
7 votes
2 answers
564 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 ...
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 ...
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 ...
1 vote
1 answer
301 views

Byte32 error, even after converting string to hex

I looked everywhere for people with similar problems, but I couldn't find anything. I am confused why I keep getting this error (yes, I know others have had this error too, but not for the same ...
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 ...
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 ...
0 votes
2 answers
300 views

How can Contracts sign transactions, when they dont have a private key?

When transactions are made the sender is identified by his signature. But Contracts dont have a private key to sign any transaction or message. So I have some questions: Can a Contract initiate a ...
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 ...
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
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 :...
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 ...
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 ...
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 ...
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 ...
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 ...
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, ...
5 votes
2 answers
905 views

return (bytes32,bytes32) , returns actual transaction address instead of the real data

I have attached my contract, which works fine on populus and compiles on geth. It is a simple source code: Test() function appends data into my linkedlist that is defined in my library. And get() ...
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.
1 vote
1 answer
2k views

How to send data to smart contract?

I have the variable w1_temp, which i need to send to contract I have the following code: var W1Temp = require('w1temp') var Web3 = require('web3') var web3 = new Web3() web3.setProvider(new web3....
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 ...
1 vote
1 answer
7k views

what is [Reverted] during contract execution

I have sent ETH to a contract address, and it "failed" the transaction saying it is: Warning! Error encountered during contract execution [Reverted] contract address and transaction failure here: ...
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 ...
195 votes
2 answers
60k views

What is the difference between a transaction and a call?

What is the difference between a transaction and a call? In some interfaces, I can interact with contracts via calls or via transactions. What is the difference between the two, and can contracts also ...
9 votes
3 answers
7k views

Who pays gas for smart contracts?

I'm currently writing my first smart contract and I'm trying to figure out how to inject gas into the contract, of course, if it's possible. I'm not sure If I got it correctly. With every transaction ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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. ...
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 (...
0 votes
1 answer
63 views

what information is provided to the miner with the transaction

I am wondering what information is provided to the miner with a transaction that needs to invoke a contract? I thought about Gas, GasPrice, name of function to invoke and input. But, whether the ...
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 = ...
2 votes
1 answer
630 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 ...
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 ...
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 ...
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 ...
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 ...
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
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)?
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 ...
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?