Linked Questions

6
votes
1answer
2k views

How is an ABI stored in bytecode?

I'm trying to understand how a simple hex string like 0x25d8dcf2 is enough information to execute a function in a contract. I've read up on the ABI and understand that the hex string is basically just ...
5
votes
1answer
1k views

How do you get a string value from msg.data in the fallback function?

Im trying to do what The DAO did and do something when a sender sent money to my contract address. But im not sure how to. The something I want to do is to just create a new user in a mapping with the ...
5
votes
1answer
669 views

Accessing the last function parameter from msg.data

I have a fallback (unnamed) function in my contract and I know that the last parameter (or first, does not matter) passed is always an uint. Is it possible to somehow access it though the msg.data?
3
votes
1answer
255 views

Deploy contract hangs in Mist

I'm not able to deploy any contract (the greeter contract does not work either) using Mist 0.8.6 in Windows. The deployment just hangs there and nothing really happens. Is there a way to figure out ...
3
votes
1answer
148 views

How to determine the contract method called and with what parameters from a transaction hash?

Suppose I have a transaction hash and it belongs to some transaction which was done on a smart contract. From the hash, how do I determine what was the contract method which was called and with what ...
2
votes
1answer
599 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 ...
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 { ...
2
votes
1answer
764 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 ...
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 ...
2
votes
1answer
981 views

Understanding data payload on contract call [duplicate]

I'm running truffle's default example Metacoin: import "ConvertLib.sol"; contract MetaCoin { mapping (address => uint) balances; function MetaCoin() { balances[tx.origin] = 10000; } ...
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: ...
1
vote
1answer
742 views

How to interact with Smart Contract in private network with 3 nodes using Mist?

I'm looking for a method to interact with a smart contract deployed from the official Ethereum wallet. My client is Geth,and I've synchronized 3 nodes. How is possible to recall a simple method of ...
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; _; } ...
3
votes
0answers
38 views

How to make sense of the “data” sent to execute a contract? [duplicate]

I'm trying to understand the technical details of Ethereum and one thing I can't find any info about is the data to be sent to a contract. For example, I have a very simple coin flip betting ...
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 ...

15 30 50 per page