Linked Questions

1
vote
1answer
362 views

debugging solidity contract geth [duplicate]

I have some contracts written in solidity and I am testing in geth on a private blockchain. I am seeking something like a console statement to display variables. I have been trying to work this out ...
88
votes
7answers
37k views

What is an ABI and why is it needed to interact with contracts?

ABI is referenced in many places including the official Ethereum website. What is an ABI and why is it necessary to use?
32
votes
5answers
21k views

How to concatenate strings in solidity?

I'm trying to concatenate two strings in solidity. I tried with + or . but neither option works. There is not much documentation on string concatenation yet. Is it even possible? If not, can I ...
59
votes
2answers
18k views

Difference between CALL, CALLCODE and DELEGATECALL

CALL and CALLCODE take the same number of operands (in the execution stack). For the exception flag being pushed on top of the stack: 0 means exception, 1 means successful execution. CALL is easy to ...
28
votes
4answers
24k views

How to convert a bytes32 to string

How can I convert a bytes32 to a string? Does anyone has a magic function or library which does it?
14
votes
4answers
11k views

Convert address to string

In Solidity, how can I convert the sender address to a string? The comments in How to convert an address to bytes in Solidity? did not provide a working solution
20
votes
3answers
4k views

Pass a function as a parameter in Solidity

Can you pass a function as a parameter in Solidity? My guess: There is the concept of address in Solidity, but they represent contracts. Contracts can have fallback functions, but I don't think you ...
15
votes
4answers
16k views

Conversion of uint to string

I am trying to convert uint to string in solidity. Is it possible to convert? if so how can I convert it? Convertion to base 10 is prefered, but in hexadecimal might also be helpful.
21
votes
2answers
12k views

How to pass arbitrary bytes to a function in Remix

According to this question I could write a simple contract like: contract SimpleStorage { bytes input; function setInput(bytes enterBytes){ input = enterBytes; } } Using "0x1234" as a ...
25
votes
1answer
13k views

How does the delegatecall method work to call to another contract's method?

I'm trying to figure out how to use the delegatecall method on a contract address in a contract to call a function in a separate contract. I know Libraries are the higher level interface to use but I ...
8
votes
1answer
4k views

Basic example of interaction between 2 contracts?

What is a basic example of one contract invoking a method in another (non-calling) contract? Would the address of the contract having that method always need to be hardcoded?
5
votes
2answers
3k views

Understanding nameReg.call(“register”, “MyName”) style call between contracts

Here's an example from solidity docs on Address type methods(call method specifically): address nameReg = 0x72ba7d8e73fe8eb666ea66babc8116a41bfb10e2; nameReg.call("register", "MyName"); ...
5
votes
1answer
2k views

Solidity Browser Compiler — Error: Assertion failed

Here's the code: contract C { function a(uint x){} } I try to call C.a(1000000000000000000); and get an error: Error encoding arguments: Error: Assertion failed while C.a(100000000); is ...
6
votes
1answer
740 views

How are solidity integer overflows handled?

uint8 x = 255; x += 10; Is x going to be 0 or 9?
4
votes
2answers
561 views

How to easily share Solidity code so that others can test it?

Say you have some Solidity code and something doesn't work and you'd like for somebody to take a look at it and do some quick tests. What is an efficient way to share Solidity code with others?

15 30 50 per page