ethereum smart contract private value not safe
上面範例中,play(100)被呼叫後,從transcation data內得知
0x6587f6ec0000000000000000000000000000000000000000000000000000000000000064
然後先取得play()這部份的data
bytes4(keccak256(‘play(uint)'))
然後得知 0000000000000000000000000000000000000000000000000000000000000064 就是 uint部份,得到的這個值是經過hex才顯示的
byte32:00 為1個byte(16 bits),共32個
64=> 6 * (16^1) + 4 * (16^0) = 100
uint256 => 2^256 => 8^32 => byte32