How to return an array from a function in Solidity?

preview_player
Показать описание
FREE TRAININGS (WEB3 DEV, FLASH LOANS...)

OTHER LINKS

CONTACT INFORMATION
Questions about EatTheBlocks courses, partnerships, projects:
👉 contact [at] eattheblocks [dot] com

In this video I will show you the 2 methods to return a Solidity array from function

Other Links:
Рекомендации по теме
Комментарии
Автор

THANK YOU SO MUCH, I WAS STRUGGLING WITH THAT FOR ABOUT 4 HOURS DAMMMN

suwedo
Автор

Hey this seems great. Also can you tell me if I have more variables in struct array and I want to return all the data is it a proper way in Production to return all those variable arrays ?

example:

struct MyStruct {
....,
....,
10th var
}

MyStruct[] myusers;

function() view returns(type1[] type[] 10 memory){}

?

saastalkonly
Автор

Tried it on remix, no compilation errors but transaction failed for this function

hkhitter
Автор

Legal o vídeo.. mas e como faço para passar os paramentros no deploy???

carlosalbertobatistacruz
Автор

explanation is good, but try to show us the deployment also because while practicing it is not deploying.if you try to show hat also it will be very greatfull.
thanks in advance

PrasanthiKasamsetty
Автор

can you do it using node js and express framework

jomoljaison
Автор

If the array have more than one value, can it return all array value?

tongtony