diff --git a/backend/api_app/smartcontract/serializers.py b/backend/api_app/smartcontract/serializers.py index e4b4da3..fd5177e 100644 --- a/backend/api_app/smartcontract/serializers.py +++ b/backend/api_app/smartcontract/serializers.py @@ -15,21 +15,25 @@ class InputSerializer(serializers.Serializer): name = serializers.CharField(allow_blank=True, required=False) type = serializers.CharField() + class CompilerSerializer(serializers.Serializer): version = serializers.CharField() + class OutputSerializer(serializers.Serializer): internalType = serializers.CharField(allow_blank=True, required=False) name = serializers.CharField(allow_blank=True, required=False) type = serializers.CharField() + class ABIJSONSerializer(serializers.Serializer): inputs = InputSerializer(many=True) - name = serializers.CharField(required=False, allow_blank=True) + name = serializers.CharField(required=False, allow_blank=True) outputs = OutputSerializer(many=True) stateMutability = serializers.CharField() type = serializers.CharField() + class MethodSerializer(serializers.Serializer): inputs = InputSerializer(many=True) name = serializers.CharField(required=False, allow_blank=True) diff --git a/backend/api_app/smartcontract/views.py b/backend/api_app/smartcontract/views.py index c0d2a85..61c55f5 100644 --- a/backend/api_app/smartcontract/views.py +++ b/backend/api_app/smartcontract/views.py @@ -13,7 +13,7 @@ from authentication.organizations.permissions import IsMember from .models import SmartContract -from .serializers import ABIJSONSerializer, SmartContractSerializer +from .serializers import SmartContractSerializer class SmartContractViewSet(viewsets.ModelViewSet):