hey there! if constructor(bytes32[] memory proposalNames) {...} is given how should i pass arguments in remix ide (in web browser)? I tried [keccak256("hello"), keccak256("world")], and it says "Error encoding arguments:..." to me.
What is the right way to do pass ["hello", "world"] then?

Jan 11, 2024, 5:28 PM
here:
Jan 11, 2024, 5:29 PM
you should do the keccak BEFORE and use the output as parameter =)

cast k "hello"
0x1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8

cast k "world"
0x8452c9b9140222b08593a26daa782707297be9f7b3e8281d7b4974769f19afd0
funny fact
those are also private keys and you can use them (of course don't!!)

0x5ccfa55C29F0522f062E3C15004E35a69dD45F6B & 0xe233251D121aD6c15b2511C0127Dbec63E842220
Jan 11, 2024, 5:59 PM
ummm, and in what environment should i use cast k "hello"? it's not a terminal, right?
Jan 11, 2024, 5:59 PM
it's cast, a tool from Foundry-rs
https://github.com/foundry-rs/foundry

https://book.getfoundry.sh/reference/cast/
or cryptozombies.io
Jan 11, 2024, 6:08 PM

© 2024 Draquery.com All rights reserved.