Update transferapproval interface
This commit is contained in:
17
util/calculate_erc165.py
Normal file
17
util/calculate_erc165.py
Normal file
@@ -0,0 +1,17 @@
|
||||
import sys
|
||||
import web3
|
||||
|
||||
f = open(sys.argv[1], 'r')
|
||||
z = b''
|
||||
for i in range(32):
|
||||
z += b'\x00'
|
||||
while True:
|
||||
l = f.readline()
|
||||
if l == '':
|
||||
break
|
||||
#print('line {}'.format(l))
|
||||
h = web3.Web3.keccak(text=l)
|
||||
z = bytes([a ^ b for a, b in zip(h, z)])
|
||||
#print(h.hex(), z.hex())
|
||||
f.close()
|
||||
print(h[:4].hex())
|
||||
Reference in New Issue
Block a user