New answers tagged

0

It is not possible to cast between fixed size arrays and dynamic size arrays. You have to create a temporary dynamic array and copy the elements. address[] memory t = new address[](2); t[0] = 0xB4a925BAe55743AcF3Dc65a8de0b9507F0491617; t[1] = 0x288071244112050c93389A950d02c9E626D611dD; codeTested = new Buds(param1, param2, t);


0

Both works. Assigning variables inside the constructor method would cost you more gas when deploying the contract. It is better to assign it inline unless you do not need a param from the constructor.


Top 50 recent answers are included