The RandomStringPicker contract is a simple Solidity smart contract designed to randomly pick strings from an array.
- The contract function
getRandomStringsreceives an array of strings and an integer (representing the number of strings to pick). - It generates random indices by hashing the current block timestamp, the message sender's address, and a loop index.
- The function returns an array of randomly selected strings.
You need to have the following installed:
To deploy this contract, you can use Truffle.
- Clone this repo.
- Open terminal in the root directory of this repo.
- Run
truffle develop. - Run
compile. - Finally, run
migrateto deploy the contract.
To interact with this contract, you can use Remix or Truffle.
This project is licensed under the MIT License.
Please note that this contract has not been audited. Use it at your own risk.