All Questions
Tagged with transactions contract-invocation
123 questions
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. ...
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.), ...
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 ...
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 ...
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 ...
91
votes
9
answers
26k
views
Can contracts pay the gas instead of the message sender?
Is it possible for a contract to pay the gas costs (or part of it) that result from the contract being called? Or does the sender of a message always pay the resulting gas costs no matter what?
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 ...
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
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
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 ...
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 ...
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: ...
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 ...
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 ...
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 ...
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
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 ...
12
votes
2
answers
7k
views
Does view functions cost gas? And how to send transaction in a proper way?
I have a method defined as:
getNames() view public , if i call on it
contractInstance.getNames.estimatedGas() it returns me a non-zero value, why? I mean, view methods should not consume any gas! On ...
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 ...
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 ...
30
votes
4
answers
11k
views
Does every node execute the contract code for each transaction?
This question was asked on Reddit a while ago:
When a node sends a transaction to the network and has the receiver as a contract, does every node execute the contract bytecode with the inputs 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 ...
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
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 ...
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
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
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 ...
28
votes
2
answers
22k
views
How do I know how much gas to use when calling a contract?
When I am calling (sending a transaction to) a contract how do I determine how much gas to use? Is there a way to calculate this upfront & what happens if I send too much / too few gas?
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 ...
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 ...
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
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:
...
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, ...
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 ...
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 ...
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)?
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?
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
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....
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 ...
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
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
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 ...
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() ...
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?
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 ...
20
votes
2
answers
4k
views
What happens when a smart contract gets several similar calls in the same block?
What happens when a smart contract gets several similar calls in the same block?
Consider for instance this greeter:
contract greeter {
string name;
function setName(string name_) {
...
5
votes
1
answer
8k
views
Get pending transactions to a given address/contract
Is there a way I can get all pending transactions to a given address/contract? I could get the confirmed transactions by exploring transactions in recent blocks. But how would I go about getting ...
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, ...
3
votes
1
answer
8k
views
Get the balance of an ERC20 token at an Ethereum address [duplicate]
I'm trying to get the balance of a token on an Ethereum address. So let's say my Ethereum address has 1 SNT. I'd like to make a call to get that 1 SNT as a response. I've written many other calls ...