Bearle / django-web3-auth

A pluggable Django app that enables login/signup via an Ethereum wallet (a la CryptoKitties)
Other
88 stars 40 forks source link

some error about this function “sig_to_vrs()” #7

Closed miaozjs closed 2 years ago

miaozjs commented 2 years ago

Description

error with this function def sig_to_vrs(sig):

sig_bytes = bytes.fromhex(sig[2:])

        r = int(sig[2:66], 16)
        s = int(sig[66:130], 16)
        v = int(sig[130:], 16)
        return v, r, s

error: ValueError: invalid literal for int() with base 16: 'x13a288e1f37f887232928280b1be88f4c9fd26893bf39675a74aa89125ebc20'

my signdata: ‘0x13a288e1f37f887232928280b1be88f4c9fd26893bf39675a74aa89125ebc20b5902dd94311502aabf8499e063b74b044a8d72f4748b3e217eef4e289984db701b’