Hello, please tell me what is the adequate cost of gas when deploying a remix / metamask contract? now for some reason it shows $500
What does the gas of the external load of the network generally depend on?
May 2, 2023, 7:35 PM
Gas price depends on traffic on the network
Gas consumption on the code to be executed
What you pay is gas consumed*gas price
You'll need to push all the elements
May 2, 2023, 8:15 PM
to save it in the mapping I have to push one by one?
May 2, 2023, 8:16 PM
Yes
May 2, 2023, 8:16 PM
💀💀💀💀💀
May 2, 2023, 8:16 PM
Or change from [] to [10] so you can [i]=[i]
May 2, 2023, 8:17 PM
Wouldnt it be Struct[ ]( 10 )?
May 2, 2023, 8:18 PM
That'd still be a dynamic sized array
May 2, 2023, 8:19 PM
still gives the same error
I changed even in the mapping
mapping(address => mapping(uint256 => Plant[10])) public greenHouseUnit;
May 2, 2023, 8:20 PM
You can't do array in storage = array in memory
You need to iterate
May 2, 2023, 8:22 PM
interesting how you have to contruct the array an push individually after
Worked just fine now, thanks a lot.
May 2, 2023, 8:38 PM
Because otherwise it'd try assigning a pointer, not writing to storage
May 2, 2023, 8:40 PM