static SetDepositsLimitContent UnforgeSetDepositsLimit(ForgedReader reader)
 {
     return(new SetDepositsLimitContent
     {
         Source = reader.ReadTzAddress(),
         Fee = (long)reader.ReadUBigInt(),
         Counter = (int)reader.ReadUBigInt(),
         GasLimit = (int)reader.ReadUBigInt(),
         StorageLimit = (int)reader.ReadUBigInt(),
         Limit = reader.ReadBool() ? reader.ReadUBigInt() : null
     });
 }
 static RegisterConstantContent UnforgeRegisterConstant(ForgedReader reader)
 {
     return(new RegisterConstantContent
     {
         Source = reader.ReadTzAddress(),
         Fee = (long)reader.ReadUBigInt(),
         Counter = (int)reader.ReadUBigInt(),
         GasLimit = (int)reader.ReadUBigInt(),
         StorageLimit = (int)reader.ReadUBigInt(),
         Value = reader.ReadEnumerableSingle(UnforgeMicheline)
     });
 }
 static RevealContent UnforgeReveal(ForgedReader reader)
 {
     return(new RevealContent
     {
         Source = reader.ReadTzAddress(),
         Fee = (long)reader.ReadUBigInt(),
         Counter = (int)reader.ReadUBigInt(),
         GasLimit = (int)reader.ReadUBigInt(),
         StorageLimit = (int)reader.ReadUBigInt(),
         PublicKey = reader.ReadPublicKey()
     });
 }
 static DelegationContent UnforgeDelegation(ForgedReader reader)
 {
     return(new DelegationContent
     {
         Source = reader.ReadTzAddress(),
         Fee = (long)reader.ReadUBigInt(),
         Counter = (int)reader.ReadUBigInt(),
         GasLimit = (int)reader.ReadUBigInt(),
         StorageLimit = (int)reader.ReadUBigInt(),
         Delegate = UnforgeDelegate(reader)
     });
 }
 static TransactionContent UnforgeTransaction(ForgedReader reader)
 {
     return(new TransactionContent
     {
         Source = reader.ReadTzAddress(),
         Fee = (long)reader.ReadUBigInt(),
         Counter = (int)reader.ReadUBigInt(),
         GasLimit = (int)reader.ReadUBigInt(),
         StorageLimit = (int)reader.ReadUBigInt(),
         Amount = (long)reader.ReadUBigInt(),
         Destination = reader.ReadAddress(),
         Parameters = UnforgeParameters(reader)
     });
 }
        static OperationContent UnforgeOperation(ForgedReader reader)
        {
            var operation = (int)reader.ReadUBigInt();

            switch ((OperationTag)operation)
            {
            case OperationTag.Endorsement:
                return(UnforgeEndorsement(reader));

            case OperationTag.Preendorsement:
                return(UnforgePreendorsement(reader));

            case OperationTag.Ballot:
                return(UnforgeBallot(reader));

            case OperationTag.Proposals:
                return(UnforgeProposals(reader));

            case OperationTag.Activation:
                return(UnforgeActivation(reader));

            case OperationTag.DoubleBaking:
                return(UnforgeDoubleBaking(reader));

            case OperationTag.DoubleEndorsement:
                return(UnforgeDoubleEndorsement(reader));

            case OperationTag.DoublePreendorsement:
                return(UnforgeDoublePreendorsement(reader));

            case OperationTag.SeedNonceRevelation:
                return(UnforgeSeedNonceRevelaion(reader));

            case OperationTag.Delegation:
                return(UnforgeDelegation(reader));

            case OperationTag.Origination:
                return(UnforgeOrigination(reader));

            case OperationTag.Transaction:
                return(UnforgeTransaction(reader));

            case OperationTag.Reveal:
                return(UnforgeReveal(reader));

            case OperationTag.RegisterConstant:
                return(UnforgeRegisterConstant(reader));

            case OperationTag.SetDepositsLimit:
                return(UnforgeSetDepositsLimit(reader));

            default:
                throw new ArgumentException($"Invalid operation: {operation}");
            }
        }