Questions tagged [arrays]

Questions regarding the use of Arrays in solidity.

Filter by
Sorted by
Tagged with
3
votes
1answer
656 views

returning a fixed size 2D array to web3.js

I would like to return a 2D array from solidity code and look at it with web3.js this is the solidity function: uint8 [10][10][100][100] public blocks; function getBlock(uint x, uint y) returns (...
2
votes
1answer
533 views

How to find unique entries in mappings?

Is it possible to write a function that compares a list of strings or numbers, or both, and determines which items in the list are uniques? could someone provide sample code of how that would be done ...
13
votes
2answers
4k views

Is it impossible to use an array of strings as the argument to solidity function?

If I try to define a function using an array of strings as an argument, solc gives me the following error: Error: Internal type is not allowed for public or external functions. function test(...
9
votes
2answers
6k views

How to concatenate a bytes32[] array to a string?

I am passing an array of bytes32 to my function. This array can contain numbers or hashes etc. to identify an object. In a new use case I want to pass a URL to this function by splitting the URL into ...
7
votes
1answer
443 views

What's the limitation that requires Solidity array dimensions to be declared backwards?

From docs: In Solidity, array dimensions are declared backwards from the way you might be used to declaring them in C or Java, but they are access as in C or Java. For example, int8[][5] ...

1
4 5 6 7
8