find the index position of a value in an array of sorted numbers
reentrance attack example using hardhat