Questions tagged [calldata]
Questions about the "data" part in a transaction, which can be accessed by "msg.data". web3.eth.getTransaction calls this field "input".
189 questions
1 vote
1 answer
32 views
Is there any tool that can split ABI-encoded data into 32-byte chunks?
Suppose you have some ABI-encoded data like this (this a bytes variable holding a simple uint256): ...
0 votes
1 answer
25 views
In Remix IDE, `.push` isn’t popping up in list?
TypeError: Type literal_string "cat" is not implicitly convertible to expected type string calldata. --> SimpleStorage.sol:15:12: | 15 | _name ="cat"; | ^^...
0 votes
1 answer
49 views
Memory vs. calldata; Is it best practice to call memory in a internal for read-only arguments?
I've been searching but have not gotten a concrete answer, when passing an argument in a internal function, for example, logging an event, I only want to read the argument and emit the event. From ...
0 votes
2 answers
41 views
what exactly are the limitations of the require() function concerning my custom logic
I wrote some logic for a fundraising contract function fund() public payable { // myValue = myValue + 1; require(msg.value.getConversionRate(s_priceFeed) >= MINIMUM_USD, "...
0 votes
1 answer
98 views
Any way that I can append a data along with a EVM smart contract transaction?
I want to append some data along with the Ethereum contract call. for example, tokenContract.approve. I understand we can add the plain data to data field when we do a plain transaction. Just like ...
0 votes
1 answer
95 views
Invalid type for argument in function call. Invalid implicit conversion from literal_string "" to bytes calldata requested
I'm doing the course of Patrick Collins to learn about programming in Solidity; but some libraries from Chainlink has been changed since 2 years ago. So, when I try to compile the code I have the next ...
1 vote
0 answers
159 views
Ethereum Transaction Data Decoding
My question is regarding the decoding of transaction data. Specifically, when combing the Ethereum mainnet mempool and getting the transaction data for a transaction. How would I go about getting the ...
1 vote
0 answers
73 views
Create Call Data for function input using Nethereum
I want to call it a smart contract function. I am signing the transaction using Metamask so I need to create call data for the transaction. I want to use Nethereum for creating the call data of the ...
0 votes
1 answer
59 views
can we send value as well as call smart contract function using CALL
CALL opcode consumes value of the stack (which is transferred to the account). It can also additionally consume stack items to pass input to the smart contract account function. Can both happen ...
1 vote
2 answers
213 views
Is it possible to encode a struct to calldata when calling another function?
Let's say I have the following struct: struct Price { uint value; } Let's say I have the following function: function isPriceOkay(Price calldata price) public pure returns (bool) { return ...
0 votes
1 answer
101 views
How to change the offset of calldata value?
Suppose I have a contract below: contract Hack { Switch private target; constructor(address _target) { target = Switch(_target); } function test() external pure returns (...
0 votes
1 answer
82 views
Can't send eth + data into contract with etherjs
I want to send eth + data into this contract: 0x5293Bb897db0B64FFd11E0194984E8c5F1f06178 like this transaction: https://sepolia.etherscan.io/tx/...
1 vote
1 answer
96 views
How can a bytes32[] variable have a custom method (i.e., verifyCalldata)?
Code: https://www.contractreader.io/contract/mainnet/0x0C7D4bdA40CF78F9F1BAf6e3D5774f1E22c9CC4B My question is about this verifyCalldata() call: function verifyAddress( uint256 _projectId, ...
0 votes
2 answers
297 views
Callback After Dapp Approval
I have had a contract made for me, and a dapp set up by a developer. My question is how can i produce an event on my website when the user has approved spend of a certain token? Can i use a javascript ...
6 votes
3 answers
207 views
Is there a method to prove that data has been fetched from a block on a blockchain?
I'm considering a problem that I havent seen someone else look at yet. The problem statement is how can we prove that some data (e.g., a transaction, a block header) has been fetched from a block of a ...