pipermerriam/ethereum-function-signature-registry

https://www.4byte.directory/submit: Server Error (500) when entering hex number

Closed this issue · 1 comments

I inadvertently tried to enter a hex signature via https://www.4byte.directory/submit
(for example 0x12345678)
Then I got the error : Server Error (500)

Later i realized i should have entered the function, but i was confused for a while.
If would help if the description was more clear and/or an appropriate error message is given.

I believe this is the correct place to start if someone wants to work on this

def post(self, *args, **kwargs):
serializer = self.get_serializer(data=self.request.data)
if not serializer.is_valid():
return Response({'serializer': serializer})
signature = serializer.save()
messages.success(
self.request._request,
"Added signature '{0}' for function '{1}'".format(
signature.bytes_signature.get_hex_display(),
signature.text_signature,
),
)
return redirect('signature-list')