Linked Questions

2
votes
0answers
15 views

Why is it required to know the function selector in a smart contract to call the function? [duplicate]

I understand what a function selector is and how it is computed: The first four bytes of the call data for a function call specifies the function to be called. It is the first (left, high-order ...
1
vote
2answers
66 views

Why do I need to have exact same code to load contract from address in Remix IDE?

I tried to interact with the deployed contract and i don't have its code. so i found out the contract address and tried to load contract from address in Remix IDE! isn't this possible? WHY?
2
votes
1answer
595 views

Creating raw transactions for sending ERC721 tokens

I was able to create raw transactions for eth following this article https://medium.com/blockchain-musings/how-to-create-raw-transactions-in-ethereum-part-1-1df91abdba7c However, how can I create raw ...
6
votes
1answer
113 views

Why is the returndata of a function returning bytes formatted in a weird way?

Solidity 0.4.25. Consider this code contract A{ function test() public view returns (bytes){ bytes memory output = abi.encodePacked(bytes32(1)); return output; } } The ...
2
votes
1answer
181 views

How does a contract's constructor work and load input values?

I set up the following contract: pragma solidity ^0.4.25; contract Simplest { uint x; constructor(bool _lucky) public { if (_lucky == true) { x = 7; } else { ...
4
votes
2answers
908 views

What is calldata?

What is calldata? I learned that there are three types of memories: Storage Memory Stack In the Ethereum docs, it says that the function parameters are of type memory by default. However, I've also ...
3
votes
5answers
3k views

Is there a way to extract ABI from a deployed contract?

I am building a web UI for testing smart contracts and currently I have to supply the ABI for a contract I test. Is there a way to extract the ABI from a deployed contract (preferably programmatically)...
0
votes
2answers
50 views

How can I send alerts to others on ethereum blockchain?

I want to know if it is possible to build an app that can send alerts to others on ethereum blockchain. If it's possible then how fast do you think the alerts can be sent and then received by the ...
6
votes
2answers
547 views

Is sending some datas in the data field safe?

An airdrop ask to send it 0ETH with 150000 GAS and some datas in DATA field. Is it safe? What could be the aim of this transaction? Thanks.
2
votes
1answer
762 views

Where does ABI decoding take place?

I'm trying to understand the winning contract from the Underhanded Solidity Contest. That contract apparently caused an overflow in the ABI decoder, but I'm having a hard time understanding where in ...
4
votes
2answers
3k views

What is “data” param of rawTx? How to send ETH by using web3

I want to send eth by using web3 on testnet. Source address is 0xbddf0bf3ac858d7fb8a2bdda55884d61779ba5a9. The destination is 0x8005ceb675d2ff8c989cc95354438b9fab568681. I found the example on web3 ...
0
votes
1answer
270 views

Modifiers misunderstanding

pragma solidity ^0.4.0; contract test { bool test_bool1 = false; bool test_bool2 = true; modifier test_modifier(bool _test_bool){ if (_test_bool == false) throw; _; } ...
1
vote
1answer
393 views

how to retrieve function call address from deployed contract for usage with MetaMask send + transaction data?

I've deployed a contract into my testrpc network. $ truffle deploy Using network 'development'. Running migration: 1_initial_migration.js Deploying Migrations... Migrations: ...
2
votes
1answer
2k views

How to know the hex code to use in data to call a specific contract function?

For instance, on the BAT ico site, you can see the crowdsale contract address, the ABI and also a string to use in the data part of your transaction if you don't want to call the contract function ...
7
votes
1answer
1k views

When does the fallback function get called?

Is it true to say that if the first four bytes of an Ethereum's transaction does not contain one of the contract's encoded function calls, then the fallback function will be called? In other words if ...

15 30 50 per page