def test_eth_sign(): # Generated using https://www.myetherwallet.com/signmsg.html msg = 'is it wednesday, my dudes?' sig_expected = '0xcc7b4e6cde6ace1d99995661250e52388aae17ebd66dcf52e634a6dd51bf286a2' \ 'e9757967b7baff8b549da7d8c3340701abf8560430b7a0bdf34f42b19bbf1861b' assert encode_hex(eth_sign(SENDER_PRIVATE_KEY, msg)) == sig_expected
def test_eth_sign(): # Generated using https://www.myetherwallet.com/signmsg.html msg = 'is it wednesday, my dudes?' sig_expected = '0xcc7b4e6cde6ace1d99995661250e52388aae17ebd66dcf52e634a6dd51bf286a2' \ 'e9757967b7baff8b549da7d8c3340701abf8560430b7a0bdf34f42b19bbf1861b' assert encode_hex(eth_sign(SENDER_PRIVATE_KEY, msg)) == sig_expected
def test_eth_sign_v27(): sig = eth_sign(SENDER_PRIVATE_KEY, 'hello v=27') assert sig[-1] == 27 assert is_same_address(eth_verify(sig, 'hello v=27'), SENDER_ADDR)
def test_eth_sign_v27(): sig = eth_sign(SENDER_PRIVATE_KEY, 'hello v=27') assert sig[-1] == 27 assert eth_verify(sig, 'hello v=27') == SENDER_ADDR
def test_eth_sign_v27(): sig = eth_sign(SENDER_PRIVATE_KEY, 'hello v=27') assert sig[-1] == 27 assert is_same_address(eth_verify(sig, 'hello v=27'), SENDER_ADDR)