Consider a Contract:
Contract Example{ uint array[]; address owner; function Example(){ owner = msg.sender } function setArray(uint index, uint value) public { if (msg.sender == owner){ array[index] = value; } }}
Contract Example{
uint array[];
address owner;
function Example(){
owner = msg.sender
}
function setArray(uint index, uint value) public {
if (msg.sender == owner){
array[index] = value;
Is there any possibility that hackers update array[] directly by generate a specific block. (steer clear of the condition that "only owner can update array")
No, nothing but the smart contract itself is allowed to modify its storage. This is assuming that the basic security of the blockchain is still intact