Open Flyingtothemoon123 opened 2 years ago
Hello @Flyingtothemoon123 To do that you'll need a for loop, unfortunately. You can only copy fixed size arrays inside other fixed size arrays of same size. There is no implicitly defined conversions between fixed size arrays and dynamic arrays in solidity.
I have a function that takes uint256 with array type as an argument. After running the code the following error pops - up:
TypeError: Invalid type for argument in function call. Invalid implicit conversion from uint256[3] memory to uint256[] memory requested.
My code:
contract Testingground { uint256[] private threshold = [1000, 2000, 3000];
}